electric-rain dev blog 001

electric-rain dev blog 001

Advertisemen

While trying to muster up the energy to walk to the kitchen and get something from the fridge, I got sidetracked as usual. Hopefully this will be productive procrastination and I can feel good about not doing coursework which is due in in 48 hours. (Another excuse is that I'm nearly done, just waiting for people to post lots of questions tomorrow, look at the answers and make sure I've done everything)... And now I am getting sidetracked from my sidetrack, so I shall proceed!

electric-rain is its current state is basic framework for a bigger turn based RPG. I will divide it up and explain each part.

Map

The maps are created using the Tiled editor and then are saved using Base64 gzip compression as Slick2d has built in support for Tiled maps - though I have rewritten most of the functionality I am using as it wasn't flexible enough. Say map has n layers, the first n-1 layers are rendered behind the player, the final layer is rendered in front of the player. Tiles on the tileset can have properties added to them, such properties are:
blocked (true/false), whether a tile can be walked through or not
encounterrate (int), the probability a wild occurance happens on that tile
portal (true/false), whether a tile is a portal (a link to other maps)
The map also has a global property spawnNpc, which I will get to later.

NPC

NPCs are defined in res/data/npcs.xml, I won't post an example of it as it will be constantly changing and thus be deprecated by the time I finish (if ever) this post. Currently they are very simple in that they have one line of dialog which is always the same regardless of events that occur. In my test map, I have a cat who says "Meow~~" when you speak to her, and an old chap who talks about the olden days. 

e no intelligence in their movement, they pick a direction, and if it's open, move there.

NPC positions are defined in the spawnNpc string, it is a list of tuples, containing the entity's ID, initial x and y positions.

Wild Encounters

The wild encounters is exactly a lot like Pokémon. 'Nuff said.

Battles

The battle works that you can choose a maximum of 4 players to fight in battle. When in 'safe zones' such as towns you will be able to swap characters in and out of the party (this feature is currently unimplemented).

To fight in a battle, each player on your side chooses an attack/spell to use on a target (unless AOE attack - AOE buffs are currently unimplemented/untested). Also stats of entities are completely ridiculous - no thought whatsoever has gone into them at this point - they are just numbers in the loose sense of the word.

That's all I can remember off the top of my head, need to refactor the code, implement character switching, inventory, make things shinier, more maps, balance stats and I should be ready for a demo!

After the wall of text, I believe a screenshot is fitting:

Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Game Engine Tutorial