Page 2 of 2

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Thu Jan 26, 2012 8:36 am
by extremalyfresh
The thing is I don't use save/load files except the GE main menu option. It is very simple example so I don't think it's lack of memory and it happens after second try to watch my game. On the first attempt it always works fine.

I'm sorry for all the problems. Anyway I still hope you can work it out :-).

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Thu Jan 26, 2012 8:48 pm
by SuperSonic
extremalyfresh wrote:The thing is I don't use save/load files except the GE main menu option. It is very simple example so I don't think it's lack of memory and it happens after second try to watch my game. On the first attempt it always works fine.

I don't know then. I'm sorry :(

extremalyfresh wrote:I'm sorry for all the problems. Anyway I still hope you can work it out :-).

No problem. I enjoy doing stuff like this anyways. I'll have more time to work on this on the weekend. :D
I was planning on having it done earlier though =/

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Fri Jan 27, 2012 6:13 pm
by SuperSonic
Ok, the bugs are fixed, and I got the times to get stored correctly. But my code only stores the number of milliseconds for each lap so I'm going to add on to it so that it stores hours mins etc. It's almost done :D

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Fri Jan 27, 2012 8:44 pm
by extremalyfresh
That sounds great :-). I'm focused on other aspects now because I couldn't fixed GE crashes. I have no idea which part of code is responsible for that but it happens only on that one example and other geds work fine. I hope that with your help all that staff will start to work :-).

Edit: Ok, I'm a bit stubborn so I couldn't just give up and I found who's guilty :-).

sprintf(Laps[i], "%i:%i:%i:%i", l0, l1, l2, l3);

That's the code. I have no idea what is wrong with it but after removing it the ged works perfect.

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Sat Jan 28, 2012 12:26 am
by SuperSonic
Hmmm, why are there l's before the numbers? Try removing those :)

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Sat Jan 28, 2012 9:48 am
by extremalyfresh
l0-l3 are temporary variables storing hours, minutes, seconds, milliseconds at the moment of collision with finish_line actor. Should I name them in different way?

I have another problem with moving cars when I try to add pit stop option. The movement code seems to ignore some "check" actor clones, especially the check.2 one since the 2nd lap. It ignores the pit stop checks on the 1st lap too. It looks like there is something wrong with if statements in actor car draw event.

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Sat Jan 28, 2012 2:45 pm
by SuperSonic
I'm not sure what's wrong with your code. However, you could try removing the check_count code from your car's draw actor event and move it to check's collision event. I don't know if that would work or not but it might :)

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Wed Feb 01, 2012 3:22 am
by SuperSonic
Ok, here's my demo of saving laptimes. Hope you find it useful. If you need me to explain any of it, just ask :wink:
http://www.mediafire.com/download.php?pbrn786dxq3tpdt

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Wed Feb 01, 2012 8:44 pm
by extremalyfresh
Thanks for that. I will take a closer look at it around Friday. For now I found that the program displays laptimes around 4 secs shorter than my clock so probably there is some error :-). But for sure it will be useful for me :-). Thanks again.

Here is +1 for your effort :-).

Re: laptimes/splitimes, moving cars in racing management gam

PostPosted: Wed Feb 01, 2012 9:29 pm
by SuperSonic
extremalyfresh wrote:Thanks for that. I will take a closer look at it around Friday. For now I found that the program displays laptimes around 4 secs shorter than my clock so probably there is some error :-). But for sure it will be useful for me :-). Thanks again.

No problem. Sorry about the bug. I don't know what's wrong =P
extremalyfresh wrote:Here is +1 for your effort :-).

Haha, extremalyfresh is handing out extremaly fresh points xD sorry, I'm randomly silly sometimes :P