General Development

Python - starting out game designer - need direction – NetCog

NetCog

Member

Posts: 149
From:
Registered: 06-15-2006
It's general and it's development.

Here's the deal. I like games, would like to learn to create them. I have interests in storyline, coding, and the graphics.
I've done generic photoshop / gimping - with some pretty neat results not all of which are accidental .
I've had some graphic design schooling.
I've had some C++ and VB6.0 experience (4-5 years ago). Recently worked with Python making a small file creation program and own Learning Python by Orielly.

I got here via Bible Dave's entry on www.sourceforge.net in trying to find some Python project that I might be able to join or contribute to learn Python. My experience w/ Crystal Reports and SQL says you learn better when you have a problem than trying to start from scratch.

So...does anyone know of some python projects willing to take on a nearly bare bones newbie? Or barring that...anyone have ideas on where to start - what I need to do to start my own game? Because even after reading some articles on game development...I haven't a clue.

Danke.

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
Hi NetCog, welcome to CCN!
I am glad to give you advice on this. Now since you don't know how to get started on game making you are just like all of us at first, well if not like all at least like I used to be. What I suggest is that you start by writing a simple application instead of a game first. Maybe an application that asks your name and prints it to console. Or have you gone past that step already?


In Christ,
Jari.

------------------
2Co 7:10 For godly sorrow worketh repentance to salvation not to be repented of: but the sorrow of the world worketh death.

[VoHW] (Help needed) [Blog] - Truedisciple (mp3)

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hi, Netcog! Welcome to CCN!

I might have just the thing for you. At this year's CGDC, I gave a workshop on using Python to develop simple games. I developed a simple game called "Idol SMASH" where you run and jump around the screen and smash idol thingies. It's a very barebones game that I intended to be a jumping-off point where people could learn to create games in Python.

You can find my presentation and all of the source code files here.

If you have any questions regarding any of it, feel free to e-mail me. My address is hanclinto at gmail dot com.

Cheers!

Respectfully,
clint

[This message has been edited by HanClinto (edited June 16, 2006).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
you can help me on my game i have been working on... it's motion detection in Python using Pygame, PIL, and VideoCapture. the motion is already set up, using a module i found. but i need to work on making graphics that the motion controls. i haven't been able to work on it lately, just (half an hour ago, 'bout) got home from church camp... it was very very awesome... i'll talk about it later, but that's off topic. so i would need somebody to help me code the graphics and/or make them, i can make them also (i love gimp =D) somewaht. pardon my spelling/capitalization, in a hurry =D

------------------
WARNING:

RADIOACTIVE IE AHEAD!
--------------------
#include <spazz.h>

int name()
{
char name['B','u','d','d','B','o''y']

NetCog

Member

Posts: 149
From:
Registered: 06-15-2006
Well I've done a small stand alone application (still has the command shell running in the background though). It's a "Work Order Request" program. It takes your name and your location then allows you to fill in the details of the request. It takes that data and creates a text file in a location specifically coded into the program using the location and the date of submission as its file name.

jari, do you have another idea for another small app? I've got a pile of handwritten notes I need to get through and I've been thinking about fleshing out my Work Order Request app into something I can use there. Otherwise I need to use notepad and go through the hassle of changing save locations and coming up w/ unique file names.

hanclinto, I'll definately check out that game.

buddboy, can you tell me a little more about what your doing? A site perhaps or a project page? [edit] Ah found the thread: http://www.christiancoders.com/ubb/Forum3/HTML/000318.html [/edit]
Your post sounds like you're needing someone to code graphics....which sounds waaaay above me at this point, but maybe it's easier than I think.


[edit]I just took a look at the CGDC...barring serious life changes and unplanned appointments I am definately going to be planning on what I can do to make that next conference. Even if I still don't know much by then, it sounds awesome and a great learning experience. Especially for that kind of cost...wow....


p.s. how do you run idolsmash?

[This message has been edited by NetCog (edited June 18, 2006).]

[This message has been edited by NetCog (edited June 18, 2006).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
yes, i do... but IdolSMASH has graphics, and that looks pretty easy to code. plus i'll be learning how to do it at the same time as you, so we'll be at the same level (somewhat).

To run Idol SMASH click the .bat named start1 or something like that. there are up to 11 of them, each uses a corresponding code file that improves on the other one. so after running start1, do start2, but after you read the source (if you want to).

------------------
WARNING:

RADIOACTIVE IE AHEAD!
--------------------
#include <spazz.h>

int name()
{
char name['B','u','d','d','B','o''y']

NetCog

Member

Posts: 149
From:
Registered: 06-15-2006
After a couple days reading the results from searching "game engine" on this site and reading the links given I've realized I need to start small, especially if I don't want to use cut and paste. So...to have something online I can reference I'll start my ideas (or journal) here if that's okay.


Since I need to start simple I'm going to start with "Ants" (or some other name later)
I guess 2d is simpler than 3d and it will only have one "level", one character and one "act" to start.


I need to send an ant up to a wall, press a key (action), have a "boulder" appear and the ant takes the rock back to the starting position.

[u]Graphics[/u]
Will need a wall, a sky, a floor, a rock, and an ant. I can do display no problem.

[u]Code[/u]
I guess I can look at idolsmash on how to get started. I don't want to make a picture disappear, but I do want it to appear. The only difference is making the rock stay with the sprite as it moves. That could be done with a picture change...but I'd eventually want to make two images "linked" right?

Which means if my ant is 10 pixels high, I'll need to make the actual ant image 20-25 pixels high to accommodate the boulder appearing.


Please add your 2 (or 5) cents.


NetCog

Member

Posts: 149
From:
Registered: 06-15-2006
HanClinto - is there anyway to learn what is going on in your idolsmash game as far as what the different commands are doing?

stuff like : def player_loop(g,s)
and: dx,dw = 0,0

those are just two of many examples....it's one thing to rewrite/copy and then go experiment with your own values....it's another to know what the heck is going on...

thanks

[This message has been edited by NetCog (edited June 21, 2006).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hey Netcog!

Sorry for not commenting my code enough -- I put a fair number of overview comments in there, but looking back, I see I didn't put in too many implementation comments.

Here's a small section from sdrn_5.py that I've added more comments to for you just now:


def player_loop(g,s): # This line defines a new function called player_loop that takes two parameters, g (which is the tilevid) and s (which is the player)

keys = pygame.key.get_pressed() # This gets the current keys that are pressed by the player and stores it in the array keys

dx,dy = 0,0 # Create two variables (dx and dy) and assign 0 to each of them. These variables will keep track of how much we're moving this frame in the x direction and how much we're moving this frame in the y direction.

# These next 4 lines check to see which keys are pressed and adjusts the values of dx and dy accordingly.
if keys[K_UP]: dy-=1
if keys[K_DOWN]: dy+=1
if keys[K_LEFT]: dx-=1
if keys[K_RIGHT]: dx+=1

# These next two lines use the values in dx and dy, and adjust the x and y values of your sprite (s) according to how much they're supposed to change this frame. To make the player move faster, we multiply the dx and dy values by 5 to make them change the position more.
s.rect.x += dx*5
s.rect.y += dy*5


Does that small section help? I'm sure there are probably more things, but I hope that at least gives you a start.

If you are wanting to learn the basics of Python, the book that I recommend to people is called How to Think Like a Computer Scientist: Learning with Python -- it's completely free, and you can download it in pdf, html or other formats. I have a printed and bound copy sitting on my desk at work -- it's fantastic for learning Python.

I hope that helps! Please let me know how I can help you more.

In Christ,
clint

[This message has been edited by HanClinto (edited June 22, 2006).]

D-SIPL

Moderator

Posts: 1345
From: Maesteg, Wales
Registered: 07-21-2001
I remember reading that a while back, i found it a lot better then Diving into Python or whatever it was called

------------------
"One World. One Web. One Program." -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" -Adolf Hitler
"I believe in freedom... not freedom like America, freedom like a shopping cart"

NetCog

Member

Posts: 149
From:
Registered: 06-15-2006
Thanks for the additional comments and the book suggestion. Yea, those comments did help explain some stuff as I just sit here reading it (I don't have the code up atm). And I'll definately check out that book, I've seen it around but now I've got the "well primed" so to speak.