The Daily Click ::. Forums ::. Klik Coding Help ::. 360 Degree Active Object Rotation.
 

Post Reply  Post Oekaki 
 

Posted By Message

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 16:22:02 -

Wasnt there once an object which could auto generate the graphics realtime for rotating an object 360 degree?

If thats the case which.

Hugs Tina

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th August, 2006 at 16:33:03 -

In TGF: You can't, as far as I know.
In MMF: Active picture object, but I'd rather use Alpha Channel Object, because it can store images internally plus lots of other features.
In MMF2: All Active Objects can be scaled and rotated in runtime.

Image Edited by the Author.

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 16:37:26 -

the only problem i got with Alpha is action point where which how.. can it be done.. requires some extreme calculation doesnt it?

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th August, 2006 at 16:41:47 -

Action point? You mean hot spot, or do you want to shoot stuff with it? Because I'd just do the shooting by creating the bullets or whatever on the object, and then moving them with Sin and Cos and all that shite.

Image Edited by the Author.

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 17:00:45 -

I found it easy to just move the hotspot of the bullet.. Since its 100% topdown shooter this is the easiest way i think..

Another thing.. when i use direction calculator it turns the opposite way.. Any ideas on that?

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
20th August, 2006 at 17:04:44 -

invert your math?

 
Craps, I'm an old man!

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 17:08:19 -

dont see how
Direction( "Advanced Direction Object", X( "Active" ), Y( "Active" ), X( "Alpha Channel object" ), Y( "Alpha Channel object" ) )
is invertable it will just make it a few angles lower and still turn the opposite direction of my mouse.

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 17:10:07 -

God genius.. Thanx mate

found it

Direction( "Advanced Direction Object", X( "Active" ), Y( "Active" ), X( "Alpha Channel object" ), Y( "Alpha Channel object" ) )
-
Direction( "Advanced Direction Object", X( "Active" ), Y( "Active" ), X( "Alpha Channel object" ), Y( "Alpha Channel object" ) )
-
Direction( "Advanced Direction Object", X( "Active" ), Y( "Active" ), X( "Alpha Channel object" ), Y( "Alpha Channel object" ) )
makes it turn the right way

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
20th August, 2006 at 17:10:27 -

What about expression*-1 ?

EDIT: k, nevermind. What I suggested would probably show it on the other side anyway.

Image Edited by the Author.

 
Old member (~2004-2007).

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 17:14:27 -

- 3 times and yeah the angle goes negative and therefore the right way.. Now my mouse was off by 90 angle. but just added + 90. Now the direction is 100%

Yeah alpha is nice i see now.. makes games smaller etc, and best thing is it can reverse animations.. now thats kewl being able to ping pong frames to save kb's. Only bad thing is alpha is required.

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 17:55:33 -

I just tested that Phizzy. i loose 2-3% more cpu using alpha. So yes slows it down.. but 45% not really. not for me anyways.

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th August, 2006 at 17:57:28 -

Yeah, Alpha Channel Objects work fine, as long as you don't have like hundreds of them flying around on the playfield.

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 18:01:02 -

yeah and the size..

Before with 32 direction with 20 frames of idle, 9 frames of walking anim
= 438kb uncompressed

now with 320 direction with 20 frames of idle and 9 frames of walking anim
Including 2 alphas. Normal and 1 for when u turn into a ghost.
= 86kb uncompressed

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
20th August, 2006 at 18:02:07 -

Alpha Channel Object uses backwards calculations for some reason. When MMF2 came out and I converted them to active objects I had to change all the values.

You could always do what a lot of earlier 2D games did and prerender all the rotations, but it takes tons of space, obviously.

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
20th August, 2006 at 19:03:10 -

1 more question tonight.. For the machine gun which should fire loads of bullets i dont wanna use alpha, to many objects at a time i think.. How do i do 360 degree bullet fire. is there an extension. Ive tried sine/cos but cant figure that out.

Hug. Tina

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)
   

Post Reply



 



Advertisement

Worth A Click