Golfing on the hills

avatar
(Edited)

▶️ Watch on 3Speak


Golfin

Been back to play around the physic engine project(codename Thechariot) and focusing on the golfing aspect of it.
With smaller levels and more focused design I have it up and running on html5 without too much sweat and dips in framerate.

Player's toolset

Now I'm working on some tools to give the player a bit of insight on the shot is gonna try such as when the wood is ready to hit the ball again wich is already working by simply connecting the delay beetwen shot with a change of sprite.
The mouse cursor switch and start glowing white(will have to adjust the colors because it can get mixed with the clouds and other elements) when the shot is ready and stop when the shot is in cooldown.

gold.png

The guiding line is giving me a bit more headache because I can easely draw a line beetwen 2 object but I'm still not sure how to project it toward the hypothetical shot direction. I could try to use an orbiting invisible object around the ball but I prefer solving it by code right now.

asad.png

I'm gonna try different solution as probably I will need a different function instead of draw_line. Maybe Draw_arrow could be the winner in this situation.

Cereal Skewing

A great satisfaction has come by following this tutorial by 1up indie

that show how to make the grass or other object skew around simulating the wind.
I adapted the code to react as the player pass by and for another cool object that I want to show next time and making me loose time because I love to interact with.

Here's the code wich I adde the lines for "place_meeting(x,y,obj_golfball)" and when the two are not interacting so that it increases the SkewX levels when they are close by and play a small sound.

cdcd.png

This is the draw event where the SkewX variable interact with the shape of the sprite

asca.png

Have a goodday everybody :D


▶️ 3Speak



0
0
0.000
0 comments