How Can I Create Clickable Shapes in a Flash Game?

In summary, the conversation discusses a game programmer seeking help with a physics action involving clicking and dragging on shapes. They provide a flash file as an example and mention the use of a formula to solve the problem. One response suggests using the center of mass to rotate the shape in the direction of the drag, while another asks for a resource on the formula.
  • #1
izikon
2
0
Hi
i have any idea in physics 'i'm a game programmer who needs help
i have this flash file
http://www.knowingames.com/test_ik_06.swf"
the original idea is that i can click any opint on any shape and it'd move
as in the flash exmple

i have no idea what is the name of this physics action
does anyone know ?
or more importent - where i can find a formula that can teach me how to do this?
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Part of the answer is in your example. The small gray dots outside of the shapes represent the center of mass of the shapes. As you drag the object, the line between the point clicked on and the point representing the center of mass tends to line up in the direction you are dragging.

To program it, make the object rotate about the (moving) drag point in the closest direction to make the points line up in the direction you are dragging it. The rotational velocity depends on the drag velocity: the faster you drag it, the faster it rotates.

It's a bit easier to understand if you just forget about the shape and picture a straight line between the drag point and the center of mass that's rotating through the smallest angle possible to match the direction in which you are dragging.
 
  • #3
Thanks - but the idea is that i want to able to clikc and drag and point of the shape
do you have a resource for a formula that solve the problem i have
 

What is a "question for a flash game"?

A "question for a flash game" is a type of interactive game that presents players with a question or problem and allows them to use their knowledge and problem-solving skills to find the answer or solution. It typically involves using a flash-based interface and often includes elements of strategy and decision-making.

How do I play a "question for a flash game"?

To play a "question for a flash game", you will need to have a device that supports Adobe Flash, such as a computer or mobile phone. Simply go to a website that offers these types of games, select the game you want to play, and follow the instructions provided. Most games will have a tutorial or instructions at the beginning to help you get started.

What types of questions can I expect in a "question for a flash game"?

The questions in a "question for a flash game" can vary widely depending on the specific game you are playing. Some games may focus on trivia or general knowledge, while others may involve solving puzzles or riddles. There are also games that incorporate science, math, or other educational topics into their questions.

Are "questions for flash games" only for entertainment purposes?

No, "questions for flash games" can also have educational benefits. These games can help improve critical thinking skills, problem-solving abilities, and knowledge retention. They can also be used as a fun and engaging way to learn new information or reinforce concepts learned in school or other settings.

Can I create my own "question for a flash game"?

Yes, there are many tools and resources available for creating your own "question for a flash game". Some websites offer templates and tutorials for designing and programming these games, while others allow you to customize existing games or create your own from scratch. Just be sure to follow any copyright or licensing requirements if using pre-made assets or content.

Similar threads

Replies
10
Views
1K
  • Computing and Technology
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Programming and Computer Science
Replies
1
Views
562
Replies
6
Views
2K
Replies
2
Views
886
Replies
7
Views
2K
Replies
3
Views
1K
Back
Top