![stencyl create actor stencyl create actor](https://photongamedev.files.wordpress.com/2013/06/movement-blocks.png)
#STENCYL CREATE ACTOR CODE#
This block of code prevents us from moving above the scene boundaries at the top of the screen. You may need to adjust your numbers slightly to get the right performance for your game. As this is just an example script I am using a standard scene size of 20 x 15 at 32 pixels per tile. Note: The exact numbers in this block of code may not be right for you. To accomplish this, we would first set blocks of code in place that prevent our player actor from moving beyond zero pixels to the left, and greater than our highest pixel to the right on the X axis (horizontal). Most likely, you also want your actor to not shoot in to space, but you do want them to be able to fall into holes and traps. In a typical platform game, you want to be able to move left or right freely, except in the case of the far left and right borders of the scene.
#STENCYL CREATE ACTOR HOW TO#
I will also show you how to customize this even further to add Mario style effects for fall through's, etc. In part two of how to keep your actors from going off screen, I will teach you how to customize the blocks I gave you in the first tutorial to fit other types of game play, such as a platformer where you want your character to be able to fall through the bottom. When you break it down, there are a ton of reasons why keeping your actors on screen is useful, but what is even more useful is being able to customize that feature to fit any type of game play or scenario. Now, as useful as that is, it doesn't really cover the whole topic of how to keep your actors from going off screen. Having a playable prototype will make it much clearer what systems you will need to build.In the first tutorial, I showed you how I kept my player actor locked in to the camera on a vertical auto-scrolling scene. Once you've finalized your mechanics you can then recreate it in the engine of your choice and add any polish. Use a tool like Puzzlescript ( ) to prototype your mechanics. If you prefer the latter, but still want to end up with a finished game at the end, I recommend scoping down from an RPG to something like a Sokoban-style puzzler ( ). These will allow you to jump right in to building games without needing to learn a graphical UI and are usually more agnostic about how you build your game than fully featured environments. Some good examples in this space are LÖVE (Lua, ) or Phaser (Javascript, ). If your goal is really to just have fun building out gameplay systems as a programming challenge, I recommend using a lightweight code-oriented scripting language engine. If you spend your time rebuilding them yourself, it's a recipe for stalling out without having much to show. Tools for this genre have been built many times before by people with far more experience building them. Games like Pokemon/Zelda are very content driven and usually don't have any sort of complex systems that require deep access to game engine internals.Īs someone working solo, you are going to want to spend most of your time creating fun/interesting content.
![stencyl create actor stencyl create actor](http://sysads.co.uk/wp-content/uploads/2015/08/stencyl.jpg)
If you goal is to work on a top down Rpg-style game, as a single developer I would HIGHLY recommend using a tool like RPG Maker ( ) Stay away from Unity.2d is a second-class citizen in Unity. Tons of commercial indie hit have been made and continue to be made with GMS2.
![stencyl create actor stencyl create actor](https://cdn.80.lv/api/upload/content/ba/images/5d274766ccf02/widen_472x0.jpg)
If you ultimately develop commercial indie aspirations, you may want to move to GMS2 as it makes it easier to do things like publish to consoles and integrate Steam APIs. So you just have a while loop in main() that checks for whether the window should be closed and lets you do whatever updates in whatever order you want. Free, open source, lightweight, portable, friendly and helpful Discord community, super helpful and friendly and engaged lead dev, bindings to tons of languages, builds for many platforms, straightforward high-level API that is sufficiently documented by a simple cheatsheet, a great set of related gamedev tools taht are also developed and maintained by the same lead dev, and it's just a (C99) library, not an inverted-control framework. If I had to pick one, I'd say go with raylib.
![stencyl create actor stencyl create actor](http://fotos.subefotos.com/1598c20cf0f2b864957ae300dfe6d564o.png)
For 2d gamedev, I recommend raylib, GMS2, or Godot