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.

Newcomers DBPro Corner / Tile editor

Author
Message
+ceocan+
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 9th Feb 2003 20:39
how do you make a tile editor (for a RPG)
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 9th Feb 2003 23:36
hey, im trying to do that very same thing
I need to build my RPG first though ^_^

a bit of advice, you should be a bit more descriptive in your posts

ciao

+ceocan+
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 10th Feb 2003 12:07
I need to build first a tile editor but I don't know how. can someone tell me how I can do this?

Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 10th Feb 2003 12:12
it isn't very hard :
you juste have to position tiles, and every time you do it, you save in an array :
1. the number of the tile's image
2. the position x of the tile
3. the position y of the tile
after that, you can save your array in a file.

I've an advice : don't position the tiles in your code, or it will be the greatest mess of the known univers

I'm following John, but I'm not john.
Lol, it is funnier in french
+ceocan+
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 10th Feb 2003 15:51
can you give me a example code?????

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2003 06:20
something like this might get your started


x = 10
y = 10


dim tileloc(x,y)

rem we are ignoring the zero in this arrray for this example

for x = 1 to 10
for y = 1 to 10
tileloc(x,y) = rnd(4)+1
next x
next y


this would make all the tiles in a 1 to 10 x 1 to 10 area randomly 1- 5

Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 11th Feb 2003 18:25
---> I've an advice : don't position the tiles in your code, or it will be the greatest mess of the known universe <---

do you mean like, dont type in "make tile blah blah here, etc" in DB?


also, you could kinda save levels to txt files so they can be loaded back later couldn't you? I am having problems getting my hear around this, i keep thinking that you would have to save the number of tiles placed, then write all those "load image "blah blah" commands to a text file to be loaded back again

anyone understand my Schpeel??

You could take over the world with a programming language like this...

...I wasnt joking!
+ceocan+
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 11th Feb 2003 21:58
???????????? I still don't get it

Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 11th Feb 2003 22:54
um...me neither...

reading through my post again i dont even understand what I meant

ok, i'll rephrase my question

when i make a tile editor, if the user clicks, a tile will be created and you can move it around. another click "drops" the tile onto the map

I get the saving of the tiles into the text file part, but what i dont get is; when I load my map back, do will all the tile sprites already have to exist for it to work correctly? Would i have to pre-load, say 25 of the same image and sprite it 25 times, if i were going to use that tile 25 times in my map

You could take over the world with a programming language like this...

...I wasnt joking!
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 11th Feb 2003 22:54
um...me neither...

reading through my post again i dont even understand what I meant

ok, i'll rephrase my question

when i make a tile editor, if the user clicks, a tile will be created and you can move it around. another click "drops" the tile onto the map

I get the saving of the tiles into the text file part, but what i dont get is; when I load my map back, do will all the tile sprites already have to exist for it to work correctly? Would i have to pre-load, say 25 of the same image and sprite it 25 times, if i were going to use that tile 25 times in my map

anyone get me this time?

You could take over the world with a programming language like this...

...I wasnt joking!
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 11th Feb 2003 22:54
whoops posted twice there

You could take over the world with a programming language like this...

...I wasnt joking!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 12th Feb 2003 03:57
what i showed u was the essence to storing the tiles into an array.

I dont think u would want to pick it and drop but just change the tile in the current square u are over.

if your tile is 256 x256 and placed in the top left corner then halfway is 128 and the position of the mouse over this area dictates what number u want to change in the array.

divide the mouse co ordinates by 8 to get a tile grabbing area as an example.

Login to post a reply

Server time is: 2024-11-24 02:50:08
Your offset time is: 2024-11-24 02:50:08