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! / How do you animate something? Is it hard? What Program?

Author
Message
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 26th Sep 2003 03:24
Im trying to make a 2D game and I was wondering how I animate stuff, like character movement when walking.

If it is done in a special program I will try to purchase it, but if I dont have to thats even better. Is animating hard because I got no talent in graphics. All my talent is in coding, and it is not high yet.

Well please get back to me. Maybe I try to work on a battle sequence until I get a reply.
Nicolas

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
TheAbomb12
20
Years of Service
User Offline
Joined: 14th Aug 2003
Location: Amist the blue skies...
Posted: 26th Sep 2003 05:18
use "create animated sprite" command if you have Dark Basic Pro

I dont know what the equivilent is in Dark Basic Classic

Those who Fight with swords get killed by those who don't
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 26th Sep 2003 05:39
Ya I have Dark Basic Classic.
Why do I feel like Dark Basic Classic doesnt even have all the proper stuff needed to program a game.

Is Pro harder to use or is it all just in the name.

Please if someone could answer my animation question and this one please do.

Thanks
Nicolas

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
MagiKnight
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location:
Posted: 26th Sep 2003 13:33 Edited at: 26th Sep 2003 13:37
Your answer is here
first you do this

seq1 = 1
load bitmap "insert your bitmap here" , 1

for y = 0 to 384 - 63 step 64
for x = 0 to 512 - 63 step 64
get image seq1, x, y, x + 64, y + 64, 1
inc seq1
next x
next y
delete bitmap 1


ani = 1
do
paste image ani, x, y, 1
ani = ani + 1
if ani > 5 then ani = 1
loop

now this just gets all the image data then displays it I'll leave it up to you to find out how to do the rest .. its fairly simple.

MMMMMM Low level programmimg...
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Sep 2003 14:48
If your graphic skill are poor then there is a program called Poser that can be used to animate a human character, and that character can be saved as a number of bmp pictures. Or if you fancy 3d modelling then you could try Anim8or, or Wings, these models can be animated, and rendered, then saved as bmp. All these programs can be found for free, but Poser might be hard to get. Poser was given away free on a magazine a couple of years ago, but I'm not sure how you would get the free version now.

Pincho.
Dreamora
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 26th Sep 2003 16:10
through the same why how you would get the nonefree version. at least I've found it this way. *at least once sharing had something good*
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 27th Sep 2003 02:01
Thanks For the help guys but I keep getting this problem.... Maybe you guys know.

lately when I work with BMP's in classic it always tells me my bitmap is too small.

What does that mean. I used the code MagiKnight gave and I used my image. Thats what it told me.

Well if anyone know whats up please tell me
Nicolas

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
MagiKnight
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location:
Posted: 27th Sep 2003 10:36
well did you adjust my code to fit your bitmap is your bit map 512x384? cause if you ddint change it it wont work

MMMMMM Low level programmimg...
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 27th Sep 2003 20:24
What part of this code would I edit to change the screen size.



My picture is I am pretty sure 100*100
So would I change the screen size to that size?
When I run it now it says:



It doesnt exist.

Thanks for help
Nicolas

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
Erusuwasu
20
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Where am I? I think I\'m lost...
Posted: 28th Sep 2003 12:50 Edited at: 28th Sep 2003 13:18
I'll explain MagiKnight's code so everyone can understand better. MagiKnight's character (we'll call it char1) is 64*64 pixels in size and has 5 frames in it's animation. His bitmap is 512*384 so I assume his bitmap contains not only the animation for (char1) but other animations as well. However the animation for (char1) consists of only the first five images you will grab (or get). Each frame of the animation is 64*64.



This code is essentially grabbing the seperate 64*64 frames from the 512*384 bitmap and placing them into images. To go even more in depth, here is the order in which the code is grabbing the images:

The first image grabbed has the perameters: for x = 0 and y = 0
(img#, left, top, right, bottom, texturestate)
1,0,0,64,64,1

The second image grabbed has the perameters: for x = 64 and y = 0
2,64,0,128,64,1

The third image grabbed has the perameters: for x = 128 and y = 0
3,128,0,192,64,1

etc. etc. ...

That statement continues until x = 320 and y = 448 thus grabbing a total of 48 images.

BUT REMEMBER, (char1) only has 5 frames of animation and it just so happens that the first five images that were grabbed make up the animation. The next segment of code is what actually runs the animation:



This just so happens to be a never ending loop so you'll have exit using F12. I hope that helps everyone understand a little better.

As a warning to you SmokieMcPot. Most sprites people use are 32*32, 64*64, 128*128 and so on. This is because some video cards cannot support irregular sizes. I've never seen this happen but it's a good precausion to take. In the case of your bitmap this is how you would enter the code:



This assumes you have one 50*50 object to animate with 4 frames on a 100*100 bitmap.

I wish I was able to post some images on the web so you could get an even better idea, but hopefully everything makes more sense now. I hope this helped

I've got DB Classic and PS Skillz and I'm not afraid to use um!

Login to post a reply

Server time is: 2024-05-05 15:33:18
Your offset time is: 2024-05-05 15:33:18