Action-RPG Gamekit/SDK (WIP)

1 favourites
From the Asset Store
All you need to create an action RPG game, the Gamepack features sprites destined for instant use !
  • Hello again guys. This time I'm trying to create enemies like TEKTITES and POL's VOICE.

    Implementing AI to have them move around is easy enough but how are they programmed to JUMP around the place like they do?

    I've been trying to simulate that as you can see in the capx below.

    I used the platform behavior and create a Jump Through Platform beneath them whenever they jump only to have it be destroyed when they land. It works fine even while moving down and side to side but I'm having trouble having it jump while moving up. World gravity and 8-Direction movement are working against each other, preventing the platform and character from colliding.

    http://s000.tinyupload.com/?file_id=476 ... 1698489784

    Now implementing the jump is one thing but how about having multiple Tektites/Pol's Voice on the screen? How do you manage multiple enemies with multiple shadows???

  • Here's how I do it. The method I use might be more complex than you need, but it's also very flexible:

    All player characters, enemies and such are in a family called units.

    I create an invisible object called base and put it in a family called bases.

    All variables given to those objects are done by giving the families variables instead of directly to the sprites. This makes it easier to compare the values of two of the same object interacting with each other.

    At the start of the layout, I create an invisible base object at each of their locations. I store the UIDs of the units/bases they're paired with as family variables.

    I also create a shadow sprite. It's separate from the base for positioning purposes.

    The base objects are the real controlling objects where most of the code happens. Because all the player characters, enemies and NPCs are controlled by the same type of object, it's easy to control them however I want by just changing their variables, like if variable mode = wandering, etc.

    The part you're probably most interested in --> The base objects have the variables z and zModifier. The zMod variable is the speed of movement on the z axis (jumping in the air, visually it's the same as the y axis, the z variable is really just the distance between the base location on the ground and the unit in the air), and it is added to the z variable. When in the air, the gravity rate is always subtracted from zMod. When z is lower or equal to 0, the object is on the ground, and depending on the velocity in can be set to bounce.

    Every tick, unit locations are set to base.x, base.y-base.z. Because of how construct works, as long as there are the same number of bases and units (destroy any in the layout before creating them for each unit) no for each is needed, and the units are all at the location of the correct base. I place the shadows at unit.BBoxLeft, base.y and set the shadow width to the unit width (the shadow hotspot is on the left).

    Another benefit to this method is collision can be checked in 3D by first checking for collisions or distances between bases, then checking if their units are overlapping.

    The main downside to this method is it requires a lot of for each loops in situations where construct's auto-picking doesn't work, but I consider the ease of use while coding and versatility to be worth it. If only C2 had containers that could be modified at runtime like CC had with the picker plugin... maybe C3 will have that feature.

    I haven't checked your code, so apologies if I just explained most of what you're already doing, I just thought I should make it clear. Even if you don't want to use my method, perhaps the part about the variables will be helpful.

    You can see this method in action in the gif in my sig. There are more including some of a flying enemy in the first post of Loot Pursuit's devlog.

  • This stuff is definitely beyond me! But one day I'll attempt making my own overhead action rpg. Or beat-em up! That's why I've favorited these two scirra arcade games.

    https://www.scirra.com/arcade/tutorial- ... -4684?cp=8

    https://www.scirra.com/arcade/tutorial- ... ights-5508

    The pages both include downloads to the source capx and both files basically have examples of smooth overhead/2.5/8 directional jumping. Maybe this can help you? The author straight up says "on summer nights" is the superior capx. There's some bugs in the "golden axe" capx. You can somehow fall through the stage.

  • Hello again guys. This time I'm trying to create enemies like TEKTITES and POL's VOICE.

    Implementing AI to have them move around is easy enough but how are they programmed to JUMP around the place like they do?

    I've been trying to simulate that as you can see in the capx below.

    I used the platform behavior and create a Jump Through Platform beneath them whenever they jump only to have it be destroyed when they land. It works fine even while moving down and side to side but I'm having trouble having it jump while moving up. World gravity and 8-Direction movement are working against each other, preventing the platform and character from colliding.

    http://s000.tinyupload.com/?file_id=476 ... 1698489784

    Now implementing the jump is one thing but how about having multiple Tektites/Pol's Voice on the screen? How do you manage multiple enemies with multiple shadows???

    As much as I would want to help you and that your problem is partially on topic, I would appreciate my thread not being hijacked. If you need help, it's best to create a thread in the "How do I..." board.

  • LaDestitute - Er... whoops. I read the post and responded without checking who the poster was, thinking it was you. Apologies for participating in the derail!

    MPPlantOfficial as LaDestitute said, please create your own thread.

  • As much as I would want to help you and that your problem is partially on topic, I would appreciate my thread not being hijacked. If you need help, it's best to create a thread in the "How do I..." board.

    Oh alright I'm sorry. I didn't realize I was being insensitive

  • LaDestitute - Er... whoops. I read the post and responded without checking who the poster was, thinking it was you. Apologies for participating in the derail!

    MPPlantOfficial as LaDestitute said, please create your own thread.

    Alright thanks for the reply, Arima. By the way the way I'm mirin' how the blob bounces on your sig. Great stuff!

  • Pretty much done, besides final touches to apply...then to figure out how to handle save data, which should be pretty simple.

  • A new build, with working savedata!

    Subscribe to Construct videos now
  • Oh man this is great! Well done LaDestitute!

  • Although there probably won't be a video to showcase this (unless I can record a video with me using the 360 USB gamepad in tandem like a picture in picture mode), Zelda Gamekit is now in pre-alpha version 0.9!

    This marks the introduction of rebindable keyboard controls and full gamepad support.

  • Fantastic, systems are great.

  • This looks amazing.

    Just curious do you plan on releasing the .CAPX for others to learn from?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great job LaDestitute, but I think that you have to change the character appearance, its name and the soundtrack used, just to avoid a copyright strike from nintendo in the future in case your game gets to the public.

  • This looks amazing.

    Just curious do you plan on releasing the .CAPX for others to learn from?

    Yes, eventually.

    Great job LaDestitute, but I think that you have to change the character appearance, its name and the soundtrack used, just to avoid a copyright strike from nintendo in the future in case your game gets to the public.

    I already have that covered potentially, plan wise. I was planning on just releasing the final build for free use as is non-commercially (just put a copyright warning in the capx's zip), but I'm increasing tempted to replace the assets and eventually put it on the Scirra store.

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