Optimization and Mobile Support - Sort Of
GDevelop isn't the most performant engine to begin with, so I need to take a lot of care that I'm not over-taxing the system. This is a bit of a learning process for me and most improvements are coming through trial and error.
I fixed a performance issue on my last livestream that was making the game chug. While the Hunter was Seeking the player, I accidentally had it trying to find a new pathfinding solution to the player every frame. Instead, I put that on an object timer and made it happen about three times a second, which smoothed things out considerably.
However, once the Hunter closed the distance, I started seeing some performance hitches again. The game stuttering when you're trying to avoid incoming fire isn't too helpful.
Essentially, once the Hunter is in the Seeking state, it'll send out a ray to see if the player is in front of it. Similar to the pathfinding, in my inexperience I also had the raycast checking every single frame. I changed it from ~60 times per second to ~10 and the performance issues, for the most part, went away.
Finally, I started experimenting with touch controls. I used GDevelop's built-in multitouch joystick, which helped me prototype things quickly. The control scheme doesn't work properly, at all, but it's nice to see where it might go. The game also runs super smoothly on my old S21 from web, which is a good sign for later when it's published as a native Android app.
I also started added leaderboard infrastructure to the game. I'll work more on points on the next livestream.
Finally, I added a little extra juice to the game. First, added some of the iconic bHunter jets to the hopper, which immediately makes the handling feel tighter, despite making no changes to the actual handling. Second, I started adding some particle effects to the Hopper, which makes driving around feel a little more integrated with the world. The particles and the jets are in conflict, a little bit, so I'll have to assess how I want to approach them. Then, some juice to the player taking damage. There's no way to use the Flash behaviour on the 3D Sprite I'm using for the hopper, so I made a single new animation frame of the hopper flashing. And finally, when the Hunter weapons collide with the hopper, they now explode properly - not just a smoke cloud but a proper explosion.
It's feeling more and more like the game I have in my head, which is a really good sign. One piece at a time it's coming together.
Files
bHopper: Hunted (Game in Development)
Retro cyberpunk vehicle combat game
Status | Prototype |
Author | lovemakeshare |
Genre | Action |
Tags | Cyberpunk, Driving, gdevelop, leaderboard, Sci-fi, Sprites, Top-Down |
More posts
- Fine, I'll Fix Mobile Controls Your WayAug 12, 2024
- Dressing Up the WorldJul 19, 2024
Leave a comment
Log in with itch.io to leave a comment.