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.

2D All the way! / please help me here

Author
Message
Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 19th Apr 2003 16:56 Edited at: 19th Apr 2003 16:57
and plz dont JUST tell me "I made my own" becasue thats not what im asking. how do i create a Tile/map editor for a 2d game. i've looked at other posts and they always say that they need one. well i need one but im asking how to make one. so could someone please maybe give me some help(even some code snippets would work perfectly fine also) i dont even know how to start. i have images and stuff but the other 2d mapmakers never work for me. plz help someone. thx in advance(and really thx to those who give me some code snippets *cough*cough*)

[edit} or even possibly show me a tutorial or something that would help get me started. just a little editor that can load bitmaps and place them on a map that you can change the size of in the beginning. thx again

Current Status: Learning DBPro

I consider myself: ULTRA NEWB!!!!!!!!!!!
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 19th Apr 2003 17:26
u could use the data command to make the levels

like down below

hope that helps

Darkworlds are all around us
most of us are still half asleep
Current project : Creature tournament
Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 19th Apr 2003 18:07
well that kind of works but:
1) how do i load images as the tiles(see images i want to use below)
2)is it possible to have it so the camera stays directly above you so that when you move the map scrolls across
3)how do i make certain tiles so you cant walk through them

if you need a reference all my images are 60x60
the files i want to use are:
Game\Game characters\Zachron\Zachron_down.bmp
Game\Game characters\Zachron\Zachron_left.bmp
Game\Game characters\Zachron\Zachron_up.bmp
Game\Game characters\Zachron\Zachron_right.bmp
Game\Ground tiles\grass.bmp
Game\Ground tiles\boulder.bmp
Game\Ground tiles\bushesbmp

Zachron is my game character and i want the _down/up/left/right to respond to the corresponding arrows key presses But i dont know how to change the picture doing that.i want it so you can't walk through boulders and bushes. thx if you can help i know im asking a LOT but thx in advance if you can help.

Current Status: Learning DBPro

I consider myself: ULTRA NEWB!!!!!!!!!!!
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 19th Apr 2003 19:16
right ok here we go

if u want to change the different tiles to pictures just load the image in like load image"Grass.bmp",2

then in the loop where it says
for a = 1 to 20
for b = 1 to 20
read data
if data = 1 then paste image 2,b*20,a*20,1
if data = 0 then paste image 3,b*20,a*20,1
next b
next a

where in the data is 1 your grass tile will be too.


Next question to set it as though u cant walk through the tiles you need to change the above command to this command this command
for a = 1 to 20
for b = 1 to 20
read data
if data = 1
paste image 2,b*20,a*20,1
if x=>b*20 and x<=b*20+20 and y=>a*20 and y<=a*20+20
x=oldx
y=oldy
endif
endif
if data = 0 then paste image 3,b*20,a*20,1
next b
next a



for your other question about changing the character u would have to do something like

load image "zachcron_down.bmp",1
hide sprite 1
etc
thwn in your main loop put
if downkey()=1 then show sprite1

for this u would also need a sprite to act as an idol one

i dont have dbpro so i cant help u with your camera cause im not sure if there is one in 2d dbpro

hope this clears some stuff up any questions just ask.

Darkworlds are all around us
most of us are still half asleep
Current project : Creature tournament
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 12th May 2003 01:14
There is something that u can use to create a kind of camera. For all the sprites in your game put a "camera" variable plus the sprite position, like this

sprite 1,78+camx,90+camy,3
sprite 2,x+camx,y+camy,image

so that when you change the xcam and ycam would affect all the sprites. You can use that with "paste image" comand to create a moving scenary.
Then in your program you can use the xcam and ycam associated with a sprite which must be on the screen all the time:

If x+xcam>300
repeat
xcam=xcam-1
until x+xcam=<300
endif

Did it work?

Login to post a reply

Server time is: 2024-04-25 15:17:59
Your offset time is: 2024-04-25 15:17:59