laptimes/splitimes, moving cars in racing management game

Non-platform specific questions.

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

Postby extremalyfresh » Thu Jan 26, 2012 8:36 am

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 :-).
Do you speak Polish? If yes here is a useful Game Editor website for you:
http://www.sgames.pl/
You can find some useful articles and examples there.
You can try and test a Quiz Game as well.
It has been made with use of Game Editor.
extremalyfresh
 
Posts: 13
Joined: Thu Dec 22, 2011 3:36 pm
Location: Poland
Score: 0 Give a positive score

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

Postby SuperSonic » Thu Jan 26, 2012 8:48 pm

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 =/
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby SuperSonic » Fri Jan 27, 2012 6:13 pm

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
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby extremalyfresh » Fri Jan 27, 2012 8:44 pm

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.
Do you speak Polish? If yes here is a useful Game Editor website for you:
http://www.sgames.pl/
You can find some useful articles and examples there.
You can try and test a Quiz Game as well.
It has been made with use of Game Editor.
extremalyfresh
 
Posts: 13
Joined: Thu Dec 22, 2011 3:36 pm
Location: Poland
Score: 0 Give a positive score

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

Postby SuperSonic » Sat Jan 28, 2012 12:26 am

Hmmm, why are there l's before the numbers? Try removing those :)
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby extremalyfresh » Sat Jan 28, 2012 9:48 am

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.
Attachments
project.rar
(421.54 KiB) Downloaded 81 times
Do you speak Polish? If yes here is a useful Game Editor website for you:
http://www.sgames.pl/
You can find some useful articles and examples there.
You can try and test a Quiz Game as well.
It has been made with use of Game Editor.
extremalyfresh
 
Posts: 13
Joined: Thu Dec 22, 2011 3:36 pm
Location: Poland
Score: 0 Give a positive score

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

Postby SuperSonic » Sat Jan 28, 2012 2:45 pm

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 :)
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby SuperSonic » Wed Feb 01, 2012 3:22 am

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
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

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

Postby extremalyfresh » Wed Feb 01, 2012 8:44 pm

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 :-).
Do you speak Polish? If yes here is a useful Game Editor website for you:
http://www.sgames.pl/
You can find some useful articles and examples there.
You can try and test a Quiz Game as well.
It has been made with use of Game Editor.
extremalyfresh
 
Posts: 13
Joined: Thu Dec 22, 2011 3:36 pm
Location: Poland
Score: 0 Give a positive score

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

Postby SuperSonic » Wed Feb 01, 2012 9:29 pm

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
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest