Python game problem.

Questions about programming languages and debugging
Post Reply
User avatar
1r0l3
suck-o-fied!
suck-o-fied!
Posts: 69
Joined: 18 Jul 2009, 16:00
14

Python game problem.

Post by 1r0l3 »

Im trying to make a simple text based rpg game, like the old dos games.
but then i need an array to move around. but i cant def the array...

the game is programed in python, like the title saids. please i hope somebody can help me :).


Another thanks from 1r0l3! 8)

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

Post the code that you have. It's hard to suggest something if we don't know what your code is like.

User avatar
1r0l3
suck-o-fied!
suck-o-fied!
Posts: 69
Joined: 18 Jul 2009, 16:00
14

Post by 1r0l3 »

We want to make an array with cords x,y. so you can make a walk system. so we dont got any code.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, Maboroshi can surely help you more, but maybe this here already helps a little: http://en.wikibooks.org/wiki/Python_Programming/Arrays

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

1r0l3 wrote:We want to make an array with cords x,y. so you can make a walk system. so we dont got any code.
Just define your map as a two-dimensional array (list of lists). You can then access it using:

Code: Select all

map[x][y]

User avatar
f4Gg0t_43
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 245
Joined: 13 Sep 2008, 16:00
15
Contact:

Post by f4Gg0t_43 »

Go read a beginners python book, or at least an online tutorial before you try to write an application.

Post Reply