Sonic and Sega Retro Message Board: New Game Maker Studio Sonic Engine - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 5 Pages +
  • ◄ First
  • 2
  • 3
  • 4
  • 5
    Locked
    Locked Forum

New Game Maker Studio Sonic Engine To tide us over until AeSthEte.

#46 User is offline AeroGP 

Posted 18 July 2013 - 01:48 AM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8
Alright, try this and see if it will work, Hart.

EDIT: Here's a .gm81 for good measure.
This post has been edited by AeroGP: 18 July 2013 - 02:03 AM

#47 User is offline MalcomX 

Posted 18 July 2013 - 01:33 PM

  • Posts: 20
  • Joined: 11-July 11
  • Gender:Male
Quick question(s). I've gotten 8-dir ground rotation to work properly, but I'm having some issues with setting the angle while Sonic's in the air. Normally in this engine, when Sonic runs up a curve and into the air, his angle gradually sets back to 0 using 360 degree movement. But I want it to look like the genesis games, where his angle is changed in increments of 45 degrees (I think that's how it's done). I believe this code is used to change the angle in air in the player_state_fall script:

if not spinning and (image_angle!=angle) image_angle = angle_wrap(image_angle+2.8125*sign(angle_distance(image_angle, angle)));


As I believe I'm on the right part of the code, so my first question is, what exactly is this code doing? And how would I make it so that the player's angle is set back to 0 in increments of 45 degree movement rather than picking up every angle in the air. I hope I worded this correctly so that someone understands.

Also: Last post as a Trial Member so I probably won't be able to respond again until validation, so thanks in advance if the question gets answered.

#48 User is offline AeroGP 

Posted 18 July 2013 - 01:41 PM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8

View PostMalcomX, on 18 July 2013 - 01:33 PM, said:

Quick question(s). I've gotten 8-dir ground rotation to work properly, but I'm having some issues with setting the angle while Sonic's in the air. Normally in this engine, when Sonic runs up a curve and into the air, his angle gradually sets back to 0 using 360 degree movement. But I want it to look like the genesis games, where his angle is changed in increments of 45 degrees (I think that's how it's done). I believe this code is used to change the angle in air in the player_state_fall script:

if not spinning and (image_angle!=angle) image_angle = angle_wrap(image_angle+2.8125*sign(angle_distance(image_angle, angle)));


As I believe I'm on the right part of the code, so my first question is, what exactly is this code doing? And how would I make it so that the player's angle is set back to 0 in increments of 45 degree movement rather than picking up every angle in the air. I hope I worded this correctly so that someone understands.

Also: Last post as a Trial Member so I probably won't be able to respond again until validation, so thanks in advance if the question gets answered.


In psuedo-code: if the player is not spinning and his visual angle does not match his actual angle, increase the visual angle by 2.8125 times the sign of whatever direction the actual angle is from the visual angle, then wrap the result to 360 degrees.

to snap this to degrees of 45:

if not spinning and (image_angle!=angle) image_angle = angle_wrap(round((image_angle+2.8125*sign(angle_distance(image_angle, angle)))/45)*45);


You just divide the result by 45, round it, then re-multiply 45 to get the nearest degree of 45.

That line is a bit loaded, so you could also split it to make it easier to read:

if not spinning and (image_angle!=angle)
{
    image_angle += 2.8125*sign(angle_distance(image_angle, angle));
    image_angle = angle_wrap(round(image_angle/45)*45);
}


It'd probably be better, however, to apply this same wrapping where the image_angle is used in the draw event:

if sprite_index>-1 draw_sprite_ext(sprite_index, image_index, floor(x), floor(y), image_xscale*facing, image_yscale, round(image_angle/45)*45, image_blend, image_alpha);


EDIT: Ninja'd.
This post has been edited by AeroGP: 18 July 2013 - 01:52 PM

#49 User is offline Lapper 

Posted 18 July 2013 - 01:44 PM

  • Freelance Artist
  • Posts: 1204
  • Joined: 15-June 08
  • Gender:Male
  • Location:England
  • Wiki edits:111
I simply used round(image_angle/45)*45 in the draw event, covering all angles all the time.

#50 User is offline AeroGP 

Posted 18 July 2013 - 01:57 PM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8
If you do the above, remember to apply it to all objEffects that use the same angle. (ie. objTailsEffect)

#51 User is offline AeroGP 

Posted 31 July 2013 - 02:15 PM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8
Opening post updated with a new build. To encourage updating, I've killed all the old links.

Before anyone asks, yes, all the sound issues are gone AFAIK.

#52 User is offline AeroGP 

Posted 08 August 2013 - 12:53 PM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8
Promotional video added to the OP. Check it out.

#53 User is offline Kharen 

Posted 08 August 2013 - 06:57 PM

  • Posts: 370
  • Joined: 29-October 11
  • Gender:Male
  • Location:Spokane Community College - Newport IEL
Um... Is the ground all supposed to be invisible, or did something happen like you were using flickering to try and get a transparent effect and YouTube's frame rate screwed you over? From what I could see, it looks really good, and I wish I had Studio so I could play with it.

#54 User is offline Aerosol 

Posted 08 August 2013 - 07:04 PM

  • FML and FU2
  • Posts: 7627
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
Me too. Too bad I don't really have $50 to throw around to learn how to use an engine. I guess I could use the free edition, but I won't be able to use this engine.

Is there a...reason why this engine needs at least Standard? I'm sure there are more differences, but going by the GameMaker website, the only difference between the free version and the Standard version is "unlimited resources".

#55 User is offline .Luke 

Posted 08 August 2013 - 08:07 PM

  • An Overexcited Freedom Planet Fan
  • Posts: 1196
  • Joined: 30-March 12
  • Gender:Male
  • Location:United States
  • Project:Freedom Planet fan art and two sci-fi novels
I'm pretty sure sprite rotation, among other visual effects, are still limited to paid editions of Game Maker. So the game engine should boot for you if you disable a few things, (Manual 8-way rotation with sprites isn't as RAM hoggy as you'd think.) unless it needs external resources and/or DLLs from startup, then it's going to act picky.

That's if Game Maker Studio still behaves much the same way as with previous versions, however; I don't know if a file itself would be restricted to either Lite or Pro users.

#56 User is offline KingofHarts 

Posted 08 August 2013 - 10:38 PM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1
Game Maker Studio is terrible. I'm simply backporting to 8.1.
If you have a previous version, paid or free, stick with it... Studio just blows.

#57 User is offline AeroGP 

Posted 09 August 2013 - 01:20 AM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8

View PostAerosol, on 08 August 2013 - 07:04 PM, said:

Is there a...reason why this engine needs at least Standard? I'm sure there are more differences, but going by the GameMaker website, the only difference between the free version and the Standard version is "unlimited resources".


The free edition has a resource cap that impedes the amount of scripts and objects needed for the engine to run successfully, and some functionality is limited in the free version compared to standard, such as functions for manipulating surfaces.
This post has been edited by AeroGP: 09 August 2013 - 01:23 AM

#58 User is offline AeroGP 

Posted 09 August 2014 - 07:53 PM

  • Posts: 98
  • Joined: 02-November 06
  • Gender:Male
  • Location:Los Angeles, CA
  • Project:Sonic: Time Twisted
  • Wiki edits:8
New version now available! Here's a changelog: (it is also included with the editable)
Spoiler

This post has been edited by AeroGP: 16 December 2014 - 11:40 PM

#59 User is offline KingofHarts 

Posted 09 August 2014 - 10:38 PM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1

View PostAeroGP, on 09 August 2013 - 01:20 AM, said:

View PostAerosol, on 08 August 2013 - 07:04 PM, said:

Is there a...reason why this engine needs at least Standard? I'm sure there are more differences, but going by the GameMaker website, the only difference between the free version and the Standard version is "unlimited resources".


The free edition has a resource cap that impedes the amount of scripts and objects needed for the engine to run successfully, and some functionality is limited in the free version compared to standard, such as functions for manipulating surfaces.


Just to update... Standard is now free... just need to register your email.

#60 User is offline Lapper 

Posted 10 August 2014 - 01:24 PM

  • Freelance Artist
  • Posts: 1204
  • Joined: 15-June 08
  • Gender:Male
  • Location:England
  • Wiki edits:111
The only thing I can think to fix is the bumpy collision on enlarged shapes. Make it calculate a vector for Sonic to travel on or something. Nice stuff.

  • 5 Pages +
  • ◄ First
  • 2
  • 3
  • 4
  • 5
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users