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 Animation - Can you do it in seperate gifs?

Author
Message
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 27th Jul 2003 21:04
Is there a way I can use 1 animation frame for a new .gif. So if the walking animation has 4 frames could I have 4 .gifs called

walk1.gif, walk2.gif, walk3.gif and walk4.gif?

I have tried the tutorial on dbheaven which has every frame of animation in the same .gif and this is too confusing for me. I was hoping I could do it the way I stated above.

If you know how can you show me a source code?
Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 07:14
well, in DBC, .gif isnt supported (well to my knowledge). Try BMP. And use sprite commands (Sprite #,X,Y,Frame Image) Best advice I can give you.

At first glance, I'm a mediocre mech pilot. Look again and you will see my battlemech's computer code rushing through my eyes. My Mech And I Are One!
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 28th Jul 2003 14:55
But how would I load the next image for the animation. Sorry Dark Basic is thefirst game making tool I have had that uses coding instead of just drop windows like The Games Factory.

Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 16:59
Here, a simple program to make an animated sprite. Little fast though, so you might need to fix that .

At first glance, I'm a mediocre mech pilot. Look again and you will see my battlemech's computer code rushing through my eyes. My Mech And I Are One!
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 28th Jul 2003 19:14
It says cannot load bitmap. I did rename the files to the right name and it still has this error.

Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 21:51
so, you have 4 images, all the same size, yet with different frames of animation, yet when you go to load them, it gives you that error? musta misspelled the names.

MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 28th Jul 2003 23:02
they are all 29 x 38 in size. They have the correct names too

Angeleyes
20
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 29th Jul 2003 03:46
The Bitmap NEEDS to be in the same folder as the program is in.

Try it again.

Ta ta for now
Mary

MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 29th Jul 2003 17:10
OK here's all the facts:

They have the correct filenames
They are in the same folder as the .dba file, .db file and the .TMP file.
All those .db/dba/tmp files are called sprites.

The other files are frame1.bmp frame2.bmp frame3.bmp frame4.bmp

With all that this comes up

Quote: "Warning at line 1, cannot load bitmap"


I am still using this exact code



Eddie Gordo
21
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 29th Jul 2003 17:38
try turning the sync off...maybe...i think...

In our hearts and minds we keep the powers of love, hope and the hidden powers of evil in which we can mold a hero or daemon of ourselves-Book of Enoch Chapter III
Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 29th Jul 2003 18:52
Try load bitmap command instead

Angeleyes
20
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 29th Jul 2003 19:18
Mec......

I have just tested your code and I uses some pics named frame1.bmp etc etc...... And it all works fine.

Some things you should look at:

1. Check the spelling of the "frame"....you may have got it wrong...even if it looks right when you glance at it.
2. Make sure that the pictures have been saved as a .BMP...Its easy to save as something else and then it wont load it in as its not a .BMP file.

If the pictures are in the same place as your code....it WILL work.

If this dont help ya, then I cant think of anything else!...Sorry!!

Ta ta for now
Mary

Dreamora
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 29th Jul 2003 20:55
ahm ... just one point if you want to have other ppl to play your games:


Always make Textures / Sprites in 2^x lengths/widths ... 32x32 / 64x64 / 128x128 and so on, because there are many 3D cards out that doesn't support other width-heights

MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 30th Jul 2003 04:57
I thought it would be easier if I changed the names ( I did this after everything you guys have said) to 1,2,3,4 etc. Does it need .bmp in the name? I have win xp and it says bitmap file under the file name so they are definately bitmap files.

Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 30th Jul 2003 16:40
yes, you need the .bmp file extension at the end of a file name. You need that with all of the files you load. Like "Samurai.3ds" or "FunnyFace.bmp"

[url=http://www.neowolfgames.tk]]
Angeleyes
20
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 30th Jul 2003 20:36
LOL........I dont believe it!

ROLF!!!!!

Still...its easy to make a mistake, dont worry.

Ta ta for now
Mary

MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 5th Aug 2003 03:13 Edited at: 5th Aug 2003 03:14
I don't think I made the mistake you think I made. Adding .bmp to the end of the file name did not work. Doing that caused Dark basic to say

"Cannot load 1.bmp.bmp. File does not exsist"

Don't forget that they were already .bmp files before I added .bmp to the name of the file.

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 5th Aug 2003 17:21
There is a stupid option in widows that makes it hide file extensions that have a program associated with them.
Open my computer and on the menu click Tool | Folder options.
Then click the view tab and scroll down the list of options until you find "Hide extensions for known file types". If it's checked uncheck it and then click the "Apply to all folders" button at the top and you will actually be able to see and change all of the filename.
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 6th Aug 2003 20:06 Edited at: 6th Aug 2003 20:07
Good news and bad news:
We'll start with the bad:
Dark Basic can still not load the bitmaps (yes now I am 100% sure they are bitmap files .bmp)

GOOD NEWS

That function works, I turned it off and now it's a lot easier to make sure they are bitmaps and will come in useful with a lot of files and programs other than this. - Thankyou the_winch

I am starting to get the feeling that it is a problem with the bitmaps themselves.

As I have no experience in this it could be any mistake like the bitmap must be an even square or the main picture must be in the middle of the bitmap for it to load properly.

It is not square it is a rectange because Sonic is taller than he is wide of course.

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 6th Aug 2003 21:54 Edited at: 6th Aug 2003 21:56
Try to see if db thinks the files exist.



If the above code says that the files exist them it could be a problem with the bmp. Try makeing a new 32x32 bmp and see if you can load that.
It could be that your grafics card only likes square images to the power of 2. 2x2 4x4 8x8 16x16 32x32 etc.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Aug 2003 22:18 Edited at: 6th Aug 2003 22:18
There's no need to worry about the size of the images that I know of. They can be any shape or size. Don't know what is wrong. Maybe you have renamed a GIF Image.bmp.gif because you could not see the extension. I am at a loss to help you. Just try saving the files again as bmp.

Pincho.
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 7th Aug 2003 22:12 Edited at: 7th Aug 2003 22:15
No they are definately .bmp files I can now see what the extention is of each file and they have .bmp on the end.

It says that the file exsists.

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 7th Aug 2003 23:48
It's proberly not the problem but have you tried making a 32x32 bmp file and loading that.

Look through the examples that come with db and find one that uses sprites and see if that works. If it does it must be either a problem with your code or your bmp.
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 3rd Sep 2003 21:47
I went into the IRC chat room the other day and asked for help. I was told it might be the BMP needed to be resaved in Paint Shop Pro. Not MS Paint; could this be the problem?

Sorry I haden't posted about this earlier but I was on holiday for 3 weeks and only just found out that this might be the problem.
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 4th Sep 2003 06:23
MechaShadow
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location:
Posted: 4th Sep 2003 19:28 Edited at: 4th Sep 2003 19:29
That works... It must be the Sonic bmps I am trying to use

Login to post a reply

Server time is: 2024-03-02 15:23:49
Your offset time is: 2024-03-02 15:23:49