Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts
Sunday, July 13, 2014
I Think I Prefer Working With Grids & Tiles
You know how in games like Pokemon you can only move along a grid of squares? How you can count each step and know where you'll end up? I think I'll be working that into my RPGs in the future. Collision boxes are always a headache and especially so with Unicorn Training. It's a good lesson and experience but I really want to work with something simpler to code. Most of my bugs come from collider box issues and it's what I've spent a large amount of time working on. I'd rather put that care into adding new things instead of fixing the simplest of features (the ability to walk around and not go through walls).
Like TriGrid, I can just keep track of all the squares around an object and know if it's okay to move an exact amount of pixels each step. I can even snap to the next position with a little algorithm. Unicorn Training depends on free movement for it's arcade shooter style combat so there's no going back now, but it's really something I want for my future titles.
Wednesday, July 2, 2014
Unicorn Quest: Making An RPG Town Scene - From Gimp To Unity
With my world map charted out it's time to start putting my plans into practice. I'm using the techniques I used to create the battle scene. I start with colored blocks indicating walls, land, and obstacles. Next I do some sprite work to have things to fill space with. After I have blueprints and pieces I line everything up and put it into Unity so I can add collision boxes where they're needed.
See a more detailed breakdown of making the game's forest town, Timber Grove, from sketch to in-game (along with some pictures) below the break.
Tags:
Art,
Code,
Development,
Equica,
MegaPost,
Tutorial,
Unicorn Training
Friday, June 27, 2014
Finalized RPG Text Box System
| I cannot express how proud I am of this thing. |
| I just have to make up words to toss at it and the box handles the rest! |
Tags:
Code,
Development,
Equica,
Unicorn Training
Thursday, June 26, 2014
Changing Camera's Smooth Follow Target
For all of Unity's great features, this drawback is a surprising one. I couldn't for the life of me to get SmoothFlow2D to change it's target the way a Component should. This means the camera will have to always be on the player character in that scene. There are ways around this and they can get pretty complicated. For the sake of time I needed a quick solution. As I started writing this post an idea came to me. Have the camera focus on an invisible object that happens to be on the player, then when I want focus to change, move the object somewhere else!
I wanted the camera to focus on whomever was talking. The results will look the same with this method so problem solved! I really wish Unity's camera worked the way I wanted it to, but I guess this proves that there's always a way if you smash your head into it long enough. It feels like I leveled up my problem solving skills or something because Yotes from a year ago would have either researched how to get SmoothFollow to work for a week or take spend days on making a new camera following script.
Tags:
Code,
Equica,
Scrapped,
Unicorn Training
Wednesday, June 25, 2014
Unicorn Chatterbox Lines
I rejoice as this part is finally finished. Text scrolls across the screen one letter at a time and moves to the next line when the collider reaches the edge. The games main GUI hides when text boxes come up and I placed a giant blocker collider behind the background sprite that prevents the buttons from working if you tap where they once were.
Next steps are pretty big. I need a way to keep track of pages for when NPCs yammer on for longer than one box can handle. I have to make little icons to let the player know what's going on, have colliders to detect player touch to continue to the next page, and I need to have the camera position itself in a way that puts the speaking pony slightly above the middle of the screen.
After all that I'll be in pretty good shape! Almost done with this thing once and for all!
Tuesday, June 24, 2014
Actually Coding The Text Box System
After figuring out how to do highlighting and new lines, all that's left is to start coding. I quickly scribbled and drafted ways to make it work on paper and now I'm going to implement it in C# and see how big the mess will be. If I'm lucky, then I'm just about done with this thing...
Tags:
Brainstorm,
Code,
Development,
Equica,
Unicorn Training
Sunday, June 22, 2014
Making New Text Lines Work
I'm onto something here. To make the text lines know when they reached the edge, I can have 2 box colliders waiting to signal when overlapping. One stays on the edge where words should never pass, the other is at where the first word appears and increases its width by 3 every time a new letter appears. Because the boxes are centered in the middle, I have to make sure only the right side of the box is the one detecting anything and let the left side go off screen.
This is much easier than the letter-by-letter or one word at a time methods I was trying to force earlier.
Tags:
Code,
Equica,
Tutorial,
Unicorn Training
Thursday, June 19, 2014
Colored, Bold, Etc. Text Made Easy!
Did you know about this? Well I didn't! Apparently Unity isn't done surprising me with it's ease of use! I finally learned what the Rich Text check box does and boy does it make my life easier. Here I was about to code up a system similar to HTML's text modifiers and as I'm googling to see if someone else has already invented that wheel I stumble across this! Unity had that stuff in it all along! Just add "<b>words here</b>" or something similar for fantastic results!
Now I can highlight words mid-sentence with no trouble! I'm not even limited to certain colors or sizes either. It basically works like HTML. I can probably do varied word sizes too which would allow me to fill the text box with screams of "NOOO!!!" if I want to. All this stuff is really great and further proves to me that I still have a world's worth of knowledge to learn.
Tags:
Code,
Development,
Equica,
Tutorial,
Unicorn Training
Tuesday, June 17, 2014
What I Want In A Text Box
I need an efficient speech bubble system like you see in tons of RPGs for my games. Unfortunately there are not many templates for one floating out there (either that or I can't find them) so I need to make one for myself. I need to make something that separates text into 3 or 4 lines, allows for color coded words like you see above, and automatically extend the number of pages based on how many lines of text are required. I'd also like it to spit out each character one at a time with a beep matching either a male, female, really high, or really low pitch.
I'm skipping out on certain things that seem really difficult to pull of for the time being like shaking letters, bold & italics, changing fonts, auto language adjustments, and varied font size. If I do this properly, I may be able to add those features in as I get better at this whole game development thing (or meet someone who's good at it and wants to work with me).
It'll take up a large chunk of time but this is worth the effort. I can reuse and refine this textbox system for use in the absurd amount of games in my mind. I better be careful now to make a strong and cleanly coded foundation or else I risk making a mess for myself and any people I decide to work with.
Tags:
Brainstorm,
Code,
Equica,
Unicorn Training,
Yotes Games,
Yotes RPG
Friday, June 13, 2014
Unicorn Quick-Access Items
Here is what all the items look like in your inventory. It's setup so that you tap on an icon and the cursor moves there. Tap again and you will use the item. If it goes down to zero the icon disappears completely and the button does nothing. Every item will always be in the same slot and you'll see the inventory fill up as you collect all these things. For easy access you can put items in a 4 slot box by selecting an item in inventory then moving the cursor to one of the 4 slots and finally tapping the quick slot again.
You can also swap quick slot items by assigning an item already in another slot. When you do that, it sends its contents to the other slot, even if empty so there are no item duplication glitches to worry about. Having items available at a glance can be helpful in battle and the overworld. Just touch the arrow above the magic bar at any time to bring up your four chosen items for use. You activate them the way you would in the pause menu. Tap once to move cursor, tap again to use.
Sunday, June 8, 2014
Unicorn Quest's Common Enemies
These are the grunts you'll be fighting the most often. You can fight off a lot of other baddies too, but these are the small guys that big guys can spit out. Save for a special few, these enemies don't have health based on points but are just defeated by being hit a certain way.
See descriptions for each common baddie below.
Tuesday, June 3, 2014
Equica Overworld ~ From Scene to Shining Scene
Travel between rooms in Unicorn Quest is pretty straightforward. Each door is labeled with a number that matches the door at which Clover will appear when the next scene loads. Doors are colliders on the ground that take you to the loading scene when touched. The loading screen only exists to cover up any lag that would happen if the game chugs on destroying the current scene prefab and bringing up another.
My Door Script allows me to edit which door leads to where. Even allowing me to change in-game for any maze puzzles I come up with. This will even allow me to use the same room multiple times (like the lost forest in Zelda) which is exactly what the room above is going to be like. Door A in one room leads to door A in another room while behind the scenes a Global tracker is matching hidden numbers with region names to know which room to pull up.
Consider this major component of the game completed.
Friday, May 30, 2014
Clearing Rooms in Equica
Yesterday I finally finished off spell upgrades and status effects. Now each spell has 4 tiers and enemies (as well as the player) can succumb to burn damage, paralysis immobility, wet electricity weakness, and so on. The next thing I jumped onto was managing how enemies respawn in the overworld.
To keep it as simple as possible I made an ArrayList, a dynamic list with each scene's enemy names. Enemies are placed onto the room prefab and positioned by hand and labeled "E_(name here)#", then when the player wins a battle against it that enemy's name is added to the "Kill Off These Guys" list that is ran when the overworld starts up. They will only respawn when the map loads if you came from another overworld scene and not a battle or menu. This way is pretty efficient and allows me to dynamically add baddies to scenes when I need to.
Tags:
Code,
Development,
Equica,
Unicorn Training
Thursday, May 29, 2014
Scrapped: Enemy Tracking Decoy Spell
Confound these blasted Decoy ponies. I tried and tried but my list of workarounds are only making a mess of the game. I wanted level 2 & 3 Decoy spells to be able to turn towards enemies one way or another but long story short it's better to just drop it before I waste another day trying. I simply readjusted the upgrade perks so that level 1 just attracts enemies, level 2 shoots, level 3 has more shots and is stronger, and level 3 has even more shots and power.
I hate seeing this feature go, but there's a lot to do if I want this game to come out this year. I have to decide when to cut corners in the least painful ways possible. This is another one of those times. I'll definitely be keeping this idea in mind if I ever do a sequel.
Tags:
Code,
Equica,
Scrapped,
Unicorn Training
Monday, May 26, 2014
Restructuring Spell Code
It was a thought in the back of my mind but the consequences are coming up. I coded the spells' stats inefficiently by making them all share a single set of variables that change every time you switch. This allows a glitch like this: shoot a blast spell, switch to pyre as it's flying, blast does pyre damage. So instead of that mess I made it so each spell keeps track of it's own stuff when it's created.
I use a few arrays (boxes where I can manage sets of data) now instead of variables. Those arrays switch spots when spell slots do and this way I'll have something constantly keeping track of which spell has which stats and upgrades. Now the spells can figure out how much damage they're supposed to do when they pop into the world.
Sunday, May 25, 2014
Making Upgraded Spells
I'm still working on all the kinks for the upgraded spells. Some are complex, others are just bigger sprites & collision boxes. So I'm going to jump back to work on all those. I want to finish them all today! This is one of my bigger milestones on my list. Having it crossed off will do wonders for my morale. It'll also look really cool in the next video.
Tags:
Art,
Code,
Development,
Equica,
Unicorn Training
Friday, May 16, 2014
Scrapped: Subtle Bouncing
A very annoying and game-breaking bug came up yesterday. It allows you to walk through any solid object if you push into it for a second. To get around this, I spent all of yesterday rethinking the way I do collision and went back to the problem I had months ago. In the end, the answer was obvious (like always) and I simply needed to get rid of a polish effect.
There was a subtle bounce movement when Clover ran that make her gallop feel more natural, but that movement pushed the sprite just enough to clip through walls. I tried putting protective fields around everything to turn off the bounce when near something, but Clover's collider ignores it. In the end, it just needed to be scrapped. I'm really sad to see this nice touch go, but I'd rather have imperfect character animation than a broken collision system.
Tags:
Code,
Equica,
Scrapped,
Unicorn Training
Thursday, May 15, 2014
Enemy Collision Handling
A problem I've had for a while now is a glitch where you can run into an enemy from the side and push until you clip through them. After that Clover's collision stops working and you can run through everything like a ghost. To fix that I needed to change the way I approached enemy collision boxes.
In a way similar to how walls work there is an outer layer that prevents sprites with smooth translations from doing so (to avoid wall clipping). That layer is it's own object that recognizes if you are in battle, and if so, it activates the same properties as a wall. Under that layer is the enemy hitbox where it can damage you or you can damage it (assigned with an elemental tag that causes status effects). Just underneath that layer is the character controller collider. That's the one that makes the object move and keep from moving through other solid objects.
With this setup I no longer clip through anything when running about. I still have to test how enemies interact with each other and the environment, but things are looking hopeful right now.
| More details on enemies when I finish the current two. |
Tuesday, May 13, 2014
Getting The Decoy Spell To Work
One of the more complex spells in the game is the Decoy spell. It summons a hologram-like turret that shoots spells in the direction it's facing. Getting this thing to work properly was a lot more challenging than tossing out a fireball.
Tags:
Code,
Development,
Equica,
Unicorn Training
Wednesday, May 7, 2014
Animated Unicorn Spells
I've animated the spells in Unity and made some adjustments to make the sprites look better. They arn't working in game yet, but I finally have all the pieces to do so. My next step is going through each spell one at a time and making them work in action. I'll start by making the spell switcher work so I can shift through each spell.
In code form the currently equipped spell will be a string value and I'll have an array keeping track of which one you have on. That will allow me to easily swap their positions in the array so players can customize the switching order to put their favorite spells and combos closer together.
Once everything is working I need to decide on what each spell's icon should look like and whether those should change as you upgrade them.
Tags:
Art,
Code,
Development,
Equica,
Unicorn Training
Subscribe to:
Posts (Atom)






