Unofficial Father - Son Team
I am a non-programmer marketing consultant that is working with my teen age son to develop very simple video games. It is a form of bonding. My son is in middle school in California and enjoys FPS games. Over the weekend, we started working on a simple game. I am not registering us as an official PyWeek entry since we are pretty novice at programming and do not have enough time to work on this for a week. I am also not sure I am following all the rules.However, I wanted to thank the people that are participating in the challenge. I enjoy reading about the projects. It is a great way to learn new techniques and feel a sense of community.
My rudimentary concept is to use actual digital photographs to provide a scrolling of a view from up/down/left right. We are using a panoramic 360 view image and repeating it when the viewpoint gets to the edge.
We are using a Logitech RumblePad as the only way to interface with the game. It seems similar to the XBox 360 controller that my son likes.
I can see how this could easily fit into the theme of "One Way Trip," perhaps using actual photographs of things to hit that are sprinkled around the playing field.
http://pychildren.blogspot.com/2012/09/scrolling.html
The primary development platform is ubuntu Linux with gimp, audacity, and komodo edit for my son. I am using emacs. Right now, we are only using Python and Pygame, no other libraries. I hope to share some updates this week and participate in the community. After our session last night, we have sound working as well as different images for the gun position, planes are flying as targets with collision detection on the bullets.
I do not know very much about programming, but I wanted to thank the people for organizing this event and for the participants for sharing their stories and information.
(log in to comment)
Comments
Last night, I got the following working: 1) scoring; 2) GAME OVER screen; 3) timer delay on graphics of firing gun.
GAME OVER
I am using pygame and have created two loops inside of the main while loop.
gameOver = False
while True: # main game loop
if not gameOver:
main code of game
elif gameOver:
display GAMEOVER screen with scores
check for playagain
My question is whether this is the normal way to do things. Previously, I would end the game, break out of the main loop and then drop into a screen that displayed the final screen.
TImer Delay
I don't really know how to use pygame.time. I have a series of graphics showing a gun in "firing blast" position for 500 milliseconds. After this,it changes back to "ready" position which is lower on the screen with no explosion graphic. To get the delay, I am using python.time.time()
Example:
action_start_time = python.time.time()
if gun is in fired position:
elapsed_time = action_start_time - python.time.time()
I wonder if there is a better way to do this.
I look forward to reading about other peoples' games every day and hope to post a graphic of our game progress tonight or tomorrow.
while True:
gameOver = False
while not gameOver:
main code of the game
display GAMEOVER screen
if not playing again: break
As for timing in pygame, use a pygame.time.Clock.
I will try and use pygame.time.Clock()
Maybe it is like this?
gun_timer = pygame.time.Clock()
gun_start = gun_timer.get_time()
if gun is in firing position:
elapsed_time = gun_start - gun_timer.get_time()
Or, maybe I am misunderstanding something basic?
Well, I will push on and keep learning.
Thank you and have a nice evening.
I have a prologue, main game, and an epilogue (game over). Ideally, the main game would have three acts, with the first a shooter, the second a search and the third a puzzle. The one way trip, being that of the soldier either dying or finding life with his friends. I only have the first act working, the shooter.
I redid the shooter without scene scrolling because I felt that the scene scrolling actually detracted from the game at the simple level I had it at. The enemies are created from objects with basic perspective changes for both speed and distance. I can easily add in dozens of enemies as the difficulty increases. Right now, it is not smooth scaling and I do not have z-axis projection. I do not think I will use 3D projection because it looks good-enough with just a simple algorithm to alter speed and size. I only have explosion sounds right now, but I think I will add in gunfire soon. The only way to control the gun is with a joystick. The game controls are built for a Logitech rumblepad.
I am interested in using digital photographs in games since I enjoy playing a fishing game that uses actual fish pictures. I like the effect of digital photographs since it makes the activity more real.
Here are some screenshots from the game. I'll keep on participating in the discussions since it is fun to see the other games and I am learning new things multiple times day.
I have legitimate access to a royalty-free image library that grants me rights to incorporate the images into artwork, games, or marketing material for redistribution. I usually only use these images for PowerPoints and blogs, but I am having fun looking for some images for use in games. I am struggling to learn to use GIMP and Inkscape. This struggle is part of the fun.
Last night, I spent another hour learning about mixer channels. Previously, I was using the simple Sound.play() technique for all my sounds.
I am also thinking of trying for smoother perspective scaling of the planes and using better graphics. I have a SVG sheet of planes and war objects that I may try to use.
Any pyweek is like DF, losing is fun.
Not sure how much time I will have since tonight is family movie night and my son has a soccer game tomorrow. He was supposed to help me as a lesson for him, but he's quite busy with sports. he's actually at the field right now preparing for the soccer match when he should be getting the keyboard input to work.
Mat on 2012/09/10 21:05:
Hi, welcome to pyweek!Sounds like you're doing great for a first entry - hope you decide to enter next time :)