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.

Newcomers DBPro Corner / Hangman Game - Is there a way to rotate an ellipse?

Author
Message
Billups138
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 25th Mar 2011 03:57
For the arms on my hangman game it looks bad but it would be much better if they were rotated. Is is possible to do so?

The object of war is not to die for your country, but to make all of the other bas***** die for theirs.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Mar 2011 18:49
I don't think so.

You could use sprites instead. They would be much better for a hangman game. Just create the images in a free image editor (GIMP for example), load them into DBP and turn them into sprites.

Billups138
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 27th Mar 2011 04:52
like a said i am very new so how do you load a image?

The object of war is not to die for your country, but to make all of the other bas***** die for theirs.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Mar 2011 07:10
For starters, see the DBPro help on "LOAD IMAGE".

Here are some rotating ellipses, no loading needed.



Billups138
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 27th Mar 2011 07:34
thanks Rich Dersheimer but i want the ellipse to be an arm in my hangman game, i need it to be rotated, not rotating so i dont want it to be moving... hope that makes sense

The object of war is not to die for your country, but to make all of the other bas***** die for theirs.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 27th Mar 2011 08:23
Quote: " i need it to be rotated, not rotating"

The rotate sprite command will rotate the sprite at a given angle. In Rich's code, the given angle is always changing resulting in the sprite rotating. If you give a constant number such as 80.0 then the sprite won't be rotating but rotated. Hope this makes sense.

A clever person solves a problem, a wise person avoids it - Albert Einstein
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 27th Mar 2011 09:40
Or just rotate it once outside of a DO/LOOP. Really though making the hangman move a bit down and move the arms up as if he's falling when his whole body is done will give it a bit more oomph for your game.

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Mar 2011 16:36 Edited at: 27th Mar 2011 16:37
Quote: "thanks Rich Dersheimer but i want the ellipse to be an arm in my hangman game, i need it to be rotated, not rotating so i dont want it to be moving... hope that makes sense"


Yes, perfect sense. I made them constantly rotate to illustrate how offsetting the x and y location affects the rotation. After all, your upper arm rotates at your shoulder, not at some point outside your body, or half-way between your shoulder and elbow.

Here's another example of the rotation point affecting rotation.



@Grog - Gruesome!

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 27th Mar 2011 18:49 Edited at: 27th Mar 2011 18:51
Quote: "@Grog - Gruesome!"


Hahaha

Login to post a reply

Server time is: 2024-11-16 18:23:08
Your offset time is: 2024-11-16 18:23:08