forums

TNT Basic Forums > Programming Q&A
Source code for an online 2 player game released!
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-03-2005 23:00

Posted by:
JAS

Click Here to Email JAS   Find more posts by JAS

I posted a game (with source code) online in the directory, but it hasn't shown up yet.... Here it is:

Source:
http://www.sinthesisent.com/o2pgd_source.sit

Compiled game:
http://www.sinthesisent.com/o2pgd.sit

The game is for 2 players - either online or on one computer. It shows things like gathering bullets, flipping switches, network code, elevators... you get the idea.

On a side note: It was coded in 3 days. Nice, huh!

There will also be a drum machine coded with TNT, but I've delayed that a little due to an annoying bug that I can't make heads or tales (or is it tails) of.

As always opinions, questions, and/or comments are welcome!

Enjoy,
JAS

01-06-2005 03:23

Posted by:
Emmett

Location:
Albany, Oregon

Click Here to Email Emmett   Find more posts by Emmett

It was very thoughtful of you to place this program and source code into this forum. I have played the game and examined the code. I will learn quite a bit from that.
Thanks Again

01-06-2005 14:28

Posted by:
Stephen Lund

Location:
Michigan USA

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

Great game

It's relly a fun 2 player game, but there is a couple bugs that have to be worked out,
like when you telport somtimes you appear out of the screen, and some
times the ammuniton appears some place where you can not get it, like in side a brick.

I love the game a code,
Stephen

01-06-2005 19:41

Posted by:
JAS

Click Here to Email JAS   Find more posts by JAS

Thanks for the response. I'm glad you enjoy it.

I did it, so that people could learn and to show that TNT IS being used and is fully functional for game dev.

I just hope that TNT doesn't die out now that blitzmax is out. I really enjoy developing games with it.

Now to the good news.

I've updated the game and source with the following:

- Bullets should not appear inside the floor anymore.

- when you teleport from a place with a light to a place where there is none you are not seen for a frame (the whole point of teleporting was to evade and possibly hide in a new lightless location).

- players should no longer teleport off the screen accidentally.

01-07-2005 01:03

Posted by:
Stephen Lund

Location:
Michigan USA

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

Fixed

that fixed the problems but i'm not sure if this is a bug our not, but I think that one of the players are supposed to be green and the other blue. right now they are both blue.

yeah, TNT is a GREAT programming language, it works perfect for me since i'm only eleven years old,

Great game,
Stephen

01-07-2005 01:20

Posted by:
JAS

Click Here to Email JAS   Find more posts by JAS

The original game that used that source code had a grey player and a red one. Now they are supposed to be blue and green - which wasn't working properly.

I see what you mean now. Obviously, I didn't have time to test this game... I fixed the left player. He is supposed to be green. I also changed his animation which was backwards... He also appears in light and disappears in shadows now.

I'll change the winner screens to say blue and green tomorrow.

Thanks for finding these bugs. I really should have played it at least once before releasing.... grrr...

01-07-2005 04:38

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

nice

it's a pretty cool game idea, and I want to try it on a network soon ( I've got 2 old macs, hehe ). But why do you use hardware graphics mode? Because I'm using a g3 with only 4 MB graphics it's impossible to play... So I changed to "normal" graphics mode and it can run @ 20-25 fps now, it's better but still slow. Maybe I could change the variables a bit...

I didn't look at the code at all for now, but I'm very interested in code for network gaming... and I'm wondering if it's possible to make any game compatible to gameranger (www.gameranger.com), because it's hard to find any players by emailing/forum posting.

To the game:
-I'd like it if the players could fade out if they're going out of the light, and it looks too "unrealistic" this way IMHO. (well, who says arcade games are realistic? ;-)

-Maybe you could change the game code so it works well on older computers, this would be possible if you calculate the fps manually and adjust the speed =)

-Really good game for a programm written in 3 days. Nice, huh! :o)
Some more players (don't know, maybe 8) would be a greeeeaaat game feature.

and @ stephen: wow, only 11 years old! Not bad, I also started when I was 11 years old. You must be good at school, aren't you? And I thought I'm the youngest forum user here... :-)

And don't hurt me for my english, it's NOT my first language, so spelling/other mistakes may happen.

-ibd

01-07-2005 18:10

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

OOPS

I just tested the game on a LAN... bad news: it doesn't work :-(

On one mac I started the compiled version and on one I ran hieroglyph and TNT basic. I was able to host on one mac and to join with the other. After the game started, we were both the blue player. the green player was unmoveable. I don't know where the bug(s) is(are), I STILL didn't look at the code...

Hope you can fix this, would be great.

-ibd

01-07-2005 20:52

Posted by:
JAS

Click Here to Email JAS   Find more posts by JAS

Silly me to think that I could not test and just post it. :)

I have fixed all the network bugs except one that I can't friggin' wrap my brain around. It's the fact that the lights somehow don't sync between the host and the joining player.

I also started changing the red an grey graphics to blue and green. While on the subject of graphics I laughably just realized that I didn't color/shade/detail the laps. I thought it was pretty damn hilarious that I've looked at the game 800 times and never realized the damn lights.

If one was so inclined (maybe I'll do it later) I could change the transparency level according to range from lights.

It would be easy to make more than one player if I was to change host player code to a bunch of arrays. I might do that once all the bugs are gone.

01-07-2005 22:14

Posted by:
Stephen Lund

Location:
Michigan USA

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

Thanks.

Thanks, what got me in to programming was my older brother who is 15 and me started programming with TNT then swiched to RealBasic, so I decided to started programming with TNT.

The game just keeps getting better,
Thanks,
Stephen

01-07-2005 22:16

Posted by:
Stephen Lund

Location:
Michigan USA

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

I ment to say He instead of Me:)

01-08-2005 07:45

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

Still doesn't work :~(

It's not working... We're still both the blue player...

The link for the updated version is still the same, right?

Hope you can fix the network playing.

-ibd

01-08-2005 17:21

Posted by:
Stephen Lund

Location:
Michigan USA

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

Weird

Thats weird I downloaded it and it worked One player is blue and the other is green,

Stephen

01-09-2005 12:15

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

:-)

I played on a network, on non-network mode it works fine.

I used the source code 2 times (once on every mac).

01-21-2005 20:46

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

So...?

Any progress yet? Did you try to fix the bug, any news?

I'm still interested in this example.

-IBD

01-22-2005 03:56

Posted by:
JAS

Click Here to Email JAS   Find more posts by JAS

I have been experimenting with all kinds of stuff, but I haven't tried fixing that "random" bug thing. I tried the only 3 ideas that I could think of. Something will come up, but if anyone has any ideas... you know... I wouldn't mind... HEHE

I could easily arrange it, so it's not random, but still changes, but I really like the idea of it always changing - unpredictably.

I'll try not to take too long fixing it.

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.