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 / what is wrong with this code?

Author
Message
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 3rd Nov 2004 01:02
im trying to make a 2d world in a rpg style but have come across a problem. click the mouse and world changes but click it again it goes back to original like it shjould but it distorts. all the media is darkbasic stuff



Daedalus
o0 Static 0o
21
Years of Service
User Offline
Joined: 27th Aug 2003
Location: Belgium
Posted: 3rd Nov 2004 16:55
Well what you are doing is making the *map* again,
every time you switch between the big and the small map.
And because the 2nd map is bigger then the 1st map it will overdraw the 1st map.
I think thats the problem.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 4th Nov 2004 00:28
i thought that was happening how can i clear everythign out of memory and get it to draw again. many thanx for replying

Daedalus
o0 Static 0o
21
Years of Service
User Offline
Joined: 27th Aug 2003
Location: Belgium
Posted: 4th Nov 2004 01:22
You can start by cleaning up your code,
I already did it for you



Now try to understand your own code.
-Every time you make a map you make something like 25 or 100 tiles.
-Every time you change to the other map you only delete 1 tile(the last one created).
The biggest fault is somewhere at the objnum intiger.
Try to reset it somewhere,somehow.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 13th Nov 2004 06:47
i tried

but it wont redraw the tiles on the next world

Daedalus
o0 Static 0o
21
Years of Service
User Offline
Joined: 27th Aug 2003
Location: Belgium
Posted: 13th Nov 2004 19:16
I think this is what you want:
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 13th Nov 2004 21:50
i was nearly there lol tahnx a million. u have to be the coolest person in this forum. i will stick u in credits.

Daedalus
o0 Static 0o
21
Years of Service
User Offline
Joined: 27th Aug 2003
Location: Belgium
Posted: 14th Nov 2004 04:42
Hi lol thanks
But maybe the code is not optimal.
I made it in less than 10minutes or something like that so be aware of bugs.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 20:01
u did what i ahve been doing for weeks in 10mins damn u lol

Daedalus
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 22nd Nov 2004 22:23
i know what was also wrong with the old code..... it didn't work!!!

Login to post a reply

Server time is: 2025-05-24 19:42:12
Your offset time is: 2025-05-24 19:42:12