|
Poll Result |
|
|
How good is War Pong? |
|
|
It's super! |
|
9% |
[ 1 ] |
It's a good distraction. |
|
27% |
[ 3 ] |
It's alright, but you know... |
|
18% |
[ 2 ] |
Could be better. |
|
9% |
[ 1 ] |
It's bad, but it could be worse. |
|
9% |
[ 1 ] |
This sucks! Why did you make me waste my time on it? |
|
27% |
[ 3 ] |
|
|
|
Total Votes : 11 |
|
|
|
|
|
|
Author |
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Mon Jan 29, 2007 9:55 am Post subject: |
|
|
Maybe I can get an answer to this question: does anyone play the fast mode in War Pong? I'm considering not including it (at least initially) to save time and effort. |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Fri May 04, 2007 8:30 am Post subject: |
|
|
|
|
|
|
Back to top |
|
|
|
|
Fost Pod Team
Joined: 14 Oct 2002 Posts: 3734
|
Posted: Fri May 04, 2007 8:41 am Post subject: |
|
|
Is the 'HD' part a hint that you've been contacted by Sony and Microsoft to make HD versions of the game for the console download services and soon you'll be rolling in money? |
|
|
|
Back to top |
|
|
|
|
ewerybody
Joined: 05 Sep 2006 Posts: 165 Location: Berlin
|
Posted: Fri May 04, 2007 8:54 am Post subject: |
|
|
Heaps of Dollars huh? |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Fri May 04, 2007 8:56 am Post subject: |
|
|
I wish.
If you know anyone from Sony or Microsoft, send them in my direction though .
Although... maybe War Pong would make a nice "Moonpod Arcade" game if you guys ever decide to get into casual gaming. |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Fri May 04, 2007 9:48 am Post subject: |
|
|
I just updated the blog (again) with something that I think is quite interesting. I won't tell you here, you'll have to go there (you'll be as confused as I am, hopefully).
http://warpong.sourceforge.net/blog/ |
|
|
|
Back to top |
|
|
|
|
Sorrow
Joined: 16 Jan 2004 Posts: 146 Location: Australia
|
Posted: Sat May 05, 2007 12:35 am Post subject: |
|
|
2235 downloads on the middle link . |
|
|
|
Back to top |
|
|
|
|
SethP
Joined: 24 Apr 2006 Posts: 302 Location: Connecticut, USA
|
Posted: Sat May 05, 2007 4:52 am Post subject: |
|
|
Umm, I'm being particularly stupid tonight...
Where's can we download the new War Pong HD? |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Sat May 05, 2007 11:25 am Post subject: |
|
|
SethP wrote: | Umm, I'm being particularly stupid tonight...
Where's can we download the new War Pong HD? |
Nowhere yet. For the most part it's finished, since I just have to convert the C++ version I was working on to use hi-res graphics, but that wasn't complete, so I just have to finish off a few things.
Oh, and skinning. My least favourite part, but it's done now.
In short: it shouldn't be too long, but don't hold your breath. |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Sun May 06, 2007 12:29 pm Post subject: |
|
|
Alright, I retract my statement from yesterday.
|
|
|
|
Back to top |
|
|
|
|
Rup
Joined: 19 May 2003 Posts: 363 Location: London, UK
|
Posted: Sun May 06, 2007 6:42 pm Post subject: |
|
|
That's pretty cool.
I've had a look through the source and I have got a few comments, but obviously most of these are just style, etc., so feel free to ignore me - what you've got works well!
- my biggest comment really is that you've hard-coded the screen dimensions all over the code, e.g. in the ball movement code, bat code, etc. That would make it hard to change resolution; you could instead use global constants or something to abstract this a bit.
- you don't ever remove the timers you add with install_int_ex. (But maybe Allegro handles this automatically, I don't know, or maybe they live happily between games and don't get duplicated on re-install so it doesn't matter anyway.)
- you can simplify the main menu code by using ?: conditionals, e.g. Code: | if(selection==0)
textout_centre_ex(buffer,selfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1);
else
textout_centre_ex(buffer,wpfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1); | could become Code: | textout_centre_ex(buffer,(selection == 0) ? selfont : wpfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1); | cutting down the duplicated string, position parameters, etc. On the other hand this does make the individual lines longer and is maybe less readable.
- it looks like there's no sleep or similar in the menu, pause menu and help code main loops so you're constantly refreshing the text on the screen even when it doesn't change. The danger is this may eat all the machine's CPU time when it doesn't need to. However Allegro might limit the refresh rate so this isn't a problem, I don't know Allegro.
- from an object-oriented programming point of view, a bullet object should know whether it's a player 1 bullet or a player 2 bullet. Then you'd only need a single draw and single move method for each one which does the right thing. However it's easy to go too far into pure OO and I can't think of a compelling reason to change this unless you wanted to implement a single bullet limit shared by both players rather than one limit per player. (which makes no sense.)
- you're not using the CVS repository you have on SourceForge. At the moment you probably don't need it but I'd encourage people to use source control in general; it helps when you've got several people collaborating on the same project, it's an easy place to track changes in your code, store the code for each version you release, etc. And I'd recommend SVN over CVS too.
- similarly you may want to start splitting this into more than one file, e.g. break out the bullet class definition and implementation into .h and .cpp files. But again you probably don't need this yet, the single file isn't unmanagebly big.
- I don't know if you need the use_mirror=osdn on the download links but that seems to work anyway, it redirected me to a UK mirror.
- there's a bool type in C++ that accepts true/false which you could maybe use for bullon rather than an int storing 0 and 1 - although that's pretty much how it would be implemented anyway so this doesn't matter at all.Anyhow, good job! |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Mon May 07, 2007 5:38 am Post subject: |
|
|
Rup wrote: | That's pretty cool.
I've had a look through the source and I have got a few comments, but obviously most of these are just style, etc., so feel free to ignore me - what you've got works well!
- my biggest comment really is that you've hard-coded the screen dimensions all over the code, e.g. in the ball movement code, bat code, etc. That would make it hard to change resolution; you could instead use global constants or something to abstract this a bit.
Yeah, converting from the 640x480 code I had took a while, but I'm not really trying to support multiple resolutions in the same program, so I don't consider it a problem.
- you don't ever remove the timers you add with install_int_ex. (But maybe Allegro handles this automatically, I don't know, or maybe they live happily between games and don't get duplicated on re-install so it doesn't matter anyway.)
They seem quite happy to live between games but I guess for the next version I should just start it once at the start and pause it.
- you can simplify the main menu code by using ?: conditionals, e.g. Code: | if(selection==0)
textout_centre_ex(buffer,selfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1);
else
textout_centre_ex(buffer,wpfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1); | could become Code: | textout_centre_ex(buffer,(selection == 0) ? selfont : wpfont,"SINGLE PLAYER",512,300,makecol(255,255,255),-1); | cutting down the duplicated string, position parameters, etc. On the other hand this does make the individual lines longer and is maybe less readable.
This being my first game in C++, I don't know fancy stuff like that, but I'll keep it in mind.
- it looks like there's no sleep or similar in the menu, pause menu and help code main loops so you're constantly refreshing the text on the screen even when it doesn't change. The danger is this may eat all the machine's CPU time when it doesn't need to. However Allegro might limit the refresh rate so this isn't a problem, I don't know Allegro.
Menus are my weakest point - perhaps someone can help me with that.
- from an object-oriented programming point of view, a bullet object should know whether it's a player 1 bullet or a player 2 bullet. Then you'd only need a single draw and single move method for each one which does the right thing. However it's easy to go too far into pure OO and I can't think of a compelling reason to change this unless you wanted to implement a single bullet limit shared by both players rather than one limit per player. (which makes no sense.)
I had it that way originally, but I removed it because it meant I had tons (well... tons more) of ifs during the bullet routines that run every frame.
- you're not using the CVS repository you have on SourceForge. At the moment you probably don't need it but I'd encourage people to use source control in general; it helps when you've got several people collaborating on the same project, it's an easy place to track changes in your code, store the code for each version you release, etc. And I'd recommend SVN over CVS too.
I don't really need to share code, since it's just me working on it. I suppose I should start as good practice for if I am in a situation where it is beneficial.
- similarly you may want to start splitting this into more than one file, e.g. break out the bullet class definition and implementation into .h and .cpp files. But again you probably don't need this yet, the single file isn't unmanagebly big.
There isn't all that much I can split off, and the whole thing isn't all that big, but I might in future.
- I don't know if you need the use_mirror=osdn on the download links but that seems to work anyway, it redirected me to a UK mirror.
That's the link on the project download page, and it worked for me - I got an Australian mirror, so it stays unless someone has a compelling argument otherwise.
- there's a bool type in C++ that accepts true/false which you could maybe use for bullon rather than an int storing 0 and 1 - although that's pretty much how it would be implemented anyway so this doesn't matter at all.
Maybe bool variables might take up a little less memory than an int but no significant advantages, so yeah. Anyhow, good job! | Thanks, both for being so kind and for your comments. My comments on your above points are in italics. |
|
|
|
Back to top |
|
|
|
|
SethP
Joined: 24 Apr 2006 Posts: 302 Location: Connecticut, USA
|
Posted: Mon May 07, 2007 6:26 pm Post subject: |
|
|
Very nicely done Kone -- it's even better than the first game. I'm happy to report that it's pretty easy to get it running natively under Linux thanks to allegro being a cross-platform library. A few simple changes I'd like to suggest, though:
- Gotos are bad. In the place you used it, it's not really such a big issue, but it's always possible to use some other control structure to accomplish the same effect and using gotos may get you punched in the face, or so I've heard. In your particular case, you could change the "newstarts:" line to "while(1) {" and the "goto newstarts" to "}".
- I would appreciate it if you packaged the .png files in the source zip, it's rather hard to compile from source and play the game without them.
- If you're interested in cross-platform support, the only aspect of your code that's holding that up is the naming of the pause() function as it conflicts with the standard unix pause(). Renaming it to something like pause_game() avoids the issue altogether.
The following items I can't really take credit for as gcc found them for me, but:
- On line 173, you're passing too many arguments for your format string to allegro_message(). I'm not exactly sure what's going on, but if 'allegro_error' is a string you should change the format string to "Unable to set graphics mode: %s". See this for more information about printf formatting.
- You declare mpchoice and aichoice on lines 202 and 203, but you never use them. Doesn't really make a difference (besides wasting a whopping 8 bytes of memory), but I'd recommend commenting those declarations out until you implement the feature that uses them.
|
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Tue May 08, 2007 7:38 am Post subject: |
|
|
SethP wrote: | Very nicely done Kone -- it's even better than the first game. I'm happy to report that it's pretty easy to get it running natively under Linux thanks to allegro being a cross-platform library. A few simple changes I'd like to suggest, though:
- Gotos are bad. In the place you used it, it's not really such a big issue, but it's always possible to use some other control structure to accomplish the same effect and using gotos may get you punched in the face, or so I've heard. In your particular case, you could change the "newstarts:" line to "while(1) {" and the "goto newstarts" to "}".
The BB version is full of them, so I guess old habits never completely die. Advice taken, I'll fix that.
- I would appreciate it if you packaged the .png files in the source zip, it's rather hard to compile from source and play the game without them.
Will be done as soon as I get home.
- If you're interested in cross-platform support, the only aspect of your code that's holding that up is the naming of the pause() function as it conflicts with the standard unix pause(). Renaming it to something like pause_game() avoids the issue altogether.
I'm happy to hear that it works so well on Linux! Would you mind sending a compiled version to me so I can give it to the world?
The following items I can't really take credit for as gcc found them for me, but:
- On line 173, you're passing too many arguments for your format string to allegro_message(). I'm not exactly sure what's going on, but if 'allegro_error' is a string you should change the format string to "Unable to set graphics mode: %s". See this for more information about printf formatting.
Don't blame me, I got the code from the Allegro documentation. I'll have a look at that, though.
- You declare mpchoice and aichoice on lines 202 and 203, but you never use them. Doesn't really make a difference (besides wasting a whopping 8 bytes of memory), but I'd recommend commenting those declarations out until you implement the feature that uses them.
They were used in an early iteration of the menu system and never removed. I'll remove them so people can have their precious few bytes of memory.
| Thanks! As with before, my comments in italics.
In addition to working well on Linux, is it possible someone could compile a Mac version so that more of the world may see? |
|
|
|
Back to top |
|
|
|
|
Konedima Grammar Police
Joined: 25 Oct 2003 Posts: 1068 Location: Sydney, Land of Censorship
|
Posted: Tue May 08, 2007 12:30 pm Post subject: |
|
|
Using some of your advice (thanks), I've updated War Pong HD to version 1.01. Grab it from the blog (I hope by now I don't need to remind you) or the webpage, the download links should be the same. |
|
|
|
Back to top |
|
|
|
|
|
|
|
|
|