Synzza Star - Experimentations with 2D and 3D graphics
At the onset of this project, I hadn't quite decided if I wanted Synzza Star to be a 2D game or a 3D game.
2D
Making the game 2D was my initial instinct. Chrono Trigger is one of the game's biggest inspirations, as described in my previous post, and it comes from an era of games which I also draw inspiration from thematically. It and other games like Final Fantasy 6 exemplified to me the kind of dark but beautiful story telling I strive for with this project.
Given this stylistic choice, I began architecting the Synzza Star battle system (described in earlier posts) with a 2D foundation. The first task I gave myself was to implement basic enemy AI which would decide how to move around the world and, eventually, attack the player.
Seen here is a demonstration of a very rudimentary boids-like algorithm for enemy movement. Given the 2D space, it was quite simple to make - in fact, it was a bit too simple to make.
I began thinking about how to iterate on this AI by introducing goal-based navigation, and it was at this point I realized the main issue with my current approach. Simply put, 2D navigation AI requires a lot of additional work to be interesting. Without obstacles, the AI can simply bee-line to the goal using the shortest path; if I just add simple geometric shapes as obstacles, it still doesn't offer much in the way of interesting pathfinding; and in order to make more complex obstacles, such as fake "elevation", I'd be signing up for way more fine-tuning and hand-crafting of the navigation system and art of the game than I have time for.
What I needed was a quick and dirty way to make a level without needing to put in more non-technical work than just whatever comes with the game engine I'm using, in this case Unity. With my options in 2D looking less appealing than I initially realized, I began re-examining my assumptions and entertained the idea of making a 3D game.
3D
I had two main concerns about making my game 3D:
- Would the game have the same stylistic punch as the 2D titles I take inspiration from?
- Would the introduction of the 3rd dimension significantly complicate movement and AI targeting calculations?
3D calculations vs 2D calculations
The first thing to recognize is that these days most accessible engines are built for 3D games. Therefore, many of the tools you may use to run sophisticated pathing or physics calculations are already accounting for a possible third dimension - they just set that Z-value to 0 if the game wants to be in 2D. Yes, it is possible some components such as colliders and cameras may be slightly more optimized if specifically configured for a 2D game, but in the end very little will actually be saved in terms of performance, as long as we're talking about game logic and not graphics.
With that out of the way, now let's think about pathing and other forms of AI movement. Picture a level whitebox such as this one:
It's a fairly simple level in 3D, but in 2D it has a few features that would require some cleverness and technical work-arounds to achieve to similar effect. I'll specifically focus on the bridge near the top of the level, but it shouldn't be hard to extend this thinking to other easy-to-make 3D features.
That bridge is meant to be both walked under and walked over, both by AI and by the player. In 3D it's as simple as making the bridge high enough to allow sufficient head room, but in 2D we'd have to do all kinds of work to fake the elevation. Supposing we disallowed any mobile NPCs from ever walking over that bridge, we still would need an extra variable to check the player's elevation, and we'd need to selectively change the bridge's draw order depending on that value. If we allow for the possibility of an NPC passing over the bridge while the player's under it, now every NPC needs that same elevation variable, and you've complicated your draw orders even further!
Additionally, what if we wanted flying enemies and NPCs? Again, in 3D this is just as simple as turning off gravity for the object and letting it float around in 3D space. For 2D, now not only are we looking at that elevation variable again, but now it needs to have more resolution to properly mimic the levels of height a flying NPC can reach. What if you have an area-of-effect ability that targets an area that contains multiple elevations? What if you wanted enemy line-of-sight to be obstructed by walls? I'll stop there with the hypotheticals, but it doesn't take much imagination to add to that list.
This isn't to say none of these problems in 2D have work-arounds, in fact many of them do. It's the fact that you have to either find or design the work-arounds in the first place that I'm focusing on. Is it really all that worth it?
Well, maybe. So far we've just talked about game logic. 2D has a much stronger argument when talking about graphics.
3D graphics vs 2D graphics
As before, let's address the technical argument before the stylistic one. There's no contesting the fact that even the highest-fidelity 2D game, with the wildest visual effects a VFX artist can imagine, will never come anywhere near the absolute hog levels of resource guzzling modern HD 3D games have come to.
That said, Synzza Star is not a game that I expect to need that much graphical fidelity, at least not much which wouldn't also be used in a 2D game. If the world were 3D the game would be presented as 2.5D with a fixed camera angle, meaning a lot of the lighting can be baked and otherwise optimized to that specific perspective. The costs will still be there, but 3D rendering optimization is such an established and long-standing field that they will likely be minimal.
At last, let's discuss style. If you're only reading this blog for technical discussions, this is your stop. We hope you've enjoyed the trip and we hope to see you again.
3D style vs 2D style
In general, I find 2D art to be much more striking and evocative than 3D art.
Given that all art is an abstraction of something real, I think there's an interesting phenomenon that happens as any kind of abstraction attempts to resemble it's real counterpart more closely. If an abstraction seems less real, the mind is more willing to "meet in the middle" and gloss over any mistakes in proportions, perspective, etc. Maybe it's because there's more "gaps" with which we subconsciously fill in - and of course, anything we can fill in with our own interpretation is something we are more likely to resonate with and become attached to.
Counterintuitively, it seems that when an abstraction appears more real, the more picky we get with the small flaws we would have swept under the rug before. You can experience this yourself if you've played around with some of the free AI art generation tools on the web right now (if you're reading this post several years after its publish date in 2023, please repress your snickering). Ask it to make an image of a person in a 3D style, and you'll likely get something that looks close but not quite right, often to a somewhat unsettling effect.
Anyway, I digress. The point is, if I want a game that has a story that impacts each player differently on a deep subconscious level, I will usually imagine that game as having 2D art.
That does not mean, however, that it has to be 2D. You'll notice my earlier discussion was centered around the realism of the abstraction, not on the specifics of implementation. Being clever with shaders, camera perspective, and 3D modeling can result in a game that sacrifices just the right amount of it's dimensionality to look 2D, or at the very least just as striking as a 2D counterpart.
In some ways, a 2.5D game that aims to be as evocative as possible is a design space that could use some more exploration. I'm happy enough with the technical trade-offs of 3D that I'm willing to experiment with it. I suppose we'll see how that goes.
Tune into future posts if you like discussions such as this. I do try to stay technical on this blog, but I can't help but dive into these more philosophical topics every once in a while.
Until next time, take care.
Comments
Post a Comment