I Got Some Very Strange Problems With Variables :s


Racemaniac

Scorched GP programmer
Joined
Nov 3, 2003
Messages
587
Website
Visit site
*edit* mostly solved (see 3th post, pointer prob as a suspected ^^ )


i'm cleaning up the code of my tank game a bit, and i've come across some disturbing issues :s
for example i have a global variable turn. wheter i assign value 0 to it or not, doesn't matter, when i use it the first time it contains some random value i have got no control over, i can set the value then to 0 and it works afterwards, but that's still worrying...

even worse are my arrays, in tests i've been able to put 40 numbers into an array 20 numbers, yet now i have to make an array of 20 ints to store 6 player id's, if i make an array of 6 ints for that i get strange errors about a process not being active... WTF?????

some strange things are happening in the memory of my program, which i might understand if i was using pointers, you can do dangerous things with pointers which will indeed mess up everything, but i don't... anyone got a clue what's going on? i don't want to have random errors due to this you know...
 
things are getting worse it seems, when testing on the pc i can't close the window... (although the game itself keeps on running...)
is my pc flipping or have i done something very wrong with my program????
 
it was a pointer after all ^^
i went beyond the limits of one if my arrays...

and the closing the window issue is when i don't compile with the debugger enabled, is that normal??????
what can cause my window not to close? (perhaps the debugger adds the possibility or so?)
 
Yep, it`s the debugger disabled that prevents you from closing the window by clicking the little x. really annoying.

Your other probs are solved?
 
Quiest posted on Sep 7 2005 at 03:45 PM said:
Yep, it`s the debugger disabled that prevents you from closing the window by clicking the little x. really annoying.

Your other probs are solved?
yup, the other probs were just a stack overflow :)

but now i got a new problem :s
the collisiondetection on the gp32 is different it seems :(
that really sux, the bullet goes right trough the tanks :'(
anyone know anything about that?

okay, i now managed to bypass the problem by selecting a larger collision bitmap (3x3 pixels instead of 1x1 :) ), but it still worries me :)

well, since i was able to fix it i'll release my first playable version, no computerplayer yet ^^, but we're getting there :D
 
Last edited by a moderator:
Moogle posted on Sep 7 2005 at 08:38 PM said:
Your avatar scares me.
yeah, he runs over other people, stikes them with lightning/springs, drugs them, and wrecks other people cars :)

gotta love carmageddon :)
 
Last edited by a moderator:
Back
Top