Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [Community Project] AMGC2

This thread is locked; no one can reply to it. rss feed Print
[Community Project] AMGC2
miran
Member #2,407
June 2002

Excellent, I'll check it out as soon as I get home. :)

Btw, a new version with net play is still being worked on despite the lack of posts in this thread. The chatroom already works flawlessly and the rest is just a matter of time. :D

--
sig used to be here

Audric
Member #907
January 2001

Miran, can you tell us any primer info about how a multi-player game will interface ? If this is already planned out and not subject to change.

By the way, I looked into ENet network library, and it seems awfully undocumented, I couldn't even find a workable test program. I'm learning from documentation about sockets + UDP + TCP at the same time, which is probably not a good idea :-/
Also, I got the impression that client and server will need to dedicate a thread to network activity. -> pthreads

miran
Member #2,407
June 2002

Quote:

Numbers: no I couldn't find a better name. I was developing a turn based game for amgc2 which I would like to work over the net, but I soon got into some troubles I wasn't able to solve, so I got bored and developed this quick game (30 minutes or so, it could take less time for sure with a better skilled programmmer). I don't know even if this game has got a name, but we used to play it at school when bored, so have some fun with it.

A surprisingly fun little puzzle game. Reminds of that game where you remove pegs from the board by jumping over other pegs. But there's one problem. It doesn't seem to recognize when there are no more moves left. Or maybe I don't get the rules?

Quote:

Miran, can you tell us any primer info about how a multi-player game will interface ? If this is already planned out and not subject to change.

It's not finalized yet but the way I imagined it is like this: IGame will have two message buffers, one for incoming messages, the other for outgoing messages. The host program will push messages it receives from the server in the game's inbox so the game will be able to read and process them in the logic function. The game will push messages it wants to send in the outbox and the host program will read them and send them to the remote server.

That way the games will be completely detached from the network code. They won't even need to know they're network games!

--
sig used to be here

amarillion
Member #940
January 2001
avatar

Quote:

The host program will push messages it receives from the server in the game's inbox so the game will be able to read and process them in the logic function.

What type will the message have? char*, int, float? An idea: an AMGC_Message base class with >> and << operators for serialization. As long as you implement those operators, the message can take any form.

btw, I'm now working on Pacman v0.96.

miran
Member #2,407
June 2002

I think it will be a simple struct, probably with some functions for easy constructions. I don't want to confuse C people more than neccessary with overloaded operators and things like that...

--
sig used to be here

umperio
Member #3,474
April 2003
avatar

Quote:

A surprisingly fun little puzzle game. Reminds of that game where you remove pegs from the board by jumping over other pegs. But there's one problem. It doesn't seem to recognize when there are no more moves left. Or maybe I don't get the rules?

I'm sure I added an ending condition, but I never said it was bug-free :P
Anyway I'll check it later and try to fix it.
I'm nearly completing my third game, but I'll wait it to work with the new network support before releasing it 8-)

amarillion
Member #940
January 2001
avatar

Quote:

I don't want to confuse C people more than neccessary with overloaded operators and things like that...

You could name them fromStream and toStream instead of operator>> and operator<< if that makes people feel more warm and fuzzy inside :)

umperio
Member #3,474
April 2003
avatar

If I'm not asking too much, I'd like to add a command line option, something as "amgc2.exe 2" to start directly the second game in the list. This could be very useful when developing/testing a game. It's a feature easy enough to be added I think and would make me very happy ;)

miran
Member #2,407
June 2002

Yeah, easy to implement, so I'll add it to my todo list. :)

--
sig used to be here

Todd Cope
Member #998
November 2000
avatar

I'm working on a "Dr. Mario" clone called "Anti-Virus." I've attached the current version. I plan on updating the graphics later, for now I'm just concentrating on getting the gameplay working the way I want.

miran
Member #2,407
June 2002

Looking good so far :D I got to level 13 :)

--
sig used to be here

umperio
Member #3,474
April 2003
avatar

Hey that was fun, I never played Dr.Mario but maybe this one turns out as a good replacement :P

Todd Cope
Member #998
November 2000
avatar

Quote:

Looking good so far

Thanks :)

Quote:

maybe this one turns out as a good replacement

I tried to keep the gameplay as close to the original as possible as I really liked the original. When it's done you won't be able to tell the difference except for the graphics.

Audric
Member #907
January 2001

Todd: it's probably not intended, but you can smack a virus by rotating a pill into it. wack

Todd Cope
Member #998
November 2000
avatar

Yeah, there are a few bugs. You won't be able to do that in the next version.



Go to: