14 July 2018

(HD) Pixel Art: Zoom & Fidelity Way

I'm fascinated with pixel art. I'm not good at drawing because I'm unhappy if the drawing isn't perfect. This is what pixel art allows me to do. Unfortunately, pixel art takes a lot of time and can be quite complicated, especially if you start off on zero. Luckily there are some ways on how to start off.

What Is Pixel Art?

In case, someone doesn't know pixel art, this is basically a different technique on doing art, which most often results in the art looking differently. Anyone who has played an SNES, NES or Arcade game you may remember the sweet 8-bit or 16-bit graphics. Maybe you have played Minecraft with standard graphics which is the same thing. Pixel art is usually done by placing pixel after pixel ending up with a full picture at the end. There are multiple techniques included in pixel art to get the results you want and there some more strict or less strict rules on color picking and techniques, but I'm not going into these in this post.   

Starting Off On Something

Now let's see how you can start with pixel art. Of course, it's possible to start off of nothing but it makes things harder, especially for people who are new to pixel art. I've done multiple small pixel arts of sizes up to 64x64. Going higher than that is not as easy anymore, even more, if you haven't gathered any experience. Luckily, I found some ways to get your first bigger art started. Here are some ways to start off I found on the internet:

Using Real-Life Drawing

One strategy I found, starts off on a real drawing that's scanned in or drawn on the computer. Afterward, they use this concept to clean up the lines and thus transform it into the pixel art concept instead. Then all normal techniques can be applied.

Creating Pixel Art Concept

This goes into the direction of starting off without something. Basically what you're doing here is draw a concept pixel for pixel until you get the result you want and then apply all the normal techniques. I can't suggest this to anyone who hasn't gained enough experience. You need to know the techniques and need experience for certain shapes and how to do certain things. Without it you're gonna have a bad time. (Yep, that meme is probably dead... "INVOKE THE DED!")

Zoom & Fidelity Way

Heart using Zoom & Fidelity with
8x8 chunks
By coincidence, I got this weird idea to do it differently. I want to make pixel art and I want it to explode out of proportion. No more 64x64 or smaller. So, what I did was, I created the pixel art using 8x8 chunks of pixels. As you can see, the picture on the right represents a heart drawn out of pixels. However it's not one pixel per black square, it's 64 pixels for each black square. Additionally, this does not look fine or high quality or however you may want to describe it, it looks very very pixelated. It has a low fidelity or amount of detail.



Heart using Zoom & Fidelity with
4x4 chunks
This is the base of the picture representing what I want to make, next up I'm adding more fidelity or detail to it by smoothing the lines with smaller chunks of pixels. This time 4x4. As you can see it looks much smoother but weird. It sometimes happens that it looks weird and that's totally fine. We can still clean up and fix it in the upcoming processes. For now, we just want it to look smoother and have more detail - more fidelity.




Heart using Zoom & Fidelity with
2x2 chunks

Alright, next up we decrease the size of our pixels again. So far I've been using the 8, 4, 2, 1 chain. I expect others to work as well but I'm a fan of binary numbers / the power of 2 chains. Anyways, we're further smoothing out and adding fidelity to our image and you can see the result. We've smoothed out the shape much more it looks much more like a non-pixelated heart now. This is not the end, however.


Heart using Zoom & Fidelity
Last but not least next up we use single pixels to further smooth it out and add fidelity. This is going to be the end result. Now we need to use all the pixel art techniques to make it look the way we want. Obviously, if you see something wrong with the heart that's me showing my inexperience with using the techniques correctly. I just recently started, but you can see how good it looks in comparison to the first one. Additionally, it's now 128x128 and not 15x15 and yet it's still made the same way pixel art is made.

Beautiful.

Conclusion

I've been using these techniques for one of my games and to gain more experience with pixel art as well, whether or not this technique is perfect or can be applied to everything is hard to say. This is something I came up with myself, I don't know if someone else had the same idea. (I'm not claiming anything :P though I could use the money probably haha xD) In the end, this is a technique that did it for me and maybe it helps other people too in either gaining more experience or in making bigger pixel art.

09 July 2018

Deep Learning AI Potential In Game Development

Deep Learning is a topic in computer engineering which is not going to die out any time soon. There is a reason why. After finishing my current course I'm gonna do a deep learning course.

AI Programming

AI stands for Artificial Intelligence and up to this point, most AIs were designed to automate behaviors. This way you could allow monsters to find a path to the player, robots to move around mazes or to program Non-Playable Characters (NPCs) to react to the player's actions as well as acting themselves. They've been around us for centuries and there is hardly any game that does not contain one.

Artificial Neural Networks

This technology is based on Artificial Neural Networks (ANN). A Neural Network is - simply put - the recreation of the human brain or of it's Neural Network to be more specific. This technology allows us to program AI that can detect patterns. A good example of this would be the ANN programmed by Google which can detect objects in pictures.

Deep Learning

Going a step further we reach Deep Learning or when occurring in less complicated ways Machine Learning. I'm not going into the details, but by using the ANNs and let the computer itself modify the weights of each Neuron the machine can learn. Using bigger and deeper nested ANNs results in the phenomenon called Deep Learning. A good example of Deep Learning is Google's Deep Thought project. If you never heard of it, it was able to beat the world's chess champion. Another example would be the AI Elon Musk presented in the game Dota 2. This AI was able to defeat a champion as well. The usage of these works similar to the way the human brain works, hence why it's a recreation. You set up the ANN and feed it the respective information it was designed for. Then you keep teaching the machine in different ways depending on the goal and data given and it will trial and error it's a way to success. I recommend you to watch some Machine Learning AI plays Super Mario Brothers videos. It's really interesting to see how they're learning and the exponential success they make.

What Is The Potential of Deep Learning in Game Dev?

Finally, the actual reason for the topic. There are multiple ideas I have flying around my head, so, let's go through each of these reasons I have to get into Deep Learning for game development reasons.

AI-Based Instead of Procedural Generated

If you've played Diablo III or Minecraft or any game that uses generated content you can see repetitions, issues, and much more problems or unnatural looking phenomena. The fun thing is if you show a Deep Learning using a machine a map it recreates it one to one. If you show it two maps it tries to combine them. If you show it a thousand maps, who knows what the result may be. If you teach the AI which maps are great and which ones are bad, over time (a few weeks probably depending on the world size) it will be able to generate you more and always different looking worlds that are perfect or nearly perfect. This would lead to some really interesting new games, like a fully 3D generated game that goes into more detail than Minecraft, Cube World or other AMMORPGs.

A Fair Rating System

Many games and gamers struggle with rating systems that are used nowadays. Almost every rating based system depends on game wins and loses. The problem is that you may lose a game even if you play better than the others if it's a team match. This leads to customers being unsatisfied and toxicity. This might be quite a bit into the future but if we can teach an AI to play better than a champion in a game the AI can be considered the best player in the world. You could even teach the AI to play against itself to push it even further than any human could reach. If someone's good at a game they can help those who are not. This also means someone good at a game can tell if you play good or bad to a certain degree. So, if we teach an AI that's the best in the game to rate your decisions while watching how you play it should be able to rate you much better than on a win or loss basis.

Endnote

And if that's not enough these are just two ideas maybe these will spark new ideas for other people as well or I will have more ideas once I explore the ones that were mentioned here. Maybe we can use AI as playtesters to check if the game is possible on difficulties we as game developers can not beat. AIs can be used to determine world record times to get an idea of the best possible time and maybe just maybe AIs will be able to find bugs and short cuts we didn't think of too.

05 July 2018

Listen to Your Body?

Since I've been having issues with my sleep for quite some time, waking up all sleepy and being sleepy all day, I've looked for remedies for this. At some point, I started using the sleep detection feature from an alarm app I use on my smartphone because the original can't play through earbuds I came across this weird idea.

Listen To Your Body? What Do You Mean?

A few years ago I watched this video by Adam Conover which was about the truth of drinking eight gallons of water a day. In that video, an interesting and ridiculous simple point is being made. Why not drink when you're thirsty? It makes sense, your body knows when it needs something. You feel hungry when you need to eat, you feel thirsty when you need to drink, you feel the urge to go on the toilet when you need to empty your system, you feel pain when something is wrong, you feel cold when your bodies cooling down and you feel hot when your bodies heating up. By the way, check out Adam Conover's videos they're awesome - especially the older ones. Anyways, if you might not have guessed it, it should be the same as sleep. When you feel tired your body needs sleep.

Does It Actually Work?

Well, there are a few issues that you may have heard off and there are even some that kinda get me worried. If you ever experienced sleeping a long time, like ten hours or longer and wake up still tired then you know what worries me. If we assume that if you're tired you need sleep after sleeping for a long time waking up tired having to sleep more doesn't sound good. Worst case scenario, you would sleep through for multiple days. At least if we're assuming you always wake up restless after your sleep.

The other aspect where I see some issues is if you're really into something, which can sometimes be noticed by people who are addicted to something they might not notice or feel hunger for example. This means they won't know that their body needs food or even worse something to drink. As we all know, not drinking or eating for a certain amount of time results in a very serious illness called death.

Conclusion

Generally, it should work fine, however, I don't really trust it too much. I guess I'll give it a try for the upcoming weekend and let's see how it'll be going. If it actually works wonders I'm gonna do another post on it, if not, don't expect anything on that topic again. Just like the power napping experiment, which I aborted. It might have worked in the long run but something was off.

Sleeping Statistic

As I mentioned I use this app to track my sleeping and the app rates the sleep by a number between 0 and 100 while tracking information such as length of the R.E.M. (not the band) phase, amount of interruptions, length of sleep and last but not least sleep cycles. Here are the statistics listing my past 30 days or so. Ah, the high jump there was an error, for some reason, it counted the whole day as sleep. Yup, 23 hours of sleep. :P



About Me

My photo
I'm a M.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.