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! / Loading bitmaps onto screen

Author
Message
Danno
20
Years of Service
User Offline
Joined: 19th Feb 2004
Location: england
Posted: 19th Feb 2004 14:22
I know this an easy question, but in my game i have a circle as the character (i'm using a pacman type of game) and i would like to use a btimap picture instead of the circle and i dont know how??? help



Here is what i have so far
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Feb 2004 15:28 Edited at: 19th Feb 2004 15:29
In an art package you can select an image, copy it, and paste it into a new screen. The new screen should be the size of your circle now. Make sure that the background is black 0,0,0. Save as bmp...

In DB load Image "Whatever.bmp",1,1 ... The second 1 is for DBPro.

Now make a sprite with Image number 1.

Pincho.

Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 19th Feb 2004 17:37
Dude, this is the same question that gets answered like 3 times EVERY day! What I want to know is how to draw a map 3 times the size of the monitor, then put 3 player characters onto it, and handle them, explosions and projectiles ect. Then display it as a four panel split screen affair, with 3 panels showing each player and their surroundings and the 4th panel displaying a mini amp of all the action. At 60fps. THATS somthing they dont tell you in the sodding tutorials. As for Danno, go read 2d thread for explanations from me and pincho as to how to(yawn) get a sprite on screen...

GIve me more power!
Jetlag
20
Years of Service
User Offline
Joined: 17th Feb 2004
Location:
Posted: 20th Feb 2004 00:26
I have DB Electronic, and whenever I try loading bitmaps it wont work, but when i go to the tutorial it loads one fine. How do I load one, and how can i get the file from a folder if I was to compile the game onto a CD?

Geeks will one day reign
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 20th Feb 2004 11:46
I often make the mistake of not putting the file type into the file name when I type it in(the .bmp part) and it just comes back as an error!

Also you have to save your program to the same folder your images are in. When you compile the thing to a .exe then DB automatically puts all your images and sounds and everything into the .exe file, so you dont have to worry about any of that. Just put your.exe onto disk and give it to your buddies and all the graphics will be there!

GIve me more power!
flibX0r
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Western Australia
Posted: 21st Feb 2004 15:59
@Code Stealer

Are you making a liero clone?

Quote: "how to(yawn) get a sprite on screen"


Umm, this coming from a n00b that can't figure out how to do split screen and a minimap?

To do the split screen, draw all graphics to a bitmap at the required size and then copy the bitmap to the screen in the different positions.

For the weapons, i depends of the weapons, but i would normally create a user defined type (udp) and have it contain the position, velocity, acceleration and angles of the projectile, and update them each frame.

As for the mini map, you could pick every couple of pixels in the map and draw them on the minimap, and then draw the positions of the players at their reduced positions

There, i just showed you how to (yawn) do splitscreen and weapons and a minimap

0100100100100000011000010110110100100000011001110110111101100100
No, really, its true. Honest
http://www.w3th.tk <-- Soon to have some content
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 23rd Feb 2004 13:00
Doesnt the term "n00b" annoy other people as much as it does me? Its the worst example of "l33tspeek" in existance, and doesnt mean much. Its somehere between idiot, and inexperienced but really it means someone who is new, which is something to be ENCOURAGED not discouraged! So insulting! I prefer to just say knob instead. Its much simpler and less elitist(who wants to be an elite geek though I wonder?) Anyway, if its so easy to do maps and collisions how come I cant find a decent example of a 2d top down scrolling background ANYWHERE? If you know different and can point me to a good map handler with sprite to wall collisions I would apreciate it, being as Im a "n00b"

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 23rd Feb 2004 14:49 Edited at: 23rd Feb 2004 14:59
Here's some code for array collision. I can't remember who made it. It's a platform game, but the collision is the same anyway.



Login to post a reply

Server time is: 2024-05-17 06:32:06
Your offset time is: 2024-05-17 06:32:06