Rookie Awards 2024 - Open for Entries!
Technical Breakdown: Double Dragon Remaster - Game Jam
Share

Technical Breakdown: Double Dragon Remaster - Game Jam

Robert Skinner
by RSkinner on 17 Oct 2023

This project was a week long project in which I created a little remaster prototype of a childhood favourite of mine, Double Dragon. I had a blast making this and learnt a tonne about how awesome Unity's procedural toolset is! Portfolio can be found here: Portfolio: https://rs3d.artstation.com/

0 288 0
Round of applause for our sponsors

Double Dragon Remaster - Game Jam - Dev Diary

Welcome to my technical breakdown of my attempt to remaster a childhood favourite of mine, Double Dragon. This was a week long game jam (in the end) and I clearly wasn't going to remaster the whole thing, instead I wanted to create a little prototype demonstrating what remaster might look like. I learnt a lot from the project and cant wait to break it down to discuss some specific technical details that you may find interesting.  I was able to work with a talented producer on this project (Solomon) and a 2D artist (Esme) who produced the city scape background thanks for your help!

if you're just interested in seeing the final results they can be found here: https://rs3d.artstation.com/projects/qe3d3z

Early Development


This prototype started as a pure 2D project, I was excited to try out some of Unity's HDRP 2D specific tools.
I was also really interested in make the prototype look really awesome but I just couldn't shake the feeling that it would look better as a 3D project.

I did create some cool shadowing though using sprite lights and shadow blockers.

I love programming, another reason to give this a go was to stretch my understanding of fundamentals like inheritance and encapsulation, I wanted to create scalable code as I went through this project. below you can see some early 2D movement tests.

Transition to 3D


I liked the 2D idea and I wanted to keep close to the original but I couldn't help shake this feeling it would look awesome in 3D, with a 2D Character sprite. So I began rebuilding the game 3D. 

Starting with blockouts then moving onto some material tests to get a feel for the idea. Immediately the 3D lighting meant I had way more control over the position of the light and I had the chance to make it volumetric to help really build some 3D-ness to shadows. This also allowed me to play around with ray tracing. 

Materials


The materials for me were the real benefit to switching to 3D and my early mat tests were promising as seen above. these mats were built at 128x128 which kept files sizes small, but gave enough texel density for me to start adding detail to the surfaces in a readable way. 

The only issue I had with these materials was they didn't match the detail on the character,. which at the time was very low res, it created this really strange composition issue where I my eyes were always drawn away from the player and in a game where combat was key this wasn't ideal so i knew i needed to make changes moving forwards.

With the meshes I wanted to create a modular approach - this started with unity blockouts - export from unity into Maya - break the buildings into their common parts - keep those parts in the set. 

I also wanted to try and complete this project without unwrapping anything which meant trim sheets were out of the question, but would absolutely have been a better way to achieve some of the results I ended up with.

Materials - Substance Designer

Another issue I had with the test mats I created above was that each of them had very different levels of noise which wasn't itself a problem, the issue came in that noise not really matching any of the other materials noise, none of the materials looked like they belonged together.

To solve this issue I created a base noise material which I used in every other material, this pulled each of the materials together. I also ended up reducing the material size to 64x64 to solve the issue of the materials not matching the character sprite, I know this reduces the amount of detail in the texture but we are never so close to the materials to be able to tell really what surface detail there is so I didn't see this as a problem.

Unity Detail Map packing tool


One issue I did have to solve was the detail map issue in unity. Like many game engines unity uses channel packing to help reduce the number of files required to import. for the first few materials I made I was hand packing the textures into the appropriate channels in photoshop which was very time consuming. 

I did think about writing my own HLSL shader that handled the materials in a traditional way, but this would undo what is a good optimisation feature.

Instead I created a designer tool to pack the detail map for me. You can see below the basic setup. I would take the maps as inputs then use RGBA merge nodes to combine these into the correct channels. this tool was something that I distributed to university students who were working with unity it also helped them, needless to say if nothing else this project gave me the chance to make a cool tool!

World Building & Texture Mapping


One issue with not unwrapping anything is working out how to project textures onto faces without causing stretching etc. Unity allows me to use projection mapping for textures one such option is planar which projects the texture on one axis - naturally this was going to work when I needed to texture building that had more than one side!

To get round this I used a mixture of material ID's to break up complex objects, like cars and as seen in the video below, tri-planar material projection which projects the material across three axis, and since these materials were all tillable it worked great.

It also sped up the world building process paths could be constructed through duplication and no matter where I placed the geometry the materials were perfectly seamless across the faces. 

I was able to create the whole first level with just the materials and the asset pack below. From a scalability point of view, I could make the first level as big as I liked, but I did receive some feedback that made me think about the level design element of what I had produced at that was a comment on the different levels within the first level, in that the whole first level takes place at street level and some players wanted to be able to traverse to higher or lower levels. So this is definitely something ill be considering moving forward with other projects.

The apartment blocks were a large part of the world building world - I will admit that the buildings looked too generic and upon reflection the windows were entirely the wrong colour. In any case I should have made these more unique. I did create a random emissive effect on the windows though to help differentiate the buildings a little , this wasn't hugely successful but it did hide the duplication enough for players to be immersed. I could also have used decals to further separate the buildings stylistically. 

My window material was very successful however, other than the colour issues it catered for every window size in the first level and looked good throughout. the only thing I would have changed was to take the streaky highlights and have these parallax over the top of the window texture - This would have helped make each window look more individualised. 

Trains!


One of my favourite assets was the train line and the trains. Not because I love trains, but because it worked so well. You can see below the materials I created in substance designer. and whilst the mapping wasn't quite perfect, it was very effective.

The train line also really helped break up the horizon as well which was an issue I was having, it helped create a middle ground behind the main street which was more believable and it also helped connect both halves of the level which made things feel more connected. 

I did have plans to create a path based animation for the train, but i ran out of time. definitely something I would add should I return to this project at any point. I would also add sound which i'm sad to say i totally neglected in this project

Epic Boss Fight


Whilst boss fights didn't happen on every level of double dragon, I really wanted to test how far I could push the material reuse. so this arena was stylistically very different from the main urban area, it was more industrial which meant more metallic materials, so those garage door materials I created suddenly became really impactful metal walls - The second level was going to be inside a factory warehouse so that was another reason to include this forecourt area to bridge the levels together.

Lighting and Rendering 

So lighting and rendering was something I ended up putting a lot of time into. the HDRP system in unity is really versatile with loads of tweakable components, and relax I'm not going to go through each one!

I was trying to create a really dramatic sunset feel to the game as I liked the oranges of the sunlight against the building materials and the city scape at the back, as well as the emissive glow on the signs. because of the sun position, there was a lot of shadowing being projected towards the camera, which essentially meant the game stage couldn't be seen. so I utilised these street lamps to help brighten up these areas, and brightened slightly the ambient light.

The idea was that this would be a slightly seedy part of town, where we start at Billy's mechanic shop and work our way through to the industrial area seen above. so I didn't want to avoid shadows entirely as I needed them to create this darker feel. Keeping the balance was a real struggle.

The other issue I had was a performance one in that I kept hitting the max shadow limit set in the HDRP shader, I could have increased this to some insane number instead I tried to strategically turn off shadow projection for lights that didn't directly effect gameplay but kept the lights that allowed enemy shadows to cast towards the player as this not only looked great but acted as a form of conveyance for the player, it also meant they knew where enemies were coming from, allowing them to plan their approach more successfully, without getting mobbed.


2D Animation


At this point I needed to change the character sprites, because the original sprite sheet didn't give me enough animations to be able implement the combat mechanics I wanted to, like flying kicks and such.  With the skills I have acquired since this project I could now create my own sprite sheet but at the time this wasn't something I was able to do.

I did have to edit some of the frames because I had to remove backgrounds and do all sorts to make it work for me.

Alongside this I had to create a sizable and complex anim state machine that allowed me to transition between animations in such a way that meant the player couldn't just spam the punch button, or hold it down. I also used key frame functions to to link damage dealing to specific points in the animation, this was really my first time in the animation system in unity so I was really happy with what I ended up with.

The enemies themselves should have been more varied, however, I didn't have the time to do this, instead I opted for one enemy type that was fully implemented. Same kind of movement and animation as the player however. 

The enemy only had one attack which was on a conditional timer based on the distance from the player. I also used pathfinding to control the agro range as before this was implemented every enemy in the level made a b-line to the player. now I could have just called this a souls like, git gud. etc etc. But it was really painful, it also felt unfair for the player. 

Enemies are placed at spawn points through the level and can be kicked and punched even after they died. Now this seemed like a bad idea for but when I ran some play tests, players really liked being able to just pummel enemies who were on the floor, so I kept it in, if nothing else its therapeutic.

User Interface

This was my first attempt at a UI and I was really happy with what I produced. I'm a huge fan of RPGs so it only felt right to give enemies a health bar. The player HUG lacked imagination but was quick and served its purpose. I enjoyed the process but UI is definitely not for me, at least for now.

Final Thoughts

When I started this project I had no idea what I was going to be able to achieve and it taught me the most important lesson I have learnt so far and that is I can achieve whatever I want as long as I'm willing to put the work in and ask the right questions. I tackled some relatively complex things in this project and I feel I came out on top having learnt loads and created something that looked really awesome and played pretty well.

If you have any comments and feedback etc - please leave a comment. If you want to play this you can find it here: https://itch.io/jam/game-jam-2-fighting-game-2022/rate/1787471

Thank you!


Comments (0)

This project doesn't have any comments yet.