Sonic 2D Engine (Gamemaker Studio 1.4)

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии • 9

  • @diamondmanpixel76_ng
    @diamondmanpixel76_ng 17 дней назад

    nice!

  • @heirloom_hunee
    @heirloom_hunee 15 дней назад +1

    Very cool! How’d you recreate the physics so well?

    • @TheRealLifeSonicTheHedgehog
      @TheRealLifeSonicTheHedgehog  15 дней назад +1

      First you have to check for collision with slopes then push sonic out of the slopes and snap sonic to the surface of the ground. Then the physics code handles his ground speed acceleration deceleration and friction. Ground speed is manipulated by the angle of the ground which is being calculated by my angle detection code or you can use slope tiles and manually set their angle to 45, 315, 26.7 ect whatever the angle of that tile is. Sonic uses two ground detection sensors. Sensor A and Sensor B to check for ground tiles. The sensors also get the distance from the ground so if sonic is inside the ground you will have a negative distance value. (Distance = -14) If above the ground it's a positive distance (Distance = 6). Which ever sensor has the smallest distance is the sensor that is used to get the angle of the ground. The original games use tiles if sensor A gets a distance of 6 that means that sensor is closer to the grounds surface then the other sensor B which calculated a distance of -14 sensor A is closer so that means sonic is closer to the tile that sensor A has detected. Sonic will snap to that winning tile and get the angle of the tile. Ground speed is manipulated by angle and a slope value that has 3 modes. Slope_regular slope_rolldownhill and slope_rolluphill

    • @heirloom_hunee
      @heirloom_hunee 14 дней назад +1

      @ crazy in-depth explanation. Can’t say I expected that ngl, but thanks a lot
      might use this to make my own engine

    • @TheRealLifeSonicTheHedgehog
      @TheRealLifeSonicTheHedgehog  14 дней назад

      @@heirloom_hunee the sonic physics guide explains everything I said. My engine is unique though since I found a special collision code that works for any object. I also have a precise raycast and angle detection code that I made myself so it works a little better than the original games but the sonic physics guide is perfect

  • @kenvvz1349
    @kenvvz1349 17 дней назад +1

    are you actually O's manager bro