Mega Drive SGDK Megarunner

Learn how to make an endless runner for the Sega Mega Drive using SGDK! I highly recommend working through the Megapong Tutorial first, as that explains a lot of the basics of MD coding.

Megarunner BONUS - Tile Scrolling


Know what makes any game better? Parallax scrolling! I know that might sound like an overstatement, because it is. But parallax scrolling is really cool, so let’s add a small parallax effect to our game!

This content is a Thank You for my patrons on Patreon.

Please enter the password you received to view this content.

Z6XN8Qu4Ywl+BAlb75GwMA5UwpOS3H/yDi3fQ3qHULKDB0Lt9I24XllBVR8vG8WPlOoR+zMun5+rBTa1BHR6qY9lZ9we5PfyHLHWhxcRrvkXtQflCJFLKAK+O+kIVEobAI5/vt1zmmwA5BZQIZ0GmGJe89S7J8D7nuO9iggcG6+Rc0V6fAYr1zDlB0399x/YcFoJvttnCddzS8BFqgBIICH+d5tpLKmYp0/Tmma2ynxpSg+F1N1UJC3deO/rFwxDU15w0ldQMI2aCPQlDvV1mmc5DRHn/z7fQZnNQtRgVzWE4hX+btW35CwUx2uoUBu0Y5omtvBdZDmw2szt+89vt4cuT+7NrVy+ANoM2J5cu3COihIvi92E4zKGdabUabqWjwADn0lTF0ZvUza2d3gV9MmHbf3FOPsOmjsHC63aZe/DNMkxVyeg0GD2EK045ZaQa5cNV9WmCL/zEC0xhZcG3piuUocq2tfX0WcduQ+wsLdyxwNVGUKck+q68+yvWYQxSVXOvzhWCav1c+/s3Y0fUfZcEN6/hfs2BSn2sLSVtL3LnzOZBW9TQ3RfxIXHDC8P8OlAwvHJaW2J503/NWtM+eqBojx1fqW3mQOoaCRcUUwCS+Tjo1sbN7gTHny2t1O+edKNosbimK2maW4sm8jJL6u9I9aNqCZqxH82iGEulbX6BEGN3I+N1PI3B/DdRDgND8BZ2goTaQqaIOWFCidQ2GtVKwm+EvsKDuiafchZz1ycinpBJaC2o+BuzDJIsNS3xzpm5W88AAmpb2IuiiNLkpf1F1Ua+/AJSvwBb/rU5Jp8hAlGUBnNhvDFhEq5BemZXl2R61OCG70+Sc6BQbasxIARdke8NCKQJ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V0Pol7rzPQg87/pBraHzV2EWCSHnbi8I1MpuzzOLJzjI27sxZAVKo+MRTBiOP9kPYRgM17/T2bpD4BSAiEOLASSu3OEsfzd+AY/ufwUAx8A6P6P8TUhPrcJfwREB2xwGk05Ux4XYkdpgck2lBVUnmase3WCzSzrDG5VBMxfGRU9XXX726QqvAHakJwUA/seXghOEiVINApnBF6OOPGr31MY3cjudWlvWpncxA1ynQaUMG98F/iVE6NmfaF51zW3mSg+mTpJyoji3dzJGezKJwMSI3KKJmvixncEZAToEIHaIIbkg9aPNyl/dCSFwZTjkLj8gKzE+mP+4zx+uwAlPWdFloOacFG3eXWnTfAeTJAfFxhQ+5M6qb9JjdgTexswC4Ov7cdRDUFrhlSc9pIqeWDYMtbmm/pm9C0lzyAMM6xnSqah5vSWmcvp3hDJsh5R6wutsKC8iPPNrFfX7JQL8KjO39dqCJAz66GwvjUOTAdbWJyc1U7ZcL+12zZGBqMzmp0mNG9GedHioOmNDZRDGE/wXpdun4BGKmiVbaP8sIanu1zvB8eXw97j5hJPyvZhzVRrMfvgthM4JOVwDooApIiGVSPaETssauCX150GXdR2Ng6PbPSpwDj8O7rr5CfF3FPmVz3IoFcdvdwilg6yZG/oohxLQzswKMUHxkuOMHUGI8iT/c5N+Rvj6RlPikFpyR840ETPLIP4hQTiVdD7oxbvU3/tBJ1UK1e7MmxSPfsRORhdBHd9F75MWNSvRjYvfjjVvssOyITV7IclHbEbRnZPoXWgFrzpOKWgDGppiBgyZq7RDY/RcbIA1aMjye87cDoldnzYJ32swNJ/to1zN/TNizIGzR2zKZueFi6ju/HOZDPJ7nLXdvwgF9gYOFew7EzXbc0YcxkbXrwKo3DOBg66k7NYypEY4b+pO1BMeiCIFdckQvw4B1vAUrUqQRoj

images/parallax.gif

Thank you for reading and thank you even more for supporting me on Patreon! It means a lot to me and I hope I can keep doing tutorials like this for a long time to come. Until next time and be excellent to each other!

If you have any questions, comments or criticism, post them in the comments below or reach out to me on Twitter @ohsat_games! Special thanks to Stephane Dallongeville for creating SGDK and everyone in the SGDK Discord for their help and keeping the dream alive!

Take It to the Next Level!

Want to boost your Mega Drive coding skills? Get exclusive bonus steps and project files for each tutorial by supporting me on Patreon!

Become a Patron!
Just Want to Buy Me a Coffee?

Check out the rest of this tutorial series!

  • Megarunner 1 - The Framework
  • Megarunner 2 - Tiles
  • Megarunner 3 - Scrolling
  • Megarunner 4 - Player and Obstacles
  • Megarunner 5 - Jumping Math
  • Megarunner 6 - Collision and Score
  • Megarunner BONUS - Tile Scrolling
  • Get Words in Your Inbox!

    Be oldschool and sign up for my newsletter to occasionally get updates and ramblings! Just enter your email address, prove you're not part of Skynet and you're good to go!



    I will not send you spam or sell/give your email address to someone else.  You can of course unsubscribe at any time. By clicking the subscribe button above, you confirm that you have read and agreed to our privacy policy.

    By using the Disqus service you confirm that you have read and agreed to the privacy policy.

    comments powered by Disqus

    Make a Space Shooter for the Mega Drive!

    February 24, 2020
    Mega Drive Ramblings

    Patreon Revamps

    January 28, 2020
    Mega Drive Ramblings Patreon

    New SGDK Tutorial: Megarunner!

    November 4, 2019
    Mega Drive Ramblings