Looking in the move direction

Talk about making games.

Looking in the move direction

Postby Troodon » Sat Feb 17, 2007 4:57 pm

Hi,
How can I make my actor look in the moving direction.
Of course, I've got a rotating animation, so all I need is to have the draw actor code. Thanks
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby DilloDude » Sat Feb 17, 2007 9:31 pm

IF you are using angle, just put
Code: Select all
animpos = (angle / 360) * nframes;
to get a basic one. For a more efficient one, if you have 36 frames, you can use
Code: Select all
animpos = angle * .1;

For other numbers of frames you will have to adjust the .1
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Troodon » Sat Feb 17, 2007 10:12 pm

Thanks Dillodude! I will make it 36 frames, but do you know any good software to rotate an image without having troubles with the blackground? Is the paint.net for example good enough?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby DilloDude » Sun Feb 18, 2007 1:09 am

I don't know really. Most of the time when I do rotations I use a 3d model.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Sgt. Sparky » Sun Feb 18, 2007 3:25 am

use animation shop 3 :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sun Feb 18, 2007 12:58 pm

I'll try that, thanks! :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sun Feb 18, 2007 1:22 pm

you are welcome :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sun Feb 18, 2007 9:39 pm

I made a very nice 360 frames animation with Animation Shop 3! It's pitty that my animation shop is trial and will finish in I think 20 days. Maybe I should make now lots of rotating sprites for my future's game projects.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Fuzzy » Mon Feb 19, 2007 12:26 am

Gimp will work for that too, no expiry, and it has an animation add on, also free, but i havent tried it yet.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Troodon » Mon Feb 19, 2007 12:38 am

One of my friends mentioned gimp but I didn't found the animation system from it. Maybe I just haven't got the addon or something. 8)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Fuzzy » Mon Feb 19, 2007 1:08 am

http://gimp-win.sourceforge.net/stable.html

if you are using windows.. its at the bottom of that page.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Troodon » Mon Feb 19, 2007 9:44 am

THANKS! :D :shock: :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Joshua Worth » Mon Feb 19, 2007 11:37 am

tekdino wrote:One of my friends mentioned gimp but I didn't found the animation system from it. Maybe I just haven't got the addon or something. 8)
If you are making a gif animation, just use the layers dialog, and add a layer for each frame.
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby Joshua Worth » Mon Feb 19, 2007 11:38 am

DilloDude wrote:I don't know really. Most of the time when I do rotations I use a 3d model.
Same here!
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby Troodon » Mon Feb 19, 2007 11:41 am

I am also using a 3d model in one of my current game projects, but sometimes I need a smooth rotation of 360 frames. :)
This is one 3d model I made for Orbiter and for one of my game projects:
Attachments
snap14resized.jpg
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest