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.

Code Snippets / [DBC] realy fun and "realalistic" "car" crusing game!

Author
Message
KeithMAN
17
Years of Service
User Offline
Joined: 24th Jul 2007
Location:
Posted: 24th Jul 2007 23:18
ARE you ready to drive around in a "car" with no reason well now you can with my 17 lined game
well it very simple just use the key board key and the mouse for some exciting too move if you want more speed use the shiftkey, space key and control key, if you want to go slow use the down key, or combine all the keys to go super fast

make matrix 1,4000,4000,30,30
randomize matrix 1,2
make object box 1,24,16,20
DO
caY# = camera angle Y()
if spacekey()=1 then move object 1,20
if controlkey()=1 then move object 1,40
if shiftkey()=1 then move object 1,30
if upkey()=1 then move object 1,10
if downkey()=1then move object 1,5
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-8) : walk=1
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+8)
x#=object position x(1):y#=object position y(1):z#=object position z(1):a#=object angle y(1):d#=250.0:h#=185.0:s#=50.0
Print "hold mouse for exciting mode!"
set camera to follow x#,y#,z#,a#,d#,h#,s#,1
if mouseclick()=1 then wait 10
loop

hey those are some nifty lamps you got there
running is for your health,you know?
impressed?,well i'm the bestgood
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 25th Jul 2007 21:32
I don't think that's "exciting mode", I think it's "Heart attack mode".
You know, this is almost identical to the first exe I ever made, except I used a real car an grass texture. Oh, and here's the one liner.


I never tell the truth.
That ain't a paradox.
I always tell lies is though.
KeithMAN
17
Years of Service
User Offline
Joined: 24th Jul 2007
Location:
Posted: 26th Jul 2007 03:54
haha ty, im new to dark basic, how could i add graas to my matrix?

hey those are some nifty lamps you got there
running is for your health,you know?
impressed?,well i'm the bestgood
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Jul 2007 02:11 Edited at: 27th Jul 2007 02:12
I made some changes to your code:
You didn't update your matrix so the randomized heights never displayed on screen. I've added this.
I increased the RANDOMIZE MATRIX for bigger "hills".
I removed CaY# because it was never used.
I've made the program read the height of the cube's position in the matrix and it now repositions it to that height.
Removed the mouseclick, wasn't exciting just delayed the program.
Changed the camera follow parameters.



You've made a good start
Hope you enjoy my additions, ask me if you don't understand any of it.

I am king of the noobs!
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 27th Jul 2007 12:01
To OBese87's changes I added some grass.


I never tell the truth.
That ain't a paradox.
I always tell lies is though.
KeithMAN
17
Years of Service
User Offline
Joined: 24th Jul 2007
Location:
Posted: 28th Jul 2007 03:28
wow thanks

hey those are some nifty lamps you got there
running is for your health,you know?
impressed?,well i'm the bestgood
KeithMAN
17
Years of Service
User Offline
Joined: 24th Jul 2007
Location:
Posted: 28th Jul 2007 03:30
but could u explain some of it though, like why do u do some of those things?

hey those are some nifty lamps you got there
running is for your health,you know?
impressed?,well i'm the bestgood
KeithMAN
17
Years of Service
User Offline
Joined: 24th Jul 2007
Location:
Posted: 28th Jul 2007 03:36
also, how can i change it to my own grass

hey those are some nifty lamps you got there
running is for your health,you know?
impressed?,well i'm the bestgood
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Aug 2007 03:53
Quote: "but could u explain some of it though, like why do u do some of those things?"


Quote: "also, how can i change it to my own grass"


These sorts of questions are highly unlikely to receive answers here because they are so basic and would take so long to explain.

This isn't really the board for them anyway as it's the 20 line challenge board (read the sticky and look at INH's 1 line version of your program to see the idea).

This is more of a code snippet, so it's much better off on the Code Snippets board. Moving it now...

As the subjects you ask about are covered more than adequately in the tutorials, I advise you to read some of them.

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

TDK_Man

Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 30th Aug 2007 21:15 Edited at: 30th Aug 2007 21:22
Yay! a racing game! i love games like that. i might write my own...
Kaitia
17
Years of Service
User Offline
Joined: 8th Sep 2007
Location:
Posted: 15th Sep 2007 13:19
cool... but HOW?
Are you just sitting in front of your cpu and thinking by urself hmmm what should i make today mayby a racing game with 800 lines of programming how do you get the idea's of how to make such game?

''To program or not to program that is the question''
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 16th Sep 2007 00:27
Kaita, please don't spam the forum with incomprehensable posts with no punctuation. You will quickly find that everyone around here will pick you up on little things like that.

............................

Login to post a reply

Server time is: 2024-11-22 18:31:45
Your offset time is: 2024-11-22 18:31:45