Hello, this is Team OOPArts, currently developing Frostory.
During the game development process, we often encounter unexpected problems. The object sorting method mentioned in a previous post was one such issue.
In this post, we will discuss how we resolved this problem.
1. Issues with the Previous Method
The previous method had issues handling sloped terrains. While splitting terrain tiles and sorting them based on the y-axis and z-axis was effective on flat surfaces, it showed limitations in more complex terrains.
In a terrain like the one above, where the player (A), monster (B), sloped terrain, and ground need to be drawn, we must decide the criteria and order for drawing these four objects.
In the old system, the order was determined based on the y-axis and z-axis. Simply put, the closer the object was to the bottom of the y-axis or the top of the z-axis, the closer it was drawn to the camera.
For objects, we used the point where they touched the ground as the center point.
However, due to the nature of sloped terrain, it was impossible to determine a single center point to represent it.
2. Attempts and Limitations with the Previous Method
Initially, we tried to solve the problem by splitting the slope into multiple segments.
By dividing the slope as shown above and assigning different y-axes, we could handle movement below the slope without much problem.
However, when moving on top of the slope, situations like the one above occurred.
This was an inevitable issue in the current system, which processes tiles and objects in the same way:
- Player (A) < Monster (B) - Slope < Player (A) - Monster (B) < Slope
This contradictory situation made it impossible to sort them correctly.
3. Seeking Solutions: Learning from Other Games
We decided to explore how other games solved this problem. One famous game that features slopes in a top-down view is CrossCode.
CrossCode used a 3D rendering technique involving z-testing. This method places the terrain on the z-axis and records height values in the z-buffer, rendering it like a 3D game.
It’s a game I thoroughly enjoyed playing through to the end, without realizing this was a 3D rendering technique.
They seemed to have standardized image sizes and collision sizes well enough that the 3D rendering was inconspicuous.
4. Solution: Adopting 3D Rendering
Switching to a 3D rendering method required a major overhaul of the levels and systems we had previously created.
However, this decision not only solved the problem but also provided an opportunity to enhance the visual quality and technical possibilities of the game.
Looking at the game world through a 3D camera, you can see how it’s structured. This approach fundamentally resolved the sorting issues with tiles and objects.
5. Additional Benefits of 3D Rendering
The transition to 3D rendering opened up various possibilities beyond merely solving the sorting issue.
a) Displaying Characters Behind Walls
With shaders, we can now display characters even when they are behind walls. This feature can be utilized to improve gameplay visibility when necessary.
b) Improved Decal Representation
Decals can now naturally adhere to walls and terrain, enhancing the fine details of the game world.
c) Improved Shadow Representation
Previously, shadows appeared to float when not aligned with the ground, but they now adapt naturally to the terrain.
Conclusion
The process of introducing 3D rendering to solve the sorting issue was long and challenging, but it allowed us to improve the game’s quality and expand its expressive possibilities.
Thank you for reading!
If you’re interested in the game after reading this, please follow us. We will continue to write more posts about the development process.
"We can now mobilize combat mechs. I suggest we use them to bring down nearby raider encampments and end the raider threat once and for all." -Lead Mechanic's Report
The Bleak Frontier August 2024 Update is now live! Build 2 new buildings, collect 2 new rare artifacts, mobilize a new vehicle, and research new building upgrades! Will you survive the Bleak Frontier?
Did you know that we post regular devlogs so you can follow the evolution of the game during its development? It's time for a new one! We show a work in progress preview of the very first story boss and talk about how we implement melee combat in Ascent Quest!
All footages are from a game in early development. Everything will be improved, including the physic in combat. It is by no way the final look & feel of the game.
Don't hesitate to comment or join us on Discord to share your ideas! You can find all previous devlogs on our Youtube channel.
Welcome all new Knights to New Boston - glad to have you this week.
This is an old city but let's keep plastering it with updates! It is late, so I will be brief - we've had so many new players checking out the game, and so much awesome stuff added over the last week that we're taking a pause for a moment to focus on bug fix, quality of life and F10 fix tonight before we blast on with more content.
So, this update hits on many of the hottest F10s from this weekend so far!
Thanks for submitting your F10s, posting feedback and especially for posting up reviews! Every one helps us keep trucking forward.
E-Medics and Grenade Simulation
We've fixed a bug where some E-Medics could lock up the game by throwing a grenade. Not pretty, call a medic! This is now resolved.
In addition, we've tweaked the math models for how grenade targeting is done to help the thrower hone in on their primary target and do less really odd tosses.
Finally, throwing a grenade did not always cancel your Focused Fire. Focused Fire is maintained only if you keep shooting at the same target without taking another action that requires AP or moving. So, throwing a Grenade definitely should, but there were some cases where it did not (oddly, depending on remaining charges of the grenade?)
Venom Trap AP Cost
The Scourge's Venom Trap was costing 2 AP to use and showing an odd message above the Talent bar sometimes when used. We've fixed the whole bug which was basically a double-attempt to execute the Talent.
PXE Grenades
PXE Grenades finally have corrected damage listed in their Talent, causing 320 Ballistic Damage and outclassing the old standard Frag Grenade.
Stun Tally Modification
There was a bug in the previous version where Stunning a target didn't automatically update the Sec Tally tracker, so it could look like yellow Tally did not get removed. They were removed the next time anyone asked for the Sec Tally to be updated but ... we fixed it. Now it is instant.
Roster Tagging
We've fixed (again?) another set of issues with dead, dismissed and missing mercs getting counted into the Tags on the Roster.
Update Size ... update
Two weeks ago we completed a couple of near max size updates to the game in order to re-organize some of our assets. So far, we're seeing really good results with all but 1 update (which actually, tweaked asset organization, so we know it would be larger) being significantly under 1 GB. This is a great trend for a game that updates a lot! We're going to keep after this so that we're only asking you to downloading MB from our near-daily update madness.
v1.8.75 - #135: Black Soup Bay - 8/31/2024
- Fixed issue with some E-Medics freezing on trying to throw N-Stim Cloud - Improved math for grenade throw simulation to be more on target with tosses - Fixed bug with PXE Grenade not correctly listing high Ballistic Damage output - Fixed bug with Scourge's Venom Trap Talent causing it to consume 2 AP instead of 1 AP - Fixed issues with Atomic Stutter and other Stun abilities not always immediately updating Sec Tally - Fixing issue where sometimes throwing a Grenade did not cancel your Focused Fire buff - Fixing possible double-team spawn in Corner Holdout X Kill 3 Captains Objective - Fixed issue with Delaying Job from Field Ops Center sometimes not counting toward max 2 delays - No longer showing outside/inside optimal range in Accuracy breakdown if accuracy effect is 0% - Fixed more bugs where dead/dismissed/hidden mercs could still be counted in roster tags - Fixed typos in proc-gen mission briefs, missing text strings in UI