Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411472 Posts in 69369 Topics- by 58423 Members - Latest Member: antkind

April 23, 2024, 11:33:08 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsHow to make medusa heads movement on game maker?
Pages: [1]
Print
Author Topic: How to make medusa heads movement on game maker?  (Read 7626 times)
antoniodamala
Guest
« on: April 27, 2013, 01:19:31 PM »

Also do you guys know how to make a map horizontally infinite ? Both questions are for a shmup.
Logged
Dr. Cooldude
Guest
« Reply #1 on: April 27, 2013, 01:32:38 PM »

The movement of the Medusa Heads (assuming you're talking about Castlevania) seems to be a simple linear movement on the X axis (towards the player), and a sine wave movement on the Y axis.

I haven't used Game Maker for at least a billion years, but I found this tutorial on the internet: http://csanyk.com/rants/2012/10/game-maker-wave-motion-tutorial/ Thought it might help.
Logged
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #2 on: April 27, 2013, 02:17:38 PM »

making the map horizontally infinite isn't the way you do this at all. what you do is simply check if the medusa head's x is beyond the room_width or less than 0. if so, move it to the other side of the map from where it is. you can make an object wrap around a map without making the map actually wrap around itself

as for the up and down movement, use sine waves; it's pretty simple, a lot of sine methods can work. something simple like y = ystart + 40*sin(x); works wonders. to get it to look the way you want you may need to adjust those values, like maybe y = ystart + 60*sin(x/3); would work better. adjusting the stuff inside the sin will change the frequency of the wave, and adjusting the value the sin is multiplied by will change the amplitude of the wave
Logged

antoniodamala
Guest
« Reply #3 on: April 28, 2013, 10:17:49 AM »

Thanks, guys. It worked. Smiley
If a i wanna put the score in a math function, how do i do that?
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #4 on: April 29, 2013, 02:36:00 AM »

Score can be used like any other variable. For instance to add 50 to your score, use score += 50.
Logged
Ant
Guest
« Reply #5 on: April 29, 2013, 04:46:53 AM »

Quote
y = sin(a)*40;
a++;

holy crap sin where have you been all my life <3
Logged
csanyk
Level 0
*


I like pugs.


View Profile WWW
« Reply #6 on: April 29, 2013, 02:44:50 PM »

The movement of the Medusa Heads (assuming you're talking about Castlevania) seems to be a simple linear movement on the X axis (towards the player), and a sine wave movement on the Y axis.

I haven't used Game Maker for at least a billion years, but I found this tutorial on the internet: http://csanyk.com/rants/2012/10/game-maker-wave-motion-tutorial/ Thought it might help.

Thanks for the traffic:) I'm glad you liked it.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic