Jump to content
  • Advertisement
Sign in to follow this  
EdinsonC

Having trouble with a game im trying to work on

This topic is 1587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The game is scripted in python 3 and isn't much of a game yet but i've already ran into some trouble.

It is most probably something very simple, but i can't seem to wrap my head around it.

 

Here's the source code: http://www.mediafire.com/view/bzkw3hkncufnb7o/Catch.py

 

Now i'll tell you what the source code is supposed to do and what it doesn't:
 

The code is supposed to store "boards" for different levels in a list so that i can later fetch those boards when needed.

The fist function defined if "fetchNewBoard" which i would call whenever the levels change.

This function is supposed to check what level the player is up to and depending on that give the according "board" and stats (such as the edges of the board and stuff because some boards will be bigger.)

Then the "board" is returned as the "gameBoard" which is printed to the screen in the "showBoard" function.

 

It seems the code works fine, it prints the board to the screen (but not the players), however the players are given a random role and all, but i messed around a bit (bad idea) and i messed it up even more, now when i give input to move a player the game changes their roles LOL. 

 

The problem is definitely above line 78 and i think the main problem i'm having is the board not updating right. Before attempting to implement this idea of the "fetchNewLevel" function i had the game playing smoothly with everything working as it was supposed to. But back then i had the board printed in the "showBoad" function; like the string of the board was in the print() and not a variable. I'm guessing it's becase the variable is storing the board it got but the board inside the variable isn't being updated when the "cells" are changed (when the player changes position). However, i figured i'd get someone to help me and explain what i'm doing wrong before i mess the code up more LOL.

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement
MediaFire tries to tell me my browser is old and I should “upgrade” to the one of their choice—a scare tactic I morally appose—and I will not view the file there.

Why don’t you just post the code here if it is not too long? If it is definitely above line 78, why not post the first 78 lines?


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites

MediaFire tries to tell me my browser is old and I should “upgrade” to the one of their choice—a scare tactic I morally appose—and I will not view the file there.

Why don’t you just post the code here if it is not too long? If it is definitely above line 78, why not post the first 78 lines?


L. Spiro

You don't use adblock do you?

 

Anyway, I agree with posting it on pastebin.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!