|
|
| [Community Project] AMGC2 |
|
miran
Member #2,407
June 2002
|
Quote:
I discarded the idea of a central server distributing network packets, as : Yeah, you're right. There would be no problem for turn based games like chess for example, but I can imagine you'd want to make real time action games too. Here's what I propose: - Each game can say whether it is a peer-to-peer client/server kind of application or a simple client that will use the central server. - If the game is a p2p game: When creating a game, the one hosting it will leave his IP on the central server for others to see, and the one(s) joining a game will connect to that IP. Then all communication will go directly from peer to peer. The amgc2.exe program will just make sure everyone gets all messages and all that but ultimately the game dll will be responsible for handling all sorts of different situations, in-game chat, etc. - If the game is a simple client: The one creating a game will just allocate a channel on the central server and anyone will be able to join. Then everybody in a given channel will communicate by sending messages to the central server and it will take care of all the little details. Quote: edit Now I think I see a possible plugin-safe implementation: a key bringing down the full amgc2 box with history as a pop-up over the game
Hehe, I'm way ahead of you here... -- |
|
Audric
Member #907
January 2001
|
Blockman v1.02
Probably last version, unless somebody spots a bug. Now making room to work on MMOP...(Massively Multiplayer Online Pong) |
|
miran
Member #2,407
June 2002
|
Quote: Now making room to work on MMOP...(Massively Multiplayer Online Pong)
Hehe, Massively Multiplayer Online Pong Btw, the net enabled version is still quite a few days away... -- |
|
Audric
Member #907
January 2001
|
While waiting for network news, some suggestions: - have the "High score" dialog initialized with the current player name - so the player only has to press enter. Or silently (no dialog box) record the name, after all. - readme.txt reader |
|
juvinious
Member #5,145
October 2004
|
|
miran
Member #2,407
June 2002
|
Quote: - provide a char *gamepath or something in the IGame class, containing the directory where the game was found. Right now, a game runs in amgc2's path, and can only guess which directory in "games/" contains its data. Yeah, that's a good idea. I think I'll add a second version of IGame::Init() that will get the game's directory as a paramater and deprecate the original one. Quote: - have the "High score" dialog initialized with the current player name - so the player only has to press enter. Or silently (no dialog box) record the name, after all. Another good point. I think I'll just store the most recently entered player name somewhere and initialize the "enter your name" dialog with that. Quote: - readme.txt reader Not sure what you mean. A box that displays a game's readme.txt if one exists? Quote:
It would be nice if all the games listed on here would actually include a makefile like the template that Miran provided. Might be because of different includes. At first template.cpp (and all my games) included "../IGame.h" because the source was located in 'src/games'. But now that each game gets its own directory where source is also placed, they're supposed to include <IGame.h> and the include directory where IGame.h is located should be specified somewhere, e.g. with the -I gcc switch. -- |
|
juvinious
Member #5,145
October 2004
|
Still doesn't explain the missing makefiles. [edit] Heres what it spits out:
__________________________________________ |
|
Audric
Member #907
January 2001
|
miran said: IGame::Init() that will get the game's directory as a parameter :/ All the IGame functions might need this information at some point, (except possibly Draw()). readme.txt: I was thinking, a char * IGame::GetReadme() like the existing char * IGame::GetIcon(). If it is derived to returns the name of an existing file, amgc can display a button which opens a large text-box (with scrollbar!) to show this text file: right place to put version info, credits, compatibility & compilation info. Makefile: mea culpa |
|
Evert
Member #794
November 2000
|
Quote: I don't know what to do to get chess to work.
One types `make' Quote: It's a mess with all this depend.sh stuff..... You don't need to run it; I ran make depend before building up the archive. Quote:
g++ -Wall -Winline -Wno-deprecated-declarations -O -g -pipe -fPIC -I../../src/ -I include -c -o obj/unix/sbr.o src/misc/sbr.c
That's weird though. Your version of gcc doesn't seem to like functions that are declared extern inline. What version of gcc are you using? Also, use gcc instead of g++. It's all C code (except for the interface) and should be compiled as such. gcc will automatically use the proper compiler for the source file you're compiling (g++ is convenient at the linking stage, but even then it's not nescessary). |
|
juvinious
Member #5,145
October 2004
|
Quote: That's weird though. Your version of gcc doesn't seem to like functions that are declared extern inline. What version of gcc are you using? Also, use gcc instead of g++. It's all C code......
Ok changed CC to gcc in the Makefile and that worked fine. __________________________________________ |
|
miran
Member #2,407
June 2002
|
Quote: All the IGame functions might need this information at some point, (except possibly Draw()). Init() is always called on game start so if you need the path, you will be able to make your own copy in that function... Quote: readme.txt: I was thinking, a char * IGame::GetReadme() like the existing char * IGame::GetIcon(). If it is derived to returns the name of an existing file, amgc can display a button which opens a large text-box (with scrollbar!) to show this text file: right place to put version info, credits, compatibility & compilation info. Well, I would actually hardcode that to readme.txt. That's the standard name for a readme and I see no reason why anyone would want it otherwise. Actually I could do the same for the icon too (I could assume icon.bmp or icon.tga). The only reason there is a GetIcon() function is because in the first version all games were in the same directory. Juvinious: Evert's makefile worked for me first time... EDIT: No, wait, I had to change gcc to g++. In other news, the chatroom already works. We're now getting pretty close to being able to actually play games -- |
|
Evert
Member #794
November 2000
|
Quote:
Now it just takes forever for the computer to compute it's next move. Actually, it only takes ten seconds. But it feels like it takes forever because it doesn't show any progress and you cannot move the mouse. I'll tweak the makefile to use g++ in Windows, if that works there, and just use gcc otherwise (which as far as I can tell should work either way, but whatever). |
|
CGamesPlay
Member #2,559
July 2002
|
Oh my, I saw "AMGC2" and thought it was some obscure package I didn't know about and didn't bother reading "Community Project". I'm here now though, so it's okay. You really should have PMed me or something One of the things I would like to do especially is add the capacity to run non-managed programs also, so the program has minigames and main games. Then I want to assemble the best Allegro games and make a CD. -- Ryan Patterson - <http://cgamesplay.com/> |
|
miran
Member #2,407
June 2002
|
Quote:
You really should have PMed me or something
I know, but you seemed so busy with other stuff I didn't want to bother you Quote: I'm going to have a look at the source now, and check it out. Someone want to sum up the key points in this thread? I only read the first 50 or so posts (I know up to miran made Linux go). Things work on Windows and Linux, a few games were posted (some very good too, there are 11 in total so far), latest version is v2.08 and network support is being added as I speak. Quote: One of the things I would like to do especially is add the capacity to run non-managed programs also, so the program has minigames and main games. Then I want to assemble the best Allegro games and make a CD.
Heh, that's actually something I already made a while ago. Didn't really finish it or anything though... -- |
|
CGamesPlay
Member #2,559
July 2002
|
Linux works, but the games' Makefiles try to construct DLLs cgames@ryan ~/projects/amgc2/games/tetris $ make g++ -o tetris.dll tetris.cpp -shared -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -s -W -Wall -I../../src/ -lalleg tetris.cpp: In member function `virtual int Tetris::Logic(int*, int*, float)': tetris.cpp:175: warning: unused parameter `int*mouse' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '--enable-auto-import' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make: *** [win] Error 1
-- Ryan Patterson - <http://cgamesplay.com/> |
|
miran
Member #2,407
June 2002
|
Yeah, my bad. Try "make linux". I should check for some global environment variable in the makefiles I suppose... -- |
|
CGamesPlay
Member #2,559
July 2002
|
That worked, thanks. Okay, so what networking will there be? I think the first thing should be a high-score server. As a requirement, some sort of binary-checking would be required. Not for security purposes, just for making sure a game isn't modified and the old high scores are impossible to beat now. Is there already a better plan for managing this? -- Ryan Patterson - <http://cgamesplay.com/> |
|
juvinious
Member #5,145
October 2004
|
Quote:
Actually, it only takes ten seconds. But it feels like it takes forever because it doesn't show any progress and you cannot move the mouse.
Yeah feels strange that's all..... Quote: One of the things I would like to do especially is add the capacity to run non-managed programs also, so the program has minigames and main games. Then I want to assemble the best Allegro games and make a CD. If amgc2 gets to the point to have enough games and allows for non-managed games I'd put in the work for creating a livecd. Something similar to AdvanceCD which works pretty well. __________________________________________ |
|
Audric
Member #907
January 2001
|
Quote: Okay, so what networking will there be? I think the first thing should be a high-score server. (...) some sort of binary-checking would be required. Uhh.. won't be easy to compare the Windows build with the Linux build... "Securing" the high score and multiplayer means freezing the game version, making a last build of the binaries on every platform, labelling them as the only kosher ones for online play. IMO this hinders development time, and should happen only after game is coded, tested, played, fixed, re-played etc. "CD compilation" : |
|
CGamesPlay
Member #2,559
July 2002
|
Now read the next sentence: Quote: Not for security purposes, just for making sure a game isn't modified and the old high scores are impossible to beat now.
-- Ryan Patterson - <http://cgamesplay.com/> |
|
miran
Member #2,407
June 2002
|
Quote: Okay, so what networking will there be? There will be a central server with a chatroom where games can be arranged. Then you'll be able to start and register a game, you will be able to list active games and join one. All messages will be sent through this server. This will be most useful for turn based games where only a message or two are sent every now and then. The host program will take care of things like connecting, disconnecting, chat, filtering messages, etc. Parallel to that the API for a more direct approach will be available. If a game declares it doesn't want to use the services of the server, the host program won't interfere and will let the game do all the networking stuff on its own. The person hosting such a game will create a server, register it with the central server and wait for clients to connect directly to him. The game (in both server and client mode) will then have to do the low level net stuff like handling connections, routing and filtering messages and so on... Quote: I think the first thing should be a high-score server. We haven't really discussed that yet but I think it shouldn't be a problem. It's going to be the game's responsibility to make sure scores aren't too different between version, although ultimately we can still manually clear the tables if there's a need for that... -- |
|
Evert
Member #794
November 2000
|
Quote: I'm running linux btw.
That was clear from the compiler output (obj/unix/sbr.o) @miran: if you need to automagically detect Windows or *NIX, have a look at my Makefile. That should work most of the time. |
|
juvinious
Member #5,145
October 2004
|
Quote: I'll tweak the makefile to use g++ in Windows, if that works there, and just use gcc otherwise (which as far as I can tell should work either way, but whatever).
I was thinking you were referring to me. __________________________________________ |
|
Evert
Member #794
November 2000
|
My original makefile used gcc, but miran changed it to g++ because apparently calling gcc doesn't link properly in Windows. I don't really understand why. Come to think of it, I probably never even ran my chess programme in Windows myself... |
|
umperio
Member #3,474
April 2003
|
Duck Hunter: no new version sorry, I just added the makefile as someone asked (sorry but I usually use Dev-C++ for developing and tend to forget about makefiles) and changed the icon to be icon.bmp read if Miran wants to go on this direction. http://elvenprogrammer.themanaworld.org/files/duckhunter.tar.gz 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. http://elvenprogrammer.themanaworld.org/files/numbers.tar.gz |
|
|
|