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! / 2d help for background or world

Author
Message
sadsack
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 6th Apr 2004 04:40
hi,
Well I am not going to not use matedit 1.6 for my 2D game. So Now what?
Can I make full screen size bitmap and go from one to the other?
What I want is a background that I can move the camera around. Then when I want to move one of my sprites I want to be able to click with the mouse and the sptite will move there. This is going to be a civil war battle field. I want field to have rivers and roads and things like that. I can do that with bitmaps. If it can be done that way. what do you fine dark basic pro people think is the best way to got about it?
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 6th Apr 2004 12:30
Yeah, I want some more explanation of maps. I understand how you draw them on screen, but Im still unsure about how you read collisions from your map data and how to place the camera correctly if you have a map bigger than screen size... or infact any of the specifics yet. Does anyone have a map maker tutorial?

GIve me more power!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Apr 2004 14:22
@Sadsack You could use Matedit to make your 2D backgrounds into a bitmap. Just look down on your matedit landscape, and press print screen on your keyboard. Now load up an art package, even MSPaint works for this, and click Edit/Paste from clipboard, depends what art package you have, but they all have paste from clipboard somewhere. Now you have a 2D picture of the Matedit landscape. Now you use this 2D picture as a texture for a plain, or you can just load it as a bitmap. This is much better than using Matedit Meshes because they are slow.

@Code Stealer
Yes quite complicated to explain, but quite easy to do. I think I shall have to draw a picture to show how this works.

Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 6th Apr 2004 14:34
Thanks Again to you Pincho. Are you part of the DB dev team? Or just a helpfull chappie?

GIve me more power!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Apr 2004 15:14
Just a DB user. I drew you an image of map collision, but I can't upload my picture to AOL because I am testing AOL's new AOL 9 Broadband Beta, and I have found a Bug that doesn't allow Uploading of images. I have reported the Bug, but I don't have anywhere to put my image.

Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 6th Apr 2004 15:19
Hoe big is it? If its under 2 meg you can send it to me at the email address in my profile...

GIve me more power!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Apr 2004 16:50
Ok, I've sent it.

Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 6th Apr 2004 17:09
Thanks, Ill check it later(Im at work now and my hotmail is blocked...)

GIve me more power!
medwayman
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 6th Apr 2004 21:24 Edited at: 6th Apr 2004 21:25
Hi Pincho, if you want i'll host the image for you.

[email protected]

Based on Amiga PD game Squigs. Early shots: http://www.custardsoft.pwp.blueyonder.co.uk/images/03.png

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Apr 2004 21:49
Ok thanks! I've sent it.

Pincho.

sadsack
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 6th Apr 2004 22:16
Thanks pincho. I stay up late last night and make a 3000x3000 bitmap.
now that I have this big bitmap, how can I move the camera around all over the map? If you have time you could send it to me too. at
[email protected]
the bitmap looks alot better than it did in matedit too. If any one can help with the camera thing that would be nice. renny
medwayman
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 7th Apr 2004 00:36
The attached image and the post that accompanies it are not mine. My purpose here is to host the image for Pincho Paxton.
Over to you Pincho…




This example uses tiles that are 32 pixels square. Zero's are sky, and 1's are collision. The main sprite is purposely drawn to fit inside two squares. This makes the collision more accurate. If you want to be nice to the player, you can make the ship a bit bigger, and it can slightly pass through things with it's edges. The ship can move around freely, and it can move 1 pixel, or 2 pixels. The total of pixels it moves are added together if it moves X+, or taken away if it moves X-..meaning left and right. Same with up and down. When a total = 32 pixels you need to check the next map position for a 1 or a zero.

Simple.

Pincho.

Based on Amiga PD game Squigs. Early shots: http://www.custardsoft.pwp.blueyonder.co.uk/images/03.png

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Apr 2004 01:22
Thanks! I've been busy making my drill, I think I'll post it in a minute.

Pincho.

medwayman
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 7th Apr 2004 04:01
No problem

Based on Amiga PD game Squigs. Early shots: http://www.custardsoft.pwp.blueyonder.co.uk/images/03.png

sadsack
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 7th Apr 2004 07:27
How do you do that with 32 bitmaps? do you just code each 32 bitmap in on a plane??? that sound like what I been looking for. renny
Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 7th Apr 2004 13:09
So if I hold the x and y map coords in a 2D array, I divide my actual scrren by my tile size to find which tile im currently standing on...

GIve me more power!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Apr 2004 14:55
Quote: "How do you do that with 32 bitmaps? do you just code each 32 bitmap in on a plane??? that sound like what I been looking for. renny "


You can make plains 32*32 and texture them with the images, or you can paste the images onto the screen in 2D. I prefer the 3D plains, because you can move the camera faster than you can move bitmaps around. I'm making a 2D scrolling shoot em up now as well, and I'm going to use 32*32 tiles, and collision, but I'm also going to use some larger images as well. Whole sections that are like 20 images joined together.


Quote: "So if I hold the x and y map coords in a 2D array, I divide my actual screen by my tile size to find which tile im currently standing on..."


I'm not sure if that will work or not. I don't think it will work on a scrolling screen, but you can try it.

Code Stealer
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 7th Apr 2004 15:59
OK, so I need to generate 2 pages. One is the entire map, onto which I plot all my graphics(background, sprites, effects, etc) then I have the actual screen, which is bitmap 0. Then presumably, I just tell bitmap 0 where to take the info from. Im guessing thats how it works.

GIve me more power!
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 7th Apr 2004 17:30
Quote: "OK, so I need to generate 2 pages. One is the entire map, onto which I plot all my graphics(background, sprites, effects, etc) then I have the actual screen, which is bitmap 0. "


This is the 2D Bitmap method. You don't put the sprites on Bitmap 1, you put them on Bitmap 0. You just put the game tiles on Bitmap1. If you use plains, you don't have to do any of this.

Bitmap 1 has to be big. Big enough for two total screen scrolls in all directions, plus 32 pixels in all directions. That's pretty big. I've only used this method for Horizontal scrollers before, and that requires less work.

Pincho.

sadsack
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 8th Apr 2004 05:32
Well I have a good map now. I made a plain then texture it with the same size bitmap and it came out good. I make a 3D modle and put it on the map. I am still working on the camera, IanM gave me some help with that. I would not know what to do with out him.
Now what i need is how to move the plain/map up and down and right and left. I been playing with some code to do it, but nothing yet works. thank you renny
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 8th Apr 2004 16:49
It's better to move the camera than the map. If you move the map, then you have to move every object on the map, and there might be 100's. If you move the camera, it moves everything in one go. Use the camera X/Y positions, and position camera commands.

Login to post a reply

Server time is: 2025-05-14 03:34:28
Your offset time is: 2025-05-14 03:34:28