Projectile System

Continued Game Migration into the LibGDX Framework

Grass Details and Edges Working Again
Grass Details and Edges Working Again

Over this week I continued working on getting the project to work in the LibGDX framework. I encountered a lot of problems with sprite rotation that I was using for shooting arrows and would probably use quite a bit in the future. But after many hours I did figure out what I was doing wrong. Basically, it came down to the way I was rendering did not handle the rotation so even though I was processing the rotation it would not show it. I still may have some errors with the shooting but for now it is good enough.

Map Generation:

After figuring out those problems I continued working on getting the map tiles back to where they were in the previous project. I have everything done but the mountains and the water. But I figured I am going to be animated the water tiles, so I don’t really need to complete that now. I can skip it and implement the animated tiles. This week I need to get the mountains and the mobs spawning in correctly.

Rabbit:

Over the last couple of days, I started working on the rabbit mob. I encountered some issues with the way the animation is handled. Once I got the movement working, I realized the way I created the animation would not work. Each rabbit needs its own animation. I set up just one and it made it so all the rabbits would move but follow the same animation. They looked like they were skating on ice. It looked funny but was not going to work. I am hoping that over the next day or so I can get them working correctly. Then I will be back to where I was for the most part.

Tree Spawning and Future Work:

Trees Rendering Again
Trees Rendering Again. Entity sorting still needs to be done

I also worked on spawning trees back in this week. I did not run into too many problems getting that to work. Soon I will need to work on sorting the entities though, so they don’t render like they are floating. Once I finish the mountains and the mobs everything should be back to where it was. My goal is to have it all done this week. After that I would like to work on a noise function to produce better looking sprite placement for trees and grass. I think that is the next big step for this project. Then of course I need to add in more animals to make the game feel alive. Hopefully all will go well. Until next time.

Continued Game Migration into the LibGDX Framework Read More »

Week 7 Game Engine Progress

Game Engine Work:

This week I believe that I made great progress on the Game Engine. However, I kind of got sidetracked from what I wanted to work on. I had planned to continue working on the map and producing the tile assets I would need for trees and other obstructions. However, I started working on a projectile system, and then found myself working on a spawner system. Once I started working on the spawner system, I then found myself coding classes for the games mobs. I also created the Animated Sprite Class and modified my player movement to use the animated sprite instead of a bunch of single sprites.

The Projectile System:

Basic Arrow Projectile System. Still needs work.

I started out the week working on a simple projectile system. I tried to simulate a bow firing. It is partially working. I will need to work on rotating the arrow to match the direction it is being fired in. Hopefully that won’t be too hard to do. I also would need to make the bow asset and have animations to match the bow firing.

After I had the basic arrow firing, I made it work with collision detection. From there I thought it would be cool to work on a particle spawner system to spawn particles when objects collide together. I used it on the arrow as a test and it seemed cool. Once I have actual objects it can collide with, I will test it more.

Mob Spawner System:

The video clip shows the mob spawner and the basic movement AI at this point.

Since I had a basic entity spawner for the projectile system, I figured I could use it to spawn mobs as well. After a little bit of tweaking I was able to set a spawner near the player and have mobs appear. Once I had that worked out I then added some basic movement to the mob class. I used the player sprite for the first mob because I did not have any other art to use. Using the player sprites worked great for testing it though.

Work Planned for the Upcoming Week:

This upcoming week I would like to start working on the other interactable objects like the trees and grass. Additionally, I would like to start working on elevation change tiles that I can use to change heights on the map. The changes I made this week to the entity class and the way they render will hopefully help me complete some of this work this week. Hopefully I can get a good chunk of this work done this week and move onto more enemies and some more fun stuff next week. Until next time.

Week 7 Game Engine Progress Read More »