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.

DarkBASIC Discussion / Where's the problem in this program?

Author
Message
ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 5th Aug 2007 06:20 Edited at: 5th Aug 2007 21:29
It's doing collision detection with only one object.
I need it to do more.

Here's whhat I got so far.

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 5th Aug 2007 15:58
Put Your code in a code snippet box
Remove the asterisks
[*code*] Your code here [*/code*]

becomes


Do this and you might get some help

Your signature has been erased by a mod because it was rubbish.
ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 5th Aug 2007 19:21
Sorry I did'nt put it in a snippet.
Next time I'll be sure to do so.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Aug 2007 21:22 Edited at: 5th Aug 2007 21:31
You have got the Edit button over on the left you know - there's nothing stopping you from going back and editing your own posts.

Now all we need to do is teach you all about proper indentation and program layout (including procedures) - so you don't have to rely on that horrible Goto command!

I've run your program through DBA Tidy and reposted it in a code box for you so you can see where the problems are.

Check out tutorial 2 here:

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

TDK_Man

ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 5th Aug 2007 22:12
Thanks TDK Man
From now on I'll make sure programs are in snippets box or
make sure to edit posts too.

About my program your saying that goto's are not good?
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 5th Aug 2007 23:07
Even after TDK formatted your code it's still very confusing, I have no idea where it's going or what it's doing.

I ran the program and it actually seemed quite good. Do some tutorials and you'll be able to make a much better and more readable version

If your problem is making more asteroids use MAKE MESH FROM OBJECT
that will store your asteroid object's vertex data in a mesh that DB can use. Then use MAKE OBJECT FROM MESH to make a new object from the stored asteroid mesh. et voila! Another asteroid .

To detect collisions for more than one object use the OBJECT COLLISION command but only state the first object and make the second value 0: OBJECT COLLISION(1,0). Instead of returning 1 or 0 this command will now return the object number of the object colliding with object 1.
For Example:



Your signature has been erased by a mod because it was rubbish.
ScottyB
17
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 6th Aug 2007 19:46
Awesome!
Now, collision detection is working.
I'll also try that object to mesh and mesh to object idea.
Thanks for all the help guys!

Peace!
Out!
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 15th Aug 2007 00:04
Your game sounds very neat, but you didn't post the media. I would like to try it out so if you could please post the media i would appreciate it.

The problem with the gaming community is people think that the resolution of a game defines how good it is. I am not afraid to make a game where the main character is 50x50.

Login to post a reply

Server time is: 2025-05-30 14:17:51
Your offset time is: 2025-05-30 14:17:51