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 Professional Discussion / Hud and Collision detection problems

Author
Message
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 19:14
Hello I cannot get my player from walking through other objects and cant get my hud to appear and/or stay on the screen.
Help would be greatly appreciated. The tutorials do not seem to help at all. Thanks for the help!


The Project may also be downloaded

Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Sep 2011 19:23
You have two hud objects both with the same z position. You can't use the same z position else they are clipped off the screen.

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 21:08
thanks but how can this be fixed?

Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Sep 2011 21:20
Move the z positions apart. one at Z 4, and one at z 6 whatever you want.

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 21:52
Quote: " Move the z positions apart. one at Z 4, and one at z 6 whatever you want.
"


here is my new hud but it still doesnt show up????



Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Sep 2011 21:58
You haven't moved them apart...

position object 200,-2.0,-1.9,4

position object 201,0.0,6.9,4

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 22:06 Edited at: 19th Sep 2011 22:27
Are you sure that this works in DBPro? because it works for me in classic but not pro.

Austin H Wicker
http://captainwicker.webs.com/
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 22:25 Edited at: 19th Sep 2011 22:30
@Pincho Paxton
Are you running DB or DBPro? and would it be best to use sprites?
Thanks for your advice though...

Quote: " You haven't moved them apart..."


position object 200,-2.0,4.9,4

position object 201,0.0,6.9,4

I am running DBPro upgrade 7.61

Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Sep 2011 22:42 Edited at: 19th Sep 2011 22:43
Even in DB Classic you have to move the Z apart. They are both 4...
......................obj.......X....Y...Z
position object 200,-2.0,4.9,4

position object 201,0.0,6.9,4

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2011 23:45 Edited at: 20th Sep 2011 00:38
Ok then what about collisions? and how can I prevent my loaded objects from going right through each other?



Austin H Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Sep 2011 03:08
@DarkDISCUSSION

What I noticed, is that you made a pyramid in high poly, so I had to make another one in low poly just for collision.Download the attached example. I add my own collision, but you can use yours.

Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 20th Sep 2011 03:26
@chafari
Thanks but Ive already fixed this a few minutes ago, however could you tell me how to convert a bitmap to a sprite and force it to stay on the screen?

Austin H Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Sep 2011 03:33
Quote: "Thanks but Ive already fixed this a few minutes ago"


Have you test my collision ??

About converting a bitmap to sprite , you had better load image and make sprite, and paste sprite.


Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 20th Sep 2011 03:45
Yes Ive seen it and it is very nice,
Nice Work!

Austin H Wicker
http://captainwicker.webs.com/
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 20th Sep 2011 05:09
It would be quite nice if someone could show me how to make a title screen for my program. Any ideas?



Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Sep 2011 11:07 Edited at: 20th Sep 2011 11:09
Load Image
paste Image

or

Load Bitmap

t = timer() + 10000
repeat
sync
until t <= timer()

DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 20th Sep 2011 20:49 Edited at: 20th Sep 2011 20:51
When I type this in


It says "Runtime Error 1003" Could not load bitmap at line 18!



Any ideas anyone??

Austin H Wicker
http://captainwicker.webs.com/
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Sep 2011 21:17
Is it next to the DBA file?

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Sep 2011 21:42
Instead of loading bitmap try loading image.When we load bitmap, we have to delete bitmap to continue debuging.
Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
15
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 21st Sep 2011 02:36
Got it! I now have somewhat of a title screen to launch now.
If it wouldn't be too much to ask if someone could tell me if there is any bugs in this.

Updated project can be downloaded.


I have also made my Mummy(Level_1 Boss) chase after Ed(P1)



Austin H Wicker
http://captainwicker.webs.com/

Login to post a reply

Server time is: 2026-07-10 12:39:02
Your offset time is: 2026-07-10 12:39:02