
google-highly-open-participation-psf - issue #333
Extend Game Baker demo game to a fully playable game
Game Baker is a graphical game development system.
http://code.google.com/p/game-baker/
We would like you to extend our pong demo to a fully playable game. Currently the game is rather easy to play to say the least.
The demo is in our SVN under demos/test2-pong.py (or you can download the svn snapshot from the project homepage).
Once you have run this script a file "testgame.gb" will be created, which you can open from the main gui ("gamebaker.py"). for this project you may either modify the .gb file from the GUI or the file test2-pong.py, which creates the demo from python.
You may find our python scripting reference useful:
http://code.google.com/p/game-baker/wiki/PythonScripting
n.b. - each game object has a "workstate", which contains all of the object's event handlers.
Completion: - deflect the ball depending on the speed of the paddle. - make the computer's paddle try to follow the position of the ball (not too well or the player can't win!). - enter any bugs or feature ideas in our issue tracking system. - submit your .gb or .py file attached to this issue - write up a tutorial on how your event code works. - give game-baker permission to release your code under both the GPL and LGPL
(This task sounds like a lot, but the entire game is currently about 40 lines of scripted python event handlers, so it shouldn't be too hard.)
Task duration: please complete this task within 5 days (120 hours) of claiming it.
Comment #1
Posted on Jan 17, 2008 by Happy HorseI claim this task.
Sounds like fun, coding tasks are my favorite.
Comment #2
Posted on Jan 19, 2008 by Helpful KangarooThis task is due January 22, 2008 21:45:00 UTC
Comment #3
Posted on Jan 19, 2008 by Helpful Lionsorry, for some reason I didn't get an email although I had starred this. If you have any questions about what to do contact me through the mailing list.
Comment #4
Posted on Jan 23, 2008 by Happy HorseHere's my result, I expect it's complete, but if it needs anything just let me know.
test2-pong is (obviously?) the demo code, and notes.txt is the notes on the (main) changes I made (I made some minor changes, mostly involving some finicky placement).
I also submitted issue 33 for game-baker. I ran into that while working, but I'm not entirely sure what the cause could be. It may not even be a bug, but I didn't see any errors in my code.
In addition, it took a bit of thinking to realize how I could handle the player holding a key and having the paddle respond to that held key. Maybe something to that effect could be added to the docs?
At any rate, enjoy!
- test2-pong.py 4.27KB
- notes.txt 1.37KB
Comment #5
Posted on Jan 23, 2008 by Helpful LionThanks, it's definitely nearly there, and the opposition is playing well.
two bugs that need fixing: - the ball/bat pivot is the top of the paddle (you always add a positive y velocity) - if you get a negative score (by losing) the computer goes in the wrong direction.
Everything else is done. As soon as these bugs are done I'll mark the task complete and add it to our svn as the second half of the pong tutorial (I'll add to your tutorial on our wiki as we'll be explaining python for beginners along with the game logic)
also, out of interest, how did you expect the key input to work, and why did you expect it to work like that (have you used another system that made you expect that?)
Thank you for the bug report, Have not had time to confirm it yet, but it's definitely interesting. We haven't had people trying to use lambda within an event before, so we hadn't seen it.
Comment #6
Posted on Jan 23, 2008 by Happy HorseHere's a version with both mentioned things fixed. The computer now has a minimum speed, and reflection is fixed upon ball/bat collision.
For the key input system, I guess I expected it to handle held keys more easily. The only game programming I had ever done before this was in Z80 assembly, which is a totally different system (direct access to keyboard hardware, anyone?). Given that your target audience is kids, I think a note about this is in order (you can't expect a user to know such things, or to come up with the solution as quickly as I did).
I'll have to attach the final result to a message on the mailing list, since it seems I've exceeded my storage quota for issue attachments. Subject line will be "Issue 333 complete".
Comment #7
Posted on Jan 23, 2008 by Helpful Liongreat, task complete
Status: Completed
Labels:
games
documentation
coding
thirdparty
Due-20080122.2145
ClaimedBy-taricorp
outreach