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 / dark basic 2d bugs

Author
Message
ThomasFN
20
Years of Service
User Offline
Joined: 26th Aug 2004
Location:
Posted: 28th Aug 2004 04:06 Edited at: 30th Aug 2004 00:00
[email protected]
I have a basic 2D sprite related game and the whole of darkbasic closes down when I shoot the enemy using space
Cannot include source code because it imports media. Email me for zip file containing source code + media

Help PLEASE

P.s. I'm using v1.13 ENHANCED

Thomas Smith
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 4th Sep 2004 06:04
i have had this problem soooo many times, it's mad, apparently you need to get the latest version of db or dbpro (both cost) to solve the problem, i however just like to rewrite the entire thing.
Skeletor
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 4th Sep 2004 07:48
Sounds like a codeing error to me. Also what does the error say? Im a DBP/DBC 2d programmer and might know a solution.


http://www.angelfire.com/games5/db_games/
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 8th Sep 2004 05:23
Yeah. What bug is it?
When does it occur?

Just give us the bad bit of the source code - we don't need to run it necessarily!

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Sep 2004 20:27
I have had this kind of problem too.... okay, I still have..

for me it happens almost everytime I delete a sprite.

f.ex:
if die=1 then delete sprite player:goto kill_player

this makes db crash almost everytime for me...
(not exactly this code, but close)


I am not cool anymore... or am I?
http://n0id.proboards28.com/index.cgi - please join
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 14th Sep 2004 21:09
ico2,

It doesn't cost to get the latest version of DarkBASIC Classic.
It does, however, cost to buy the expansion pack for DBC.

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Skeletor
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 15th Sep 2004 02:26
Okay what Im guessing is your deleting an already deleted sprite... What you need to do is position the sprites X and Y coordinates to somewhere like 2000,2000 or whatever when it gets shot. Im not sure if thats the correct way but I do it all the time.

Note: I usually delete the sprite and move its X and Y coordinates to make sure it wont come back.


http://www.angelfire.com/games5/db_games/
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 15th Sep 2004 16:57
but wont that slow down the program?

if you have alot of x and y position data for stuff that is not even drawned!?

or do you use:
if sprite exist(x)=1
sprite x,xp,yp,mode
endif
?


I am not cool anymore... or am I?
http://n0id.proboards28.com/index.cgi - please join
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 21st Sep 2004 06:37
if die=1 and sprite exist(player)=1 then delete sprite:goto kill_player

(Yes, the code above IS valid - does nobody ever use the 'and' operator any more ???)

[img src=http://blanky.pt-web.net/ddd.gif] >::p

Login to post a reply

Server time is: 2025-05-25 16:52:42
Your offset time is: 2025-05-25 16:52:42