Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / [DBP] hover car race challenge accepted! (may cause motion sickness)

Author
Message
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 9th Apr 2012 23:33 Edited at: 10th Apr 2012 20:53
Get in your hover car and race your way to the fastest time!!!!

Controls:

- Use the mouse to turn but you need to use it like a joystick, move it left to turn left and right to turn right but then move it back to the mid point to go straight.
- Left mouse button to accelerate quickly to the low speed
- Left mouse button and right mouse button together to accelerate to high speed but the acceleration is slower (think of it has high and low gears).
- Right mouse button to brake / reverse.

- You'll also slow down due to friction.
- If you hit the red walls, you'll bounce backward.
- Go through the green gates, each race is three laps, race to get the fastest time.

Needs to be run in 640x480 resolution as the turning controls use the mouse pisition and I've not adjusted it for different resolutions.


edit: the compressed code may not work for you, please try the expanded code below, thanks.

Short track:



Long track:



Oh, one last thing, this may cause motion sickness.

Enjoy.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Apr 2012 05:50
RUNTIME ERROR 7008

SHORT TRACK

LINE 7
Object 26 does not exist


LONG TRACK

LINE 7
Object 83 does not exist

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 10th Apr 2012 20:51 Edited at: 10th Apr 2012 20:59
Race challenge failed, may cause disapointment

Thanks for flaggin up the bug but even using the code I posted it runs fine on my computer. It doesn't help that there aren't any object calls on line 7. The only thing I can think of is that our version of DBP are different. I'm on Compliler version 1.071 and DarkBASIC Professional Editor Build Oct 30 2009 (basically what ever came with the free download).

Here are the expanded versions, may be they'll work for you.

Short race:




Long race:



I've also noticed that the function "_reset_gates" isn't actually used by the program at all so I've removed it. It's true what they say about code you haven't looked at in six months.

If you could please try the expanded code that would be much appreciated, thanks.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Apr 2012 22:15
aaargh... here goes...

FTR I am using U77

SR 62.144 ^^

LR very annoyed timer did not work

dunno wht went wrong but expanded works 20 liner doesnt

thi could seriously do with proper physics ^^

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Apr 2012 03:14
Very nice 29 Games! The long track works for me and I got about 180 (179.5 something).

zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 11th Apr 2012 08:29 Edited at: 11th Apr 2012 08:38
Well, I got it to work, but your timer based loop wasn't working. loop_start_time was never set in the expanded version (not sure about the 20 liner), so
wasn't updating correctly. loop_time never changed. (loop_time = current_time - 0)

171.648 was my time. The first couple times, there wasn't a timer running for some reason, so I guess technically, my best time was 0. pretty darn good for a 20 liner!

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 11th Apr 2012 19:10
Awesome works fine for me!

//Anton
Rapidrory
15
Years of Service
User Offline
Joined: 21st Aug 2009
Location:
Posted: 12th Apr 2012 00:09
That's a great little game I managed a 141 on the long track

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 15th Apr 2012 21:36
Glad the expanded version is working and that people are liking it. My guess is that the newer version of DBP doesn't like the compressed function.

Can't explain the issue zeroslave was having, it's probably a good job that I'm not a perfectionist otherwise things like this could drive me insane.



Thanks. I like the 20 line challenge format as it focuses things on the bare essentials. It doens't really teach good coding practice but it does teach concise game design.

Again, glad people are enjoying this.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th May 2012 03:10
Hey...lost in the dark, but here we are !! that's great...I've lost all my teeth until I got the trick to drive by mouse click to avoid crash... I'll keep it .


Cheers.

I'm not a grumpy grandpa
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th May 2012 04:32
This really fun! It's pretty tricky to get the hang of it. After bumbling along the barriers on my first attempt I managed to finish my second try in 158 seconds. I like the way the camera leans into the turns. I think you'd end up with a pretty awesome game if you continued with this.

WARNING: The above comment may contain sarcasm.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 2nd Jun 2012 16:39
It made me feel ill.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jul 2012 13:11
The game is very well done! Please excuse me, for I need to use the toilet once more.

*vomit*

TheComet

Login to post a reply

Server time is: 2024-11-21 08:54:32
Your offset time is: 2024-11-21 08:54:32