Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[GM8] Sonic Dash+ Project


Recommended Posts

Okay, now I see that Overbound has already made a level tally, and it has fucking blown my level tally out of the goddamn water.

For archive's sake, though, here's mine so you can laugh at it.

Create Event:

set variable weeb to 0

execute code:

sound_stop(global.Music);

sound_play(sndLevelEnd);

objGlobalController.scoring = 1

timebonus = 413

ringbonus = (global.Rings*100)

hapen = 0

happen = 0

happpen = 0

happppen = 0

move = -320

scoretimemin = (floor(global.GameTime/60000))

scoretimesec = (floor(global.GameTime/1000))

if timebonus = 413

{{if scoretimemin < 1 & happpen = 0

{if scoretimesec < 30 //Game clock reads 0:29 or less = 50000

{timebonus = 50000}

else if scoretimesec < 45 //Game clock reads 0:30 to 0:44 = 10000

{timebonus = 10000}

else //Game clock reads 0:45 to 0:59 = 5000

{timebonus = 5000}}

else if scoretimemin < 2

{if scoretimesec < 30 //Game clock reads 1:00 to 1:29 = 4000

{timebonus = 4000}

else //Game clock reads 1:30 to 1:59 = 3000

{timebonus = 3000}}

else if scoretimemin < 3 //Game clock reads 2:00 to 2:59 = 2000

{timebonus = 2000}

else if scoretimemin < 4 //Game clock reads 3:00 to 3:59 = 1000

{timebonus = 1000}

else if scoretimemin < 5 //Game clock reads 4:00 to 4:59 = 500

{timebonus = 500}

else timebonus = 0}}

alarm[3] = 120

Alarm Event for alarm 0:

execute code:

happppen = 1; sound_loop(sndCalculate)

Alarm Event for alarm 1:

execute code:

instance_create(view_xview[0], view_yview[0], objTransitionFadeOut)

alarm[2] = 10

Alarm Event for alarm 2:

set variable weeb to 1

Alarm Event for alarm 3:

execute code:

happpen = 1

Step Event:

execute code:

if move = 0

{if happppen = 1

{if global.Rings > 0

{global.Rings -=1; global.Score +=100; ringbonus -= 100;}

if timebonus > 0

{if timebonus = 413 exit else {global.Score +=100; timebonus -= 100}}}}

if ringbonus = 0 and timebonus = 0 and hapen = 0

{alarm[1] = 120; hapen = 1; sound_stop(sndCalculate); sound_play(sndKaching);}

if weeb = 1

{if instance_exists(objTransitionFadeOut) exit

else room_goto_next()}

if !sound_isplaying(sndLevelEnd) and happen = 0 and happpen = 1 {happen = 1; alarm[0] = 3}

if move < 0 {move += 10;}

Just look at it. It's horrible.

Link to comment
Share on other sites

No, Overbound already created a good one. What I'm saying is that if you port over what he's done in the STT engine (which is seperate from SDash+ atm) you'll be better off than trying to port mine. He earlier says that his work is sloppy; this is entirely a lie. He does in one object what I do in two, ableit in slightly longer fashion. If you can forge some sort of weird hybrid between them, it could work better, but if you were choosing his is better.

Link to comment
Share on other sites

The offset on your new Sonic sprite seems to be off in many areas. I'm not really sure how to get the correct offset but I'll look into it.

The breakable wall should work with a little tweaking. AeroGP or Damizean could no doubt tell you a more efficient way to do it but what you have is close to working.

I know why your broken pieces aren't showing up.

piece1 = instance_create(x+16,y-32,objBreakWallPiece)

This script is run in objPlayer so when you use x and y you are referencing the player's x and y coordinates. You need to reference the wall.

piece1 = instance_create(_ObjectHandle.x+16,_ObjectHandle.y-32,objBreakWallPiece)

The shimmy didn't work because you used a different sprite for your shimmy. So various y offsets needed to be changed. Not to mention it was one of the first things I coded in Dash so it was kind of sloppy anyway. So I fixed the offset problems in the sprite and cleaned up the code a bit.

I also messed with the mask and the offset in the collision function. To make it a little smoother.

scrPlayerCollisionBottomObject(sprPlayerMask5, -10, _ObjectHandle)

The collision scripts in Dash are an important thing to know how to use. No one should really be using GM's built in collision event at all within in Dash. Each collision script in dash as a brief explanation within it.

// ==== FUNCTION ====================================================================

// scrPlayerCollisionBottomObject(Mask, Offset, Object)

// ==================================================================================

Mask should always be set to one of the sprPlayerMasks within the player sprites. The mask is then used to check the collision against whatever object you are colliding with.

Offset is used to move the mask's y position up or down.

Then Object is whatever else you are colliding with.

These are important to know because if a collision isn't working like you want it to, chances are tweaking these setting will help.

Link to comment
Share on other sites

Jethawk has shown me the simple way of going to the next level; using Game Maker's own "on contact, go to next room" buttons in an object, but I'd like to learn to do it properly, coding it all.

Time Twisted's works great, but it doesn't translate well, all kinds of variables and globals that I don't recognize and can't bring to vanilla SDASH. :/

Link to comment
Share on other sites

Have a working sign post. Pretty much OverBounds code but with some changes here and there. It no longer needs a global variable that isn't in the original engine to function.

How ever to tell the act it will but I haven't got round to that.

Could create a "Global.Act" variable that is defined each time when a room is loaded. That's how I have done it or you could do it the long way round (if room =1 then act = 1 don't recommend it).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...