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! / Is there any less painfull way to import BMP files?

Author
Message
Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 02:46
Hi!

Is there any sort of sprite editor for 2d games?
Every time I try to import a BMP file I get a GET IMAGE error message claiming the image is too small etc..Whatever size I put it's always the same.
Is there any tutorial on this specific subject?

I would like to work with BMP and JPG files since I'm more skilled in that department then in AVI section..

Thx
Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 03:11
It says "Bitmap too small to get image"?!

I mean..I have a 200x90 image and whatever values I put I get this stupid message.

ChopChop
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 04:19
Try this

load image "media\My.bmp",1
GET IMAGE 1, 0, 0, 199, 89

Do you still get an error?

Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 3rd Mar 2003 04:22
Kenan - post your code here so we can see it to help you.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 3rd Mar 2003 11:54
'Try this

load image "media\My.bmp",1
GET IMAGE 1, 0, 0, 199, 89'


if you load the bitmap as an image, you wont need to use 'GET IMAGE'. so what chopchop said kinda helped

xxxpetratxxx
B. R. W
Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 13:53
I will try it and let u know..thx!
I'm a total newbie so everything's possible.
I'm working on am Animating Sprites Tutorial, so I might drop u some of its code here..

What I'm trying to do now is to determine what values should be entered in the GET IMAGE command when using BMP images containing more then one frame. I know this depends on the BMP inserted but I am yet to figure out what's the 'system' of entering those values.

For example:

LOAD BITMAP "d:\sprajtovi\character.bmp",1
FOR i=1 to 11
GET IMAGE i,(i-1)*102,0,i*102,90
NEXT i

This is from the tutorial. The "character.BMP" is a lot larger then these values would suggest. I tried doing the similar with my own BMPs but got the error message stated above...

Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 15:03
Ok. I now fully understand the basics of GET IMAGE command, the image is being displayed BUT it colors look awful - all distorted.

How can I fix this? I'm saving the BMPs into 256 color mode.
I would like to know how can I make the background transparent on the existing image (I'm using PSP, Adobe, Paint..u name it) and would also like to figure out why are the colors so upside down when shown in Dark Basic..

I'm sure this was discussed like zillions of times but I couldn't find a topic on this specific subject.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Mar 2003 19:33
Have you tried using 24 bit bitmaps instead?
Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 6th Mar 2003 00:42
Hi Tan!

I fixed the transparency problem. (figured it out by myself )
Hmmm..but when it comes to animated sprites it's sucha bitch to use those multy-frame BMP's...I wonder if me having a demo version of DB has anything to do with this inability to use GIF animations in "load bitmap" command?

I am aware of AVI file extension but I'm not sure if it is possible to make 2D games with AVI files being used as sprites?

Kenan

Kenan
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 6th Mar 2003 00:45
I apologize for misspelling your name.
I realized it's Ian not Tan, the EDIT doesn't work..

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 6th Mar 2003 16:04
LOAD BITMAP "d:\sprajtovi\character.bmp",1
FOR i=1 to 11
GET IMAGE i,(i-1)*102,0,i*102,90
NEXT i
the with of the bitmap must be atleast 11*102 by 90 or your get that error because when it tries to grab a image beyond the bitmap size, the bitmap is to small.
1122 is a really large bitmap, but thats what you need for 11 frames at 102 pixels per frame
whenever you use load image or get image add ,1 to the end of it to make it look clear.
load image "file",Image number,1
get image image number,x1,y1,x2,y2,1

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Mar 2003 16:17
GIF's are not available within DBPro - they currently require a hefty licence fee to Unisys, until the patent expires in June this year.

I believe (but am not totally sure) that AVI's can only be played to a bitmap - you could then use GET IMAGE on them, but it would be slow.
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 6th Mar 2003 16:22
You can play an AVI directly to screen if you want (and place it where-ever you want on the screen). Look at the "play animation" command for the parameters.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming

Login to post a reply

Server time is: 2024-04-24 18:12:26
Your offset time is: 2024-04-24 18:12:26