Hey, i am Jelle and i recently hit my head whichled to a new fundamental understanding of theuniverse. I realised that after making games forover two years, i’ve outgrown the real world so getready for a game with imaginary numbers. Now you’reall, smart people, i’m sure you know what i mean butif, you don’t know what imaginary numbers are wellhere’s the basics i have before me. Two carrots andi want to fill each part of this box with a pieceto calculate how many i need, rather than justcounting. Every part i can multiply the size to getthe total amount.
This is called multiplication andeven better. When both sides are the same. Amounti can just multiply the same number twice and wedon’t even need to write down that way. We can justwrite a cute little two above the number, this iscalled squaring now what if we know how many totalholes there are in the box and we want to knowwhat the length of the sides were in the firstplace. Well, for that, we humans invented the inverseof squaring the square root notation.
I now knowexactly how to lay out my parts to make my pie wecan take square roots of just about every numberthe answer doesn’t even have to be a whole numberbut, and here comes the catch. What if we wantto take the square root of a negative amount ofcarrots? Can you think of a number? That’S when wemultiply it with itself equals a negative numberno, well meter. So what did the smart people say?
Youknow, we’ll just take the negative side apart, andcalculate the rest of the roots and uh. We have asolution times the square root of negative one butthat’s. Just a oh – and you know, let’s justreplace the root with the latter to make itlook like we solved it. Congratulations, you’re! Nowan expert in imaginary numbers and one pie: richerbon appetite, oh, and if all of this makes no senseto you well don’t worry they’re all made up anywaynow.
Why would i use this in a game? A common wayto visualise complex numbers. A normal number plusa number of i’s is on the complex plane, it lookslike a normal 2d plane, but instead of x and y weuse, the real parts on the x-axis and the imaginaryparts on the y-axis. So we can create a game. Wherea character, moves along the complex plane, but inpractice.
This doesn’t really look that specialit just looks like a regular 2d plane for nowthe. Exciting parts come when we remember what theimaginary part stood for is square root, negativeone and what we can do with it. If we multiplytwo positions on the complex plane, weird thingshappen like when we have our character at a randomposition, and we multiply its position with, i it’slike we’re rotating our character. 90 degrees fromthe center. Amazing, if you look at the numbers, itmakes perfect sense.
Well, you know you could alsojust rotate the character 90 degrees, but this isway more fun. We can multiply our position with allkinds of different numbers and each resultsin another rotation. We can even scale ourmultiplication to move further away. Are you seeingwhere? This is going fun fact.
Most 3d programsuse a similar thing to describe rotations in 3dquaternions a 4d equivalent to complex numbers. Noone really knows how they work, but they are muchbetter at describing rotations and don’t sufferfrom the terrifying gimbal lock. So you could usethis as a stepping stone to understanding themysterious worlds of quaternions, maybe that’ssomething for another video speaking of videoslet’s, get back on track, we’re here to make a gameafter all and who better to help us through thisthan our favourite explorer, the little astronautsince. We’Re only going 2 dimensions. This timelet’s give him another update.
He can keep his newhelmet, but he’s going to need his antenna back tokeep in touch with the real worlds. I alwaysget happy when i can do a little more drawingok, so we’ve got our character, but what is thegame going to be about? Well, let me explainall right. So our little astronaut is lost againand. He has no idea what he’s doing all he has isa little trippy device that lets him.
Teleport toother locations, three strange orbs and all theseorbs have numbers on them. It’S almost like thenumbers on the orbs are the numbers. His positionrelative to the orb will be multiplied by whata coincidence. It is your task to help him findhis way back home with the help of these specialorbs. Alright, i know what to do.
Let’S get to codingi made a special complex multiplication methodthat i can use all over the place i made theballs. I made a little 2d character. Controller verybasic and set up the teleportation i made sureyou could only teleport to a place. You could seeand wasn’t inside any walls. You know to preventthis from happening: oh and then i did some morepouring to make the camera and some game logicand before we all fall asleep from the boringcode.
I wanted to make some more art. When i wasthinking about an art style. I went through thehistory to find the perfect time period. Wherethese, imaginary, trippy rules would feel rightat home, oh yeah, love and peace. Chill out, brolet’s go back to the 70s.
I got started on thetile palette and well kept going for quite awhile. Actually man. I forgot how much work that isyou would think it’s just a couple of variationsbut. No, it’s more. Like 20 variations, you have theseflats parts, the edges, the corners, the outsidecorners, the inside corners, the slopes, the ledgesthe ledges above the corners, the flat parts, underflat parts.
The list goes on and on and on luckilyi could use unity’s rule tile system, which meanti could set up some rules for which style to usein what case perfect for quickly recreating levelsbut kind of quickly. You know it’s still a lotof work and i also made some streaks that i candraw to show where the player can go, but therewas still one vital thing missing. I need it tosell the transition with the orbs, more becausewhen, you teleport the whole world, flips aroundand, all the orbs become their inverse thisway. You can easily teleport back and forthi know time to make some fancy shadersusing shader graph. I made a shader thatcan shift, the color or more accurately, the hue towhatever value.
I want. Let’S test it out, shall wewhoa don’t do drugs, kids and now, with the clickof a button. All the colours are inverted withoutchanging, the black and white values. Of course, tokeep everything. Nice and clear, but i wanted morei, made another shader for the target graphic youneed to know where you’re going to end up afterall and just a flat image is just boring.
I startedwith a hologram shader, but that didn’t really fitthe vibe of the game. So i gave it a little 70smakeover and now it’s perfect rainbows everywherelook. I can change the amount of colours and thescale and the speed of which the bars move, andand even the weight of the bars i feel likea shadier magician. I also gave the astronautsome life with a bunch of animations, because youcan also carry the orbs around. I made a separateanimation for that where i swapped some spritesaround to give the animation a mix of tweetsand frame bar frame animation, very cool.
I made acute little teleport jump. Oh and when you finishthe level it’s time for a big flex and whenyou fall, your character starts wiggling aroundalright. The game looks pretty trippy but ithink. I can go further. What if we start playingwith screen itself?
I learned some tricks withmy previous game, where i render the camera imageon a plane and use another camera to captureonly that plane. This way you can easily ratherlike these chunky pixels, but it also allows meto have a game screen inside a game with thisi can do all kinds of crazy things: likemove the viewer around or even rotate ittry. To beat the game like this good luck, ofcourse, i had to rewrite how the screencastingworked on the game view, because i’m no longerlooking straight at the screen. Luckily, i didjust that when i made my eye tracking gamecheck it out, if you haven’t already, i meantechnology is just unbelievable. I’M glad i wentthrough all the trouble back then so i can juststeal it from my past me.
Basically, i cast mymouse out to the plane and calculate the screencoordinates as if the plane is a screen using someinverse rotations and offsets magic. You know thedrill this even works when the plane is squashedalright enough playing around time to play. Routesand make some levels these teleport orbs can bewhatever value. I want so. I had a lot of freedomwhen designing my levels.
I had some fun ideas. Likeyou have to find your way to the other side of awall. We have to match the amount of rotations wehave to time the orbs just right, and these enoughbut i had to make a clear distinction: betweenthe orbs that can move and those that can’t i’mpretty sure. If you could move every orb aroundyou will be able to break the level pretty easilyluckily. I can just put them in the groundproblem solved.
I finished everything offwith some decorations, i added a start and endscreen, and i made a nice tune to go with the gameyeah. Without that, the game was ready to go. I wishyou all the best of luck and don’t throw up thankyou, so much for watching be sure to like andsubscribe. So you won’t miss the next video andyou can play the game right now on itch.iowellhave, fun and i’ll.
See you guys next time, bye,