RPG ( ish )Advice

0 favourites
  • 5 posts
From the Asset Store
Over 1700 16x16 pixel art RPG icons for item and skills
  • Hey guys! Have consulted these forums many times before and found answers quickly, this time I really need some advice on a couple of things, it may seem long and expansive but I'll try to be concise!

    I am wanting to create a turn based RPG ish (maybe more roguelike) game where you are in a post apoc environment. You can have weapons that increase hit points to enemies, armor that decreases hit points when attacked, and randomized scenery and enemies that you encounter. Nothing too complex graphically just one screen that displays a nice background and the enemy in front of you. When the screen has nothing there, you click to move to another location. At that point a random variable determines what will be next; an enemy, an item to grab etc.

    This is ok for me, I know how to randomize variables and scenery quite easily, the problem I'm having is that to determine if the enemy has a weapon/armor , what weapon/armor the player might have and so forth, I am using a buttload of variables. I feel I am doing it the long way. Based on this premise would anyone out there have an idea for a way to simplify the event sheet? I know I should be using arrays and functions but not as experienced there despite browsing through the forums and tutorials. I can wrap my head around what arrays do but not how to practically implement them for such a game.

    Sorry guys big post. I'm not expecting anyone to solve my problem entirely, just maybe throw some ideas around to better implement those changing variables you get in an RPG like HP, Attack points, item drops, random enemies. Like I said I can do it my way, but I know you guys would have some great input here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can write a JSON object outside of C2. If you play some funny games with the C2 string object you can load them.

    String items = {C2Dictionary/Array/blah : data="}

    items append json.file

    items append ""}

    Or you can use XML files too.

  • I use arrays for large quantities of data, but the information in it isn't all that complex. Like i have a cell dedicated to what item is in a certain inventory slot. It could be a number value from 0 to whatever I want. Then, when I need to do something with it, I just see if array.at(0,3,4) value = 17, do this, else, do this. You can do the same with ranomizing things and setting a bunch of variables. Make a google spreadsheet or excel document as reference for yourself. Maybe your 5th column always has enemy info. If enemy = 5, set array.at(0,6,0) to 5. Then you can just call, change, and reference your different cells like that instead of having a gigantic list of variables. Just keep a spreadsheet around for your reference so you don't get lost.

  • Thankyou guys I will investigate XML files, and C-7 your example of using arrays gave me a clearer picture of what I can do.

  • OK so after playing around a little I still get a little stuck. I've read and re-read the stuff on arrays, having some difficulty finding an example that works.

    For the sake of understanding , lets say I have two enemy types, two weapon types and their corresponding power (or hit points of damage to be deducted from

    player health on attack).

    On the start of layout I want to spawn either enemy A or B, with weapon A or B, and when they attack the player subtract either value A or B from player health depending

    on what weapon they hold.

    Can someone detail how they would set this up? I feel like I am waiting to read something that helps the whole array thing click for me, it just hasn't happened yet, no matter

    what I attempt in C2 or read in the FAQ sections.

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