Wednesday, July 2, 2014

First Person Grid-Based Sci-Fi RPG - Development Diary #1

So, after releasing my first real thing to the mobile gaming world (this), (learning in the way methods to finish Hearts Date Club programming), I decided to take a pause and trying to do something good (or, let's say, for PC)

The idea of developing a simple engine for a Retro First Person Grid-Based RPG in my Sci-Fi context  (FPGB for now on) was heavy on my head. Without hesitation, the second day free to work (more on the first day later) I started early in the morning how possible was to make the Grid-Based Movement in an easy way, compatible with the rest of gameplay.

My first stop was at Unify Community, to see if some clever guy put a free script out there to do all the work for me. I found GridMove. A good little script, capable of make the character move in unity units with a simple animation, and allowing or disallowing diagonal moving or running, but not Turning (I guess, was a good script for isometric views). Also, didn't hold collisions per se, and a SIMPLE FPGB don't need real physics of rigidbodys and gravity and all the fuss to work, just a way to say "you can walk here, but not there".

Then I make my second stop at this compatriot youtube channel that have a series of three basic videos explaining how to do Retro RPG 3d-Dungeon movement. His Script has forward/backward and turn movement, but not side movement, and handle collision by seeing if there is a thing in front out you, but regrettably didn't differentiate Triggers (a must for gameplay flow, for triggering cutscenes, dialogs, actions..) from every other thing.

So I said; TO THE HELL WITH YOU!


So I thought that could not be very hard to "script" in PlayMaker my own movement script. Well, I thought maybe I couldn't make it fluid as the C# movement scripts, but I could try.

I was wrong, I made a wonderful movement script. Forward/Backward, Turning, and sidestep movement, everyone with different animations and sounds. 

I named it Movement "Octopus of Doom" (for OBVIOUS reasons), and you can take a peek on it!

Movement Octopus of Doom Script
Zoom-it!, Love-it!, Wallpaper-it!

First, the StateMachine checks if movement is not deactivated (for cutscenes, for example... Later I can make that if you are hurt or in a confused step, movement work in another way...) Then Just check if you are pressing movement keys (movement arrows and WASD, Q and E for sidesteps); Checks if anything blocks the way we want to go, and execute the movement with a nice Tween and sound. 
The Collision system that uses is any object Layered as Block Movement. Then, I can make the 3d scenario anyway I like (with fences, grass, trees, columns, NPCs, etc), and I put Invisible Blocking cubes in the Block Movement Layer, so when I create the level I easy-designated where the player can go and where not, nevertheless the scenery. 

And... I made this little video, just to show you what a fantastic job can you do with Unity, Playmaker, some imagination and some placeholder art (except the Korinesti (the blue alien), that is GBF Universe Art)





PS: As I was telling you before, the first day free for work, I updated Unity to 4.5. OH MY. They created some "Tooltip" that conflicts with Playmaker and Playmaker third parties, so until I update manually every asset I usually use, I got to manually fix the scripts to go along with 4.5. And was hell. Errors and more Errors. I fixed half the scripts and I fell surrendered to others, delete them and wait to the developers to upload a fix, and decided to work in the things I can actually can work (And made the fantastic Octopus of Doom)

Friendly tip: WATCH OUT WITH UNITY UPDATES!
And if you don't listen..
Swarzennager is cool... They said.