Devlog 4 - Presentation/Graphics
Devlog 4 – presentation and graphics
As it appears my weekly focus has been more or less inverted in schedule, I am torn on what to present in this devlog. Given that I have already covered presentation and graphics throughout previous devlogs, as well as having spent little time on the topic within the past week, I argue that covering what I have actually been doing this week would be more practical.
Once again, level generation ate up a lot of my time. Since the script had become a hulking travesty, I decided to refactor most of the generation code, segmenting and partitioning the separate stages of generation, making it a lot easier to work with, as well as overall giving better results. I also brought in a few new room types, to diversify the whole thing.
Before:
After:
Instead of spawning the side rooms simultaneously with the main rooms, the algorithm now waits until the main pathway is finished prior to starting the side rooms, before checking for door connections. This works much better in all aspects. The whole process is a lot faster too, and the system never encounters errors or mistakes now. The small amount of stuttering prior to finishing generation can easily be hidden behind a loading screen.
I have also implemented a couple of vital performance enhancements. Previously, the framerate would be dismally low at all times, due to the large amount of lighting and shadow-related calculations. Disabling lights upon leaving view of the camera improved performance only marginally, what really lightened the load was disabling the shadow casters instead. This change has effectively quadrupled the regular framerate.
The grey boxes on the walls are enabled shadow casters, note the lack thereof on faraway rooms.
Moving on, in the last couple of days, I have finally begun work on the player weapon system. Early testing using the built-in joints yielded humorous but bleak results.
In the end, I had to abandon the two options of using either a fixed joint or a relative joint. Fixed joints are incredibly weak, and allow the attached objects to move away from each other at the slightest impulse. Relative joints however instead suffer from rotation rollover, meaning that upon the parent object reaching and passing the 360-degree mark, returning to 0, the attached object, still at 359 degrees or so, immediately begins moving in the opposite direction given that it sees 359 being closer to 0, not understanding that 360 rolls over to 0 anyway.
For these reasons, I gave up fighting with the default joints, and just made my own scripted joint instead. Taking a significant amount of code from the player movement scripts, it was a fairly easy process, and the results were remarkably better, even before implementing rotation.
Adding the rotation code while including a few extra lines to prevent the issue of rollover, I also was able to have the weapon impart a velocity back onto the player, effectively making the player actively push himself away from walls or other colliders, and once weapon movement is working, swinging the weapon should impart upon him an opposing force.
With the way I am putting it together, the player will be able to pick up and carry two weapons at a time, able to switch between them freely. Each weapon type will be able to have different stats and will have different animations and feel when using them.
Actually related to this week’s topic, something else I did was implement visual leg and feet movement onto the character.
All of it is based upon animation curves and equations. The leg pieces change over their sprites under the torso, as a result it almost has a 3D illusion to it.
They look pretty good, and they didn’t take long to implement.
Regarding the rest of the graphics, most of it will have to remain as is, as I am out of time to do a second pass on it now. Once I get up to them, the graphics for the enemies, weapons, and props will share the same style as what already exists, to be coherent with the rest of the game.
That’s all for this week.
Thanks.
Files
Get Dark Testament
Dark Testament
A dark game that is dark
Status | In development |
Author | GMunro |
Genre | Action |
Tags | Dungeon Crawler, Hack and Slash, Roguelite |
More posts
- Devlog 6 - Updates/planned updates based upon Testing SessionOct 17, 2021
- Documentation - AT5Oct 17, 2021
- Devlog 5 - User Interface / PolishOct 10, 2021
- Devlog 3 - Interactions, Puzzles, and Enemies (Or lack thereof)Sep 27, 2021
- Devlog 2 - Level BlockingSep 21, 2021
- Devlog 1 - Player Movement Basics - A slow startSep 12, 2021
- ConceptAug 29, 2021
Leave a comment
Log in with itch.io to leave a comment.