User Tag List

Results 1 to 10 of 10

Thread: Scrolling Knytt stories - Super Mario Example

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Scrolling Knytt stories - Super Mario Example

    I don't know if anyone else has done this and submitted it yet, so here goes.

    I've been analyzing the Knytt Stories code very thoroughly, and trying to optimize it into being more flexible. Varying tile sizes, top down or side scroller formats. Multiple tilesets. ETC. One major aspect is Scrolling. Knytt Stories is what would be classified as a "Metroidvania." Large single environment, on a large grid. Also akin to a Zelda.

    In this example I have completely recoded the engine from scratch to include single large environments. These levels are scrolled and rendered in real time, as apposed to rendering an entire screen between screens as Knytt did.

    The example shown here is a remake of the first Super Mario Bros. Levels scroll horizontally and render as you go.

    I've included two modes: The classic "can't go backwards" mode, which erases the level as you go forward, and a new style which renders the level as you go, but keeps the rest still in memory for back tracking.

    The Mario Level file shows how these examples. The "How Mario Works" file is a zoomed-out view of a Mario game. You can actually see the level rendering as you go. It helps in comprehending the out-of-sight rendering system used.

    The example only uses 1 layer, and all BGs are obstacles.

    Now since this engine is crucial to my upcoming projects, I have scrapped a lot of functions and comments from the file, so as to not leak the full code. But I hope some can still learn from it.

    What this engine is, basically, is the very backbone of all NES games core map rendering engines. Gotta start with the basics!
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    Here is my study into partial scrolling, Zelda Style!

    The screen scrolls only when the edge of the screen is met.
    This isn't just a scrolling method though. Just like the Mario example, each room is rendered tile by tile on call as you change rooms. And like wise, each room is deleted from memory right after. All seamlessly done behind the scenes.

    This Zelda example is only Executable for now. I'll add the source some time after my game demo releases (in a few days).I'm working on a dungeon crawler Zelda clone, "Legend of Leeward" which uses this render engine.

    Its not like this code is proprietary or revolutionary or anything like that. Its just that I wouldn't want to see someone use my code and beat me to it. Not until I'm done with it.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    Well, I've been busy. Unfortunately, not with MMF. I haven't gotten around to fully finishing that level...

    Here's the source to the render engine, as I promised. The Map Maker file is a tile editor, and the Traveler file is the "in game" version. Its obviously lacking any real gameplay, as I'm still working on that.

    I'm not entirely sure if the Map Maker is fully stable. I only designed it to my specific needs. Its got 4 layers, a world map, and a tile selector. I tired to make it modular in essence so its easy to edit.

    I will upload the full game as soon as I finish.
    Attached files Attached files

  4. #4
    No Products Registered

    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    Hey JimJam, this is a beautiful level editor, awesome job!

    I was messing around with the level editor and I found a few oddities:

    When I try to use the arrow keys to jump around the mini-map it doesn't go where it should. The real map goes to the right spot, but the minimap doesn't. I'm not sure why it is doing this to me... I mean, the event is the exact same one used for clicking the arrows. Kinda bizarre. Does this happen for anyone else?

    When I copy a room and then paste into an uncreated cell on the minimap it makes every uncreated cell look like that room until you press create again. And even then it will still make most of them look like they are that room.

    Hope these things help.

  5. #5
    No Products Registered

    Join Date
    Mar 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    this looks insanely interesting but every time i try to open the mario thing it just crashes. idk why, iv e nvr had trouble b4, plz any advice?

    EDIT: i still have no solution but judging by what im reading this could be a fairly good "fog" or "vision range" engine, to liumit a players view as desried. but im not aur ei can gte it to run without crashing.

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    Quote Originally Posted by Physco
    this looks insanely interesting but every time i try to open the mario thing it just crashes. idk why, iv e nvr had trouble b4, plz any advice?

    EDIT: i still have no solution but judging by what im reading this could be a fairly good "fog" or "vision range" engine, to liumit a players view as desried. but im not aur ei can gte it to run without crashing.
    Does it crash upon opening the mfa file, or upon actually running the program?

    Are you only having trouble with the Mario application and not the Zelda one, or both?

    More specific details will help in diagnosing the problem... I'm not quite sure what it could be. It could be that the pasting of tiles could be using up too much memory on your machine. Either that or some sort of extension compatiblity issue.

    If you can, try building the file as an EXE, and run the application from that. This will see if its the program itself that's bugged, or maybe just a MMF2 runtime error.

  7. #7
    No Products Registered

    Join Date
    Mar 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    well zelda does fine, but mario crashes mupon running the application, and my computer has 4 gigs of ram on vista 64 bit. wiht a 2.1ghz duo core, but ive loaded the mfa it doent give an extension nerror for not having any extensions, so i just dont know.

  8. #8
    No Products Registered

    Join Date
    Mar 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    solved, i had to extract from the .zip xD i always boot fresh from winrar

  9. #9
    No Products Registered

    Join Date
    Mar 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    i find the mario thing with deletion and creation quite... interesting... im looking into it but from what ive seen it would be possible to switch groups of events (or something like this) dependent on player direction, this would enable deletion and creation both ways (possibly?) so after i play with your awesomeness some more il let you know what i find with the capabilities of this raw-ish engine.

    -also it would be interesting for this to be put into online use to reduce lag possibly? or interesting if it was pulling maps straight off the internets? this here is all unknown to me atm.

    anyways great work. thanks for submitting to the greater benefit of the community.

    -Phys

    EDIT: while at first seeing so many counter commands made me want to scream, i realize it goes towrd your more "flexibility" very nice top able able to edit tile size to the desired.

  10. #10
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    338
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling Knytt stories - Super Mario Example

    Sorry for the late reply. The over-use of counters was intentional. When developing an engine, I always use counters for their flexiblity (min, max, displayable for debugging, and deletable.) If you use all Alterable values, then you have to constantly search active objects to fine out which object is handling which variable.

    Alternatively, I could use global values. The only problem with global values is that they are in a predetermined list order. There is no way to organize the variables, or delete them if you have no need for them anymore. Its great if you have a solid plan, but annoying when you are experimenting and tinkering with lots of values. I usually convert all counters back to alt values when I am finished, but I didn't take the time to this time, sorry. But I find that the counters are nice and organized themselves.

    The point of my example here was that this IS the method in which commercial games do render graphics to the environment. All old games used this method to some extent. In lots of NES emulators you can even see the tiles at the edges of the screen "popping" into place. Even the Grand Theft Auto games use a grid-based rendering system to dynamically load in large environments with no lag. Granted that San Andreas' grid squares are HUGE (larger than 4 city blocks) they do basically use the Zelda rendering engine, loading in large prebuilt areas.

    I did a lot of studying into the underlying foundation of video games' structure to find this conclusion, and I find it all quite fascinating.

Similar Threads

  1. Scrolling Ó la Super Mario
    By Dbzes in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th June 2007, 01:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •