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.

Newcomers DBPro Corner / My First Game, not very good at programming yet, having problems.

Author
Message
Evilcatt09
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 6th Oct 2003 03:03 Edited at: 7th Oct 2003 05:00
Could anybody please tell me, where I could find someway to make lives and if you die to start over at the beginning off the level, or if you could place a code snipet.

Please read down farther I'm putting multiple questions in one thread like the rules state.

You want me to get a life? Ok, hold on a sec. *picks up the controller and presses Up,Down,Right,A,Left,B,Y* There you go now I have 50!
zzabb
21
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 6th Oct 2003 04:56 Edited at: 6th Oct 2003 04:56
try not to make things harder than they are
just delete all your stuff and goto the beginning
or you could keep all your stuff and goto after you have loaded everything

basically just goto the begining

startover:

set your setup
set your variables
load your objects

do
have your game do cool stuff

if lives=0
delete all the objects and media
goto startover
endif

loop

My advice is free -
unfortunately you get what you pay for (-:
Evilcatt09
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 6th Oct 2003 05:11
Can you tell me how to make the player spawn at the beginning of the level though, sorry but I'm real new with DarkBASIC
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Oct 2003 05:12
Position Object Object Number, X , Y , Z

RPGamer

Current Project: Eternal Destiny
We need a texture artist!
If your interested email me - Johnrocs@aol.com
PoHa!84
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location: To your left.
Posted: 6th Oct 2003 05:16
Hmm... you post in two forums asking the same thing... I almost wish I didn't post in your other one now. But I'll still help.
Figure out where the player's coordinates are at at the start of the level (x,y,z), then, like zzab said, if level=0 then delete everything (well, you wouldn't need to delete everything if the player's gonna respawn in the same place, but anyways...), and place the player back at the original coordinate. That all would probably best be handled with a function.

Destroy you with my mind, I could!
Evilcatt09
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 7th Oct 2003 04:10
I'm doing the tutorials on this website and in tutorial 1.6 I get a
RUNTIME ERROR AT LINE 66. IMAGE DOES NOT EXIST.
But that is the very last line that says LOOP, I don't get it can someone help me.

Here is the website:
http://developer.thegamecreators.com/?f=t01/3d_tutorial_6
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Oct 2003 04:28
LOOP?

Oh boy, this'll be a long thread.

LOOP works along with DO. When the code reaches the word LOOP, the code repeats back over at the beginning of DO.

Do
stuff
stuff
LOOP

That code never ends. it's the same as writing:

Thing:
stuff
stuff
goto Thing
Evilcatt09
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 7th Oct 2003 04:31 Edited at: 7th Oct 2003 05:01
But I need to know why it says IMAGE DOES NOT EXIST when at Line 66 there is a loop.
Did you go to the hyperlink and look through the code at the beginning?

You want me to get a life? Ok, hold on a sec. *picks up the controller and presses Up,Down,Right,A,Left,B,Y* There you go now I have 50!
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Oct 2003 05:43
sometimes the error reporting doesn't have the line number accurate but that's not the issue, do you have the images in the same directory as the exe?

Quote: "Rem Load Textures
Load image "cottag02.bmp",1
Load image "barry.bmp",2"


the way the are loading here indicates that they should be in the same dir as the exe. if they are in some sub dir change the code...

Quote: "Rem Load Textures
Load image "images\cottag02.bmp",1
Load image "images\barry.bmp",2"


(substituting "images" for the actual name of the sub dir)

-RUST-
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 7th Oct 2003 05:45
It means that you messed up when you typed in the name if the image. Remember, you have to put the extension at the end of the file name. It could also mean that you called for an image that didn't exist.
EX:
REM wrong way
Load image "image.bmp",1
texture object 1,2

REM right way
Load image "image.bmp",1
texture object 1,1

Am I an Idiot...or is everyone else just really smart?

Login to post a reply

Server time is: 2024-11-25 11:33:54
Your offset time is: 2024-11-25 11:33:54