lost-semicolon
lost-semicolon
The Lost Semicolon
6 posts
Game Development and graphics explanations Asks are open!
Don't wanna be here? Send us removal request.
lost-semicolon · 2 years ago
Text
A very interesting blog post on the rendering in Cyberpunk 2077!
12 notes · View notes
lost-semicolon · 2 years ago
Note
how does ink in splatoon 3 work? how it hits objects or the ground and covers them
Yay! I've been waiting for an ask about this, my partner loves the Splatoon series.
The Ink system is super interesting and also surprisingly simple, but to explain it we need to over a few things in 3D.
Firstly, 3D models need to be textured, back in early 3D days vertex colors were often used, this assigned a color to a point on a model, this was very simple and limited to the resolution of the model, in order to combat this, texture mapping was introduced. Texture mapping very much does what the name implies, it maps a texture onto a model. How is this achieved however? The most used method is UV mapping.
UV mapping is a little abstract, but imagine you have a cube, and you want to fit this cube into two dimensional space, well you'd probably try to unfold it like it was made of paper. This is actually the approach, a model is "unfolded" into a 2D shape(s) as to agree with the 2D nature of an image texture.
Tumblr media
This unfolded map is called a UV map, the UV stands for the axes it uses; The U and V axes are picked due to X, Y and Z being taken by the 3D model space.
Now you can sample the texture onto model, by pretty much just checking where the UV coordinate is on a texture, and then mapping that data onto the face in 3D space.
Tumblr media
Now how does the Splatoon ink system leverage this? I want to make it clear that this is just my educated guess, because Nintendo is notoriously hush hush about anything development wise usually, but let's get into how it might just work.
We now have a UV map, which can translate our 3D model into a 2D space, which is handy for putting a 2D texture onto a 3D thing, this also works in the other direction where we can take a 3D point and get it into the 2D space of a texture.
Now we have to shoot things, this is the easy part, the ink isn't actually a liquid simulation, it's just just heavily styled particles. These particles essentially just points in space, which are really easy to calculate when it hit somethings. I won't go into the depth of collision detection here, but in the case of these particles, they usually just a collision sphere, i.e. a radius where something is considered hit.
When something hit something else, you can figure out where it has hit, which leads to the painting process.
My leading theory is that when your shot ink hits a surface it goes through this process:
Find point hit in 3D
Translate 3D point to UV point
Add some "ink" to a texture at that UV point
Now it isn't just adding ink on top of the regular textures, this would be hard to work with, my thought is that we have a texture for each team. So when it adds ink to one, it removes ink from the other, this is how the painting over works. Another thing to note, is that these textures are monochrome, there's no need for color to be here, this can be added later
Tumblr media Tumblr media
These images can serve as masks for different render passes, my idea is that Splatoon actually renders a surface a couple of time, once the main surface then once for each ink color.
Tumblr media Tumblr media Tumblr media Tumblr media
Then it utilizes the painted textures as a mask between these surfaces, with a little extra shader goodness to achieved their excellent look.
Now Nintendo probably has some advanced and complicated way to calculate coverage, which I don't have to time to get into today, but perhaps some other day!
27 notes · View notes
lost-semicolon · 2 years ago
Note
What is something that typically inspires you, idea wise? Movies, music or, art? Or does it all just come to you in the shower XD
All manner of things inspire me! It's usually a premise or theme that speaks to me.
Games, movies, shows, music, comics, books. It can all be very inspiring! I mainly draw inspiration for media where the protagonist has some cool unique ability, I often find myself thinking of how I'd go about implementing that.
Lately I've been looking at a lot of indie titles and their awesome concepts; Like The Big Catch by Filet Group which is coming out sometime when it's done.
Tumblr media
It's a really cool puzzle exploration platform, a genre I've always adored! It has a big focus on the wonderful aesthetic of the CRT, soft edges and muddles colors. Interlacing too even!
Tumblr media
To my knowledge it's being developed in Unity, which is also my engine of choice. Main sing the praises of Unreal Engine, but with Unity you are able to be more flexible with your artstyle in my experience.
Games like this, really inspire me to make something I find wonderful, but also reminds me of what kinds of game I really love! The 3rd person puzzle platformer is a dying breed sadly, most AAA studios have their scopes way higher now adays.
As for shower thoughts, I have plenty, but they tend to vanish once I've left the warm water.
6 notes · View notes
lost-semicolon · 2 years ago
Note
how does hifi rush make everything in game go along the beat of the current song?? my brain can't wrap my head around it
There are many ways to synchronize gameplay to audio, however in the case of Hi-Fi Rush this happens to everything.
I want to preface that I'm not a developer on Hi-Fi Rush, so anything I say is merely an educated guess.
Ordinarily in rhythm games you'll have something called a conductor, this is an object in charge of the rhythm. Without it, you'd have to rely on every other object to keep the rhythm themselves, this can quickly get de-synchronized due to the nature of computers.
This conductor objects knows the play position of the music, alongside the BPM of the music. Through this you can always tell when the next beat is going to happen on the track.
There are a lot of minor technical challenges here, such as sync between conductor and track, if the BPM is set wrong in the conductor it won't be synced to the music. Audio delay can also ruin whole experience for the player, so options for adjusting latency is crucial, this is often done when opening the game for the first time, like in Rhythm Heaven.
Tumblr media
This not only tests the play, but also allows for a little automatic adjustment of audio latency.
Now with a conductor object in place, everything else can refer to the conductor to do it's tasks. This, combined with scheduling can make the whole process very simple for a developer!
Scheduling essentially marks a task, attack, action and so on, to be done at a later time. In the case of Hi-Fi Rush as an example: Enemies probably schedule their attack to the next available beat, they can do this by asking the conductor to let them know on the next beat.
Tumblr media
This is called callback, enemy tells conductor it wants to attack and how to do it, then the conductor makes sure that the attack is called on time.
Thank you for the asks Anon! I've had the pleasure of working on a rhythm game in the past before, sadly it never saw release.
8 notes · View notes
lost-semicolon · 2 years ago
Note
What would you say the "hardest" part of game dev is? Or, if there is no definitive hardest thing about it, what is the hardest thing to you?
There are many challenges to game development, some more complex than others. I like to break some things I find challenging.
I'd like to preface by saying my role is game development is mostly that of technical artist. That being said my team is small so I bounce all over the place.
Inception
The act of coming up with your game itself, this requires thought and design. You need to come up with an idea for a game, you need to consider technical challenges and find your own shortcomings.
A bulk of the games development happens here, this is the stage of development where things are most fluid, you ought to be able to change things rather easily at this point.
One of the major hurdles is ensuring that your idea can make it to the end of the project, that it isn't fundamentally flawed in some way. So getting feedback, testing prototypes is essential to not get burned.
Finishing
The 90-90 rule comes greatly into play when you need to finish you game.
The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time. — Tom Cargill, Bell Labs
This meaning, you need to be prepared for a long time of not much visible progress. During the finishing time of your game, you will suddenly have to tie a lot of loose ends, make things connect.
This is also where a majority of bugs, issues and problems arise and get squashed.
Releasing
The very bane of my existence, you need to release your game. It doesn't have to be on Steam, it can be some of the many game publishing sites, my personal favorite is itch due to their accessible nature.
But uploading the game is not just enough, you'll need to let people know it exists, and that's the difficult part. You cannot just bank on friends and family to spread the word, you'll need to do some marketing... shudders.
Marketing is super complex, no wonder there's whole jobs dedicated to it. You can do a lot on your own, if you're not planning on selling big, but if this is something you eventually want to release... it's hard to avoid the subject of money.
Marketing is very expensive, I can recommend this breakdown if you are more interested in the intricacies.
Last words
That being said, don't let any of this scare you away from game development. It's a truly wonderful medium allowing for incredibly unique experiences.
Some people love the challenge, I personally love the challenge of learning something new. It's all a part of the job.
Also remember not the be scared of trying new project ideas, there's no shame in figuring out an idea wasn't as great as anticipated. I have at least half a dozen of scrapped projects on my old hard-drive.
Thank you for the ask! Really great question
5 notes · View notes
lost-semicolon · 2 years ago
Note
how do procedural animations workj in games? stuff like slugcat animations in rain world for example
Nearly all procedural animations are based upon one mathematical process known as Inverse Kinematics and the use of common game physics.
Now what is kinematics? Kinematics in this case refers to kinematic chains, a subset of kinematics. A Kinematic Chain is a series of connected rigid objects (objects with no flex or give), these objects are connected by series of joints. For reference, you can imagine the human body as a kinematic chain, our bones connected by joints
Tumblr media
A kinematic chain is branching, where there usually is one central bone, from where all other bones branch out. The branching results in kinematic relationships between the bones, where a bone can have a parent and several children. It's important to note that a bone can only ever have 1 parent but can have multiple children. Parenting in bones like functions with a few rules:
Children always copies the parent rotation
Parents never copy a child rotation
You'll find that these rules also apply in real life. Moving your upper arm moves your lower arm, but moving your lower arm doesn't move your upper arm. That's the basics of kinematics, move a parent and the children have to move as well. But this comes with a unique challenge, if you want to move your hand to a certain position, your whole arm needs to move along. This is where Inverse Kinematics come in. Inverse Kinematics, are quite simply, kinematics in reverse. IK Mathematics are quite complex, so I'll spare you the details, but simply put, IK figures out how your upper arm should rotate if you want your hand at a certain position, instead of attempting to calculate how to rotate your upper arm to get there.
Tumblr media
The advantage of IK is that it greatly simplifies the process of animating a character at runtime (Runtime means while a program is running).
In Rain World, IK is used heavily for character animation, like the little feet of the titular Slug Cat character. This way, the developer just needs to give their animations system the position of the next footstep, and the animation system will take care of moving the character bones.
Tumblr media
If used correctly this makes the character animation look more alive, fluid and dynamic rather than hand animated walk cycles and attack animations.
Furthermore, Rain World features a lot of secondary motion, like tail flopping and messy fur. This is not using IK, rather just using ordinary kinematics with some basic physics, this is because the secondary motion doesn't need to hit a specific position, allowing for much simpler math.
This simpler math is also seen in the popular game Celeste, where the main character features long hair that moves around as you play.
Tumblr media
This is utilizing the very same technique as the secondary motion in Rain World.
The only drawback with using IK and procedural animation is the risk of "weirdness". Such is life with any procedurally generated content at runtime.
Sometimes bones have to stretch a bit to reach a goal, this will cause things to look a little weird, and on occasion the math just can't figure out what to do, making some bone flip out totally. This can mostly be mitigated by setting reasonable bone rotation limits and accounting for a little bone stretch.
Thank you for the super interesting ask Anon! Hope this'll be an interesting read :)
71 notes · View notes