Minigolf - programming challenge

Non-platform specific questions.

Minigolf - programming challenge

Postby matthornb » Thu Jan 13, 2005 3:00 am

I'm trying to assemble a minigolf game with Game Editor for free release on the web.

However, I can't figure out how to code a "putter".

This looks like a pretty tricky programming challenge -

How do I create a putter that can be rotated around and adjusted to hit the "ball" object at different speeds/directions?

And how do I let the player know what speed or direction will result from the hit? (Through "directional lines" and/or a strength gauge)

I'm more of a graphics person than a programmer, and I admit, I don't know how to do this.
matthornb
 
Posts: 8
Joined: Thu Jan 13, 2005 2:46 am
Location: Houston, TX.
Score: 0 Give a positive score

Postby jazz_e_bob » Thu Jan 13, 2005 3:29 am

Oooh physical response - yay!

The simplest "putter" would be a filled circle following the mouse.

The circle follows the mouse and on collision with ball you do physical response on the ball only.

Easy so far. 8)

Putter with a shape different from a circle?

Then you need to have a picture of your shape at all of the angles you need. 360 angles = 360 pictures. You probably only need around 32.

Set it up so that left mouse rotates putter left and right mouse rotates putter right.

The design can easily evolve from this point...

While you are doing graphics make your strength gauge. 2 layers. A front panel with a window for the meter bar to move inside.

Programming the meter is a little tricky. There is a good example in the Moon Defender demo.

Speed and direction arrows can be done with the drawing functions which is not my area of expertise.

Have fun. Looking forward to playing!

:)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby matthornb » Sat Jan 15, 2005 12:08 am

Set it up so that left mouse rotates putter left and right mouse rotates putter right.


I've assembled the circle of sprites for the putter at different angles, but have yet to figure out a useable "rotation" technique.

I'm currently trying to set left and right buttons to change the "angle" while pressed.

Then I set up the "draw actor"event with a script that checks the "angle" and changes the animation (putter1, putter2, etc.) associated with that range of angle degrees..

However, for whatever reason, pressing the left and right buttons in game mode does nothing.

I'm confused.
matthornb
 
Posts: 8
Joined: Thu Jan 13, 2005 2:46 am
Location: Houston, TX.
Score: 0 Give a positive score

Postby jazz_e_bob » Sat Jan 15, 2005 7:01 am

I made a quick and nasty demo for your perusal.

http://www.maybanana.com/pantzboi/game_editor/minigolf%20demo.zip
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest