forums

TNT Basic Forums > Beyond Basic
TWO PLAYERS BEANS!!!
< Last Thread     Next Thread >
Author
Thread        Post A Reply

03-27-2004 01:29

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Hey! I finished my personal "two players" hack of the TNT Basic Game "Beans" (which I hope you know)

You can get the source from

http://www.radicalrebound.com/Beans_2_Source.sit

(only 11 kb)

To actually play it you must get the original "beans" file and change the old source with the new one (hope it's clear!)

Feedback welcome!

03-27-2004 06:59

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Wow, pretty awesome! I like how you implemented the grey beans to make two player competition more exciting. I noticed one problem, however: at one point, clearing some beans left a gap under a column. It was probably a grey bean that disappeared; you wrote your own procedure for grey beans right?

It would also be nice if the grey beans didn't appear so suddenly. Maybe you could make them fall down, or just start transparent and gradually become opaque.

03-27-2004 10:34

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Thanks!

The problem of the gap: ouch! I hoped I had fixed that! I never had it happening myself... but it looks not...


The fact that beans appear suddenly : yeah... I also wanted to make them fall... the point is that I really do not completely understand the original code and don't really see an elegant (easy) way to insert their falling in the code; i'll try to watch that again when I'll have more time... for now my programming time budget is finished ;-(

Cheers!

Matt

03-29-2004 14:59

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

REAL COOL

04-17-2004 19:04

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

NEW VERSION READY!

thx!

Following eekaydee's suggestion i finally managed to grasp most of the code and hack it how it was meant to be (despite Mark Tully's efforts to keep the code cryptic ;-)

So now no more bugs (hopefully) and the grey beans spectacularly fall from the sky... ooh...

So if you have suggestions or feed back, here it is again, before I put it in the "news" (ooooh...)!


http://www.radicalrebound.com/Beans_2_Source.sit


Cheers!

Matteo

04-18-2004 04:13

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Bug

Ugh, sorry to bring bad news again, but I ran into another bug as I was playing. I have no idea what happened; it just crashed with this message:

*** Runtime exception caught ***
Line# : 404
Code : if gBeansAnimFrame[x,y,p]=-1
Error : Array index out of bounds.

Aside from that, it's improved a lot! The grey beans look much nicer when they fall.

04-18-2004 13:12

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

argh

terrible, yesterday i did play with some friends for a bout one hour and nothing happened ;-(

Oh well... Looks I'll have to play more ;-)

04-18-2004 15:51

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

...Well, if it helps, I was testing it by myself, with one hand on the left keys and one hand on the right keys. :)

04-18-2004 17:48

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

wow you must have some stunning reflexes ;-)

04-18-2004 17:52

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I'd like to make it networkable but I don't seem to manage to keep the connection working on OS 9: (I tried to connect one mac with 9 and one with X) it looks that TNT keeps so much time from the system on 9 that it does not manage to keep the connection active ;-(

04-20-2004 18:12

Posted by:
Stephen Lund

Location:
Michigan USA

Click Here to Email Stephen Lund   Find more posts by Stephen Lund

:')

I't worked well for me

COOL

04-20-2004 22:34

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

The next big thing is make a CPU to play against the computer! ( That must be hard to do! )

04-20-2004 23:25

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

good it works for somebody ;-)

Yeah artificial intelligence is the way to go... I'll add that!

A basic artificial intelligence is not so hard: simply drop down beans in a way that at least one falling bean colour matches one on the ground, and if possible both. Yeah it's not the best you can do but I guess it's quite effective ;-)

Now I should just add sounds and I can start selling $$;-)$$

Do you think I'll get in trouble? I mean, it's a bit too much a clone... and also a big part of the code is from Mark Tully... I don't think he'll mind, will he (it says somewhere "You are free to reuse any part of Beans, including the graphics and source code in any TNT Basic game")?

Mark, are you there?

I guess this game would sell fine $$ 8-) $$

06-05-2004 17:16

Posted by:
Turner

Location:
Williamstown, MA

Click Here to Email Turner   Find more posts by Turner

nah, AI isn't that hard. I'm making a battle pong game, the ai is easy, for both the AI paddle, wingmen, and the swarm of baddies. ;)

06-05-2004 17:30

Posted by:
Turner

Location:
Williamstown, MA

Click Here to Email Turner   Find more posts by Turner

K. I've found a bug. It happened when the guy on the left got so it couldn't spawn anymore (that is, reached the top)

It spawned this at me:

[code]*** Runtime exception caught ***
Line# : 404
Code : if gBeansAnimFrame[x,y,p]=-1
Error : Array index out of bounds.
[/code]

06-08-2004 14:58

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

yeah it's still a bit buggy (though not much). I gave up a bit when I tried to implement my AI and it wasn't THAT good (although it beats me say 1 in 4...)... Anyway I did it and I should post it someday...



Now I'm also going to take back on radical rebound because, after having left it for 4 months, I noticed some graphics are pretty bad (the titles, the energy bars...) and I'm making the graphics much more consistent (with photoshop ;-) and it looks really professional... and I'm also going to put in many different type of enemies to make it more fun.

So I will enunciate a new law:

The polish of a game depends much more on the graphics program you use than on the programming tool...

And the corollary:

photoshop is better than appleworks...

07-20-2004 12:21

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

AI Done!!

hi, so by great request here is the new version with AI, so you can play without developing schizofrenic attitudes managing two players at a time...

Tell me if it's good enough: I think it's pretty ok: not too strong, not too weak:

http://www.radicalrebound.com/beans_4_source.sit

07-20-2004 12:28

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Hmmmm... for people who don't know about this, it's a "two player" version of beans, you need to have the original "beans", then replace the code in "beans" with the one I provide then simply run it... by tweaking a line in the code you can choose wether u want to play versus the CPU or a friend.

07-20-2004 17:33

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Wow. Good AI.

07-22-2004 00:08

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

thx. Actually I have seen some puyo puyo programs with much better AI, the one I made is quite rough.

good AI use a "point" system, a bit like chess programs, and evaluate each move according to some ranking algorithm.

Mine simpley tries to complete 4-tuples, if it does not manage it tries to complete 3-tuples, if it does not manage it tries to complete 2-tuples, if it does not mange he tries to put the beans in some corner... there are also some other technicalities that I put inside to make it a bit better, but essentially it's like this.

BTW the program is still a bit buggy, argh... sometimes the blocks don't dissapear as they should :-(

07-22-2004 00:50

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Really? Man, the AI beat me down with chains! Well, in the beginning I do well, but then the AI makes a comeback and I get buried with greys.

07-22-2004 09:42

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hey, you're not so good at videogames, arent'ya? ;-P

You must learn to do "combos", say two or three 4-tuples destroyed in a chain reaction: that gives a lot of greys to the opponent

07-22-2004 15:05

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

What!? Me not good at games!? =O Does this mean...all my years of training...down the drain? Noooo...

I was doing chains! That's how I won at first...but somehow the comp sends loads of greys after that...

Ok that does it! I'm gonna get good at this!

07-22-2004 15:22

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Dang. Like I said, I do do chains. I doubled the comp's score, 12000 to 6000. But once it blocks me in the right place with the greys, I'm out...

07-22-2004 17:26

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

I WIN!

YES! I finally beat the AI! 12300 to 3300!

Phew...and you said it's not too hard...does that mean you can beat it easily?

07-22-2004 17:39

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Good job!

I win about 50% of the time. But maybe it's because I have a slow computer ;-P

Framerate on my 350 MHz iMac OS 9 drops to about 40 FPS when the two screens are full... (should be 60 FPS).

And I did not put "adjusting speed", so if you have a slow computer it actually goes slower (Unlike RR which adapts in order to have the same speed despite different FPS)

I should make it networkable so we can challenge B-)

07-22-2004 18:10

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

OOhhh no wonder why it was so hard for me! Mine runs at 59-60 fps. Lemme try changing it to 40 to see what if it's any easier...

Yes, network play would be awesome, though I'm not sure if it would be fast enough.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.