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 / Help with 3d collision and making my objects different colors w/o the built in db functions

Author
Message
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 31st Jul 2005 21:07
I need Help with 3d collision and making my objects different colors w/o the built in db functions. I searched 3d collision in the search and none of it made any sense. How would I make it to where the player "STOPS" when it hits this tree I made? Also, how could I do the little cell shaded thing like in the puzzle compo where this one person made his game look cartoony?

Thanks in advanced!

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
greg man
21
Years of Service
User Offline
Joined: 6th May 2004
Location:
Posted: 31st Jul 2005 21:33
I'm not too sure about the cel shaded or collision stuff but i may be able to help with the colour changing.
There are two ways you could do it that i can think of:
1) Use the color object command for when you need to change object
2) Make two different textures which are different colours for the object and use the texture object command to retexture the object when needed

someone else on the forums will have to help with the other stuff though
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 31st Jul 2005 22:41 Edited at: 1st Aug 2005 07:59
Okay, thanks. Well I just read another 3d collision thing so I don't need help with 3d collision. But I didn't want to use DB to color my objects. How can I texture parts of my objects such as faces and feet?

edit: Okay, forget it. Maybe I do need help with collision. I tried:


Yes, I used part of the DBC example and part of another example. Hey it works. But I need to figure out how to do collision. Any Help?

I also included a picture so you can see what the object I want to colllide with is. (a Tree). Also, does anyone know how to detect collision with static objects. You see I copied a tree (2 times) and don't know how to collide with it.

AAAAAAAHHHh I am trying to find SOME KIND of help with collision and NOTHING is working correctly! Some One PLEAE help. PLEASE?

------------------------
Visit my website of Games!
http://dabip.stonerocket.net

Attachments

Login to view attachments
greg man
21
Years of Service
User Offline
Joined: 6th May 2004
Location:
Posted: 1st Aug 2005 13:23
i think i might have answered the question about texturing on Mantis's thread about anim8or but if that is no help just ask and i can try to point you in the right direction.
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Aug 2005 16:18
you can use sparky's collision dll

Your signature has been erased by a mod because it's larger than 600x120...
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 1st Aug 2005 19:45
I was really not wanting to use a DLL. I wanted to us it In game and I wanted it to be simple. I looked at Jopie Dopie's collision thing and it was just too much for me. IT was really good but It was just too complicated for me at the moment. What I'm trying to do is get a feel for 3d as this will be my first 3d project. I am trying to get a little level where I can move around and do things.

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 2nd Aug 2005 04:15
You can use this code, or something close to it. Keeping in mind the tree is object 2 (changeable) and the player is object 1 (changeable):


Something like that. The key is to not allow the player to go forward when the object is colliding (tree) with the player. Hence, the down and allow string commands. That is almost the exact same thing I use for my Slayer: Battle Tanks 2 game.

You can change that around, and you need to load the objects in the mean time. The -5 for moving forward always works for me, its backwards it seems, but that's just how it works for my computer. Then, you can change the turn left or right commands to anything.

Again, this is just an example, you don't have to use it word-for-word, or not at all.

-----------------------
Vote for Excelsis on the Puzzle Game Compo

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 2nd Aug 2005 04:17
You might also want to use this command for objects 1 and 2 (tree and player), set object collision on 1 and set object collison on 2. That doesn't always need to be there, it will still collide without them, but if you're looking for values and replies from the computer, you should use the set object collision on command.

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 2nd Aug 2005 06:03 Edited at: 2nd Aug 2005 06:56
Okay, I'll try it. I'll let you know if it works like I wanted. Thank You!

edit: Uuuuh, it doesn't work. Click this link and you will see EXACTLY what I am working on. Then you might be able to help me better.

[href]http://dabip.stonerocket.net/next/games/3d help.zip[/href]

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 2nd Aug 2005 22:35
I'll have to use the code when I'm at my house....that way I can execute it. If you're online right now, could you resend that, this time with an executable file?

------------------------------
Vote for Excelsis on the Puzzle Game Compo

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 2nd Aug 2005 22:38
OH! WAIT! The problem lies within this: You copied the code I gave you twice! That means their won't be a collision because he moves twice as much. If that isn't the problem, and working with DarkBASIC has told me their isn't one solution to anything, post again, and I should be at my home computer to execute and test.

------------------------------
Vote for Excelsis on the Puzzle Game Compo

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 3rd Aug 2005 05:49
Okay, I'm updloading the new files to my ftp server. Here are the links when they finish:


This is stand alone exe with no media fils but with source code sorce code
[href]http://dabip.stonerocket.net/next/games/3d EXE tand alone (no media in file).zip[/href]


This has all of my models outside the exe and includes source code.

[href]http://dabip.stonerocket.net/next/games/3d models.zip[/href]

I hope these links will work. I've gotta go. I'll check back to make sure the files uploaded!

David

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 3rd Aug 2005 05:59
When I delete the inkey$() message that is copied twice, it works fine. But, I'll give it some more tests to make sure.

--------------------------------------
Vote for Excelsis on the Puzzle Game Compo

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 3rd Aug 2005 07:14
Hmm, what inkey? I don't recall putting that command into it. Of course I'm sure I'll find tons of things that I didn't recognise.

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 3rd Aug 2005 14:34
Master Programmer, the signature image you have is bigger than 300x80 (I think that was the limit), not to mention the fact that you have uploaded it to a CodeBase entry.

The CodeBase is NOT A FILE HOSTING SERVICE.

[Insert extremely witty comment here] :: Add me to MSN if you like, but don't expect any big favours [unless you like VB6]. ... IDK!!
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 4th Aug 2005 00:37
I can't think right sorry. Not inkey$() I mean the upallow$="yes" thing. In the code you orignally pasted you had it pasted twice.

Blanky,
OK, I thought that that would be easier.....its not. Tripod (my FTP host) will give an error when I remote load. So, I signed up for GeoCities and my new one is from there.


__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 4th Aug 2005 01:28
so could you post the corrcted code for me?

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 4th Aug 2005 05:37 Edited at: 4th Aug 2005 05:38
OK. All right. I tested and fooled around with your code for a while and came up with a few errors and fixed them. They are as follows:
1. The collision was on the wrong object (2) it should've been 4.
2. The positioning was wrong with the wall collision, I sort of fixed that.

There is a minor glitch of backing back through the wall if you turn around. I'm working on that for my own game too. Once I figure it out and fix it I'll post it for you.

Other than that, I added a new string, col4$ and col3$, which is the collision of either object 4 or 5, which just tells where the collision is at, by the up key or down key.

Here is the fixed code:




__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 4th Aug 2005 07:00
Well, your code seemed to work but then I realized that you were using the maths collision system that I made. I ten decided that it was WAY too complicated and wanted an easier thing to do. Well, I FINALLY made it. A piece of code that will make an invisible little math border around EVRY tree that I include in the code. Here is the code.




It HAS to be the best piece of code I have EVER made!

I start out the beginning with close to this:


This HAS to be the work of a genious!!

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 4th Aug 2005 23:53
Yeah that's fine and dandy, but, what if you back up through the tree?


__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 5th Aug 2005 06:37
well, I haven't quite worked that part out yet. But It would of taken me for ever to find the x and y for each tree. But uuuh, I'll try and make an extra piece of code to mkeep him from going through the tree.

Hope this works!

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 5th Aug 2005 06:50
Best of luck vgames master.

Login to post a reply

Server time is: 2025-05-22 13:24:27
Your offset time is: 2025-05-22 13:24:27