#C3Jam STEALTH_2D stealth sandbox

0 favourites
  • 5 posts
From the Asset Store
Stealth Game
$39.50 USD
50% off
After 6 months of development, countless source recording & editing sessions we happily present you with Stealth Game.
  • http://www.newgrounds.com/portal/view/694155

    by Jaydon (aka the all-nighter) & Sved

    STEALTH 2D

    [quote:3tbhexxa]You are infiltrating an extremist triangle cult, trying to get your hands on the Trinity, the famed idol they stole and use in eldritch rituals.

    A make-your-own-level top-down action shooter with stealth mechanics, inspired by sandbox games that features an editor for creative mode.

    Not to mention you could also share your level creations!

    ---

    Hold "H" key for HELP & INSTRUCTIONS.

    I recommend downloading and importing the demo level to try it out:

    https://www.dropbox.com/s/ej4priyyzynqbds/Newgrounds_Stealth_v2.0_myGame.json?dl=0

    To import, just drag file into the "OPEN" icon or just click "OPEN" and select file.

    ---

    Game Controls

    WASD to move, aim with mouse

    left click to fire (open these doors with your GUNS)

    go up close without getting seen for melee kills

    Enjoy!

  • Wow...that level editor was awesome .

  • Wow...that level editor was awesome .

    Hey, programmer for Stealth2D here Thank you, glad you like it!

    Thought would be nice to share the code logics with you guys here. These were used to accomplish import/export:

    • Dictionary & Array objects
    • AJAX
    • LocalStorage
    • FileChooser with some CSS editing

    The tiles seen here which are the building-blocks of your level, are actually just 1 single Sprite object with multiple frames representing different tiles. The animation speed is then set to 0. With the condition for comparing frames, I could get hold of these tiles for data use.

    Since the grid sizes are 128x128, all placed tiles are in the coordinate of (origin.X*128, origin.Y*128). With that said, I could easily store them in arrays according to their individual origins. For the Z depth of the Array, 0= tile.frame, 1=rotation, 2=flip. For flip it is just 0 or 1 which works in conjunction to a boolean.

    For each tile placed, a storing function is triggered which includes storing the tiles to an Array, then parse the Array JSON string into Dictionary and then finally store Dictionary JSON string into local storage. This is how the save works. As for loading files, it's just reversing the order starting with a given JSON string of the Dictionary (which is also the exported file), then extract that Array from the Dictionary, then finally spawn tiles accordingly. The surprising part was, IT'S SO FAST! All these happen in split seconds and I'm really happy with the results.

    As for loading the PLAY, it's the same but this time the tiles are replaced with objects, each with their functions in the game. That's it! Two layouts was used only, with 17 event sheets used and loads of codes (especially functions) and you get Stealth2D!

    Also, not to mention the names for each tiles are actually stored in the Dictionary JSON file created in C3! Which I found out that the HTML5 export did not include it and I had to manually add a global string that contain the JSON string of the tile names.

  • Super sleek editor. Really nice.

    You know, it would be a nice addition if you made it so that the wall tiles automatically rotate and change to match the ones around them. something similar to how automatic tilemaps are done. With this the Arrays to store the map could become even simpler as well.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Great idea! That'd be something to consider on the next update (along with sounds, bodies, more tiles... )

    edit: we added the bit of backstory that explains the context, here and on newsground, enjoy!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)