Steve Yeager
  • Games
    • Space CUBEs
    • Knighthood
    • Gemini
    • Robot Pirate Racing
    • Sarah's Adventure
    • Monster Smash
    • Other Projects
  • Learning Resources
  • Resume
  • Bio
  • StarCats

Time to talk about the 0s and the 1s.

1/17/2014

0 Comments

 
    Wanted to make this post after I spent too much time trying to figure out how to read data on Android from a binary file that I had in my Unity project. Long story short (I'm going to transition to bullet points now because I'm a coder, not JRR Tolkien).
  • File needs to have .bytes extension.
  • File needs to be in a folder named Resources.
  • You load the file as a TextAsset with Resources.Load(path).
  • You pass the file.bytes to a Stream to a BinaryReader.
  • Boom. Data.

    I use a binary file to hold all possible CUBEs and their corresponding values. When the game starts I read the file and parse the data into a static array so any class that needs the info can easily acquire it. I am using binary instead of XML because I am targeting mobile and switching from XML to binary saved me about a MB (removed one XML file and the System.XML namespace). 
    However binary is not very easy for me to read and write because I am just a lame human, so I use a local XML file to keep track of CUBE info as I create the game. I then use a tool I created in Unity that finds that file and parses the XML into an array of the info that I need, which I then take and convert to binary and save to the .bytes file for the app to read when the game starts.
0 Comments

Character Concepts: I'm Glad One of Us Can Draw

11/12/2013

0 Comments

 
Picture
Harold, Chad, Eva, Jules.
    Here are our first versions of Knighthood's main characters, drawn by the lovely Sam Williams! The four knights-in-training (from left to right) are Harold, Chad, Eva, and Jules. They are all unique warriors and have different abilities and play styles. We spent a good deal of time concepting in order to make sure this was reflected in their looks.

    Harold is the tank. He's got power over Earth and Air, but isn't very good at magic. Chad is solid at all skills, but doesn't excel at anything in particular. He controls Ice. Eva is gifted with intense magical abilities in Fire and Lightning, but is delicate in close combat. Jules packs a punch; her speedy attacks and poisonous magical abilities make her deadly efficient. But because of her low defense she prefers the element of surprise. Together these four attend Knight School in a snowy mountain village. Though they may be a little rowdy, they work hard every day, getting closer and closer to their dream of achieving Knighthood.
    Sam built each character model in Illustrator and split them up so they can be animated in the new Unity 4.3 2D tools! We're both excited to start learning the new framework. We will have more on these characters later! Thanks for checking in!


P.S. Hooray! We finally got rid of Steve's crummy banner picture ☺
0 Comments

Hello World!

9/19/2013

0 Comments

 
Pictureyours truly
    Hello world, my name is Steve Yeager and I am a game developer. I work at IGT in Las Vegas. I also work on my own projects in my spare time. I am still learning but I do have a lot of passion for the game development process. 
I thought it would be a good experience to make occasional blog posts about my projects, especially the one I'm currently working on, Knighthood. I am a firm believer in sharing information and have always found teaching to be a very good way to strengthen your knowledge on a subject. So here is a blog about game development for people who want to learn (and don't care about grammar).

    As of right now,  I am working on a 2D Action Platformer game called Knighthood (you can follow the project on GitHub) with my girlfriend and talented artist, Sam Williams. We are already in development (using Unity3D) and I have quite a few things done already (character controllers, combat system) so I'm just going to jump right into where we are now! Please feel free to contact me with questions or to tell me how stupidly I've done something (I do appreciate feedback). Also please pardon the current (intentionally bad) programmer-art header. Waiting for Sam to have some free time to art us a proper one. 
Picture
isn't she cute?
0 Comments

Platforming Pathfinding: A Journey

9/19/2013

0 Comments

 
    I notice that I always push off AI as long as possible. When I inevitably start working on it, it becomes one of the most rewarding and frustrating aspects of game development. For Knighthood I wanted to have a (decently) smart AI that could actually follow you around the map instead of ping-ponging between platform edges waiting to be attacked. 
Picture
The world's most boring ping-pong match.
    I decided to go with a node system and an implementation of the A* algorithm for the character pathfinding. I wrote a tool in Unity with modifiable settings (jump height, allowed drop horizontal distance, etc) that helps me procedurally create the Nodes on each platform and then bake the Node's connections with its neighbors. Currently it only works for AABB's (Axis Aligned Bounding Box) but I plan on upgrading it after making sure the pathfinding works well.
Picture
Day 1: First version of a Point Graph. Orbs are Nodes, lines are the connections, and characters can fall/jump through the dark platforms.

Picture
Day 2: The blue lines represents the characters chosen path to its destination.
    After my second day of working on it, I had successfully implemented A*. Although I had to tell the enemy where to start and it's goal, it could find a path (if there was one). My next challenge was trying to quickly find the start and end Nodes. To solve this, during the baking process, I break the world into a grid and save references to all of the Nodes in each grid space. Using this method I can get the list of the closest Nodes and only have to check them to see which one is actually closest to the target position. If a space doesn't have any Nodes in it (ie the character is in the air), then I check the grid spaces surrounding it.

    To get the correct grid space we have to do a little math. Say each grid space corresponds to a 5x5 chunk of the world and we have a 4x6 matrix. This means the grid covers from position (0, 0) to (30, 20) (x and y are different in position vectors than matrix indices).
World Matrix
(00, 20)                                               (30, 20)
[0,0] [0,1] [0,2] [0,3] [0,4] [0,5]
[1,0] [1,1] [1,2] [1,3] [1,4] [1,5]
[2,0] [2,1] [2,2] [2,3] [2,4] [2,5]
[3,0] [3,1] [3,2] [3,3] [3,4] [3,5]
(00, 00)                                               (30, 00)
Picture
Day 3: World Matrix.
Ex: Character is at x: 23 y: 16 what grid space is he in?
x = 23/5 = 4 (divide by grid space size and drop remainder)
y = 16/5 = 3 → 4-1-3 = 0 (you have to invert the y)              
(position (x, y) equals matrix index [y,x])
(23, 16) → [0, 4]
Picture
Day 3: Enemy can track player decently well.

    Currently the enemy can constantly track the player around the map, including jumping and falling through translucent platforms. My approach still needs a lot of work and optimization but I think it's a good starting point. The hard part is going to be passing this info to the character controller and motor. But that's another post. I hope you enjoyed my first post, I would appreciate any feedback for the blog or my pathfinding solution. You can comment on this post or contact me directly. Thanks!
0 Comments

    Author

    My name is Steve Yeager and I like to party.

    Archives

    January 2014
    November 2013
    September 2013

    Categories

    All
    Art
    Code
    CUBEs
    Knighthood
    Pathfinding

    RSS Feed

Powered by Create your own unique website with customizable templates.