Wednesday, 5 December 2018

Ludum Dare 43 Post-Mortem

I'm kinda jumping the gun on calling this a post-mortem since at the time of uploading this video, Ludum Dare 43 hasn't even finished yet. But hey, I already finished my submission and based on my schedule of uploading a video every 3 days, this is the best time slot to make this.

So for those of you who don't know, the theme was "Sacrifices must be made". I used a word processor to jot down a few ideas, and soon enough I came up with the idea that the player has to protect a small population of people from a bunch of oncoming enemies, but they can also sacrifice a member of the population to get stronger.

And that's the premise of my submission, you kinda have to balance having citizens to protect - if they all get killed or sacrificed, then the game's over - with your own power. Also, the enemies get progressively stronger as the game goes on.

So how did development go? Well, I originally intended for the art to be a bit more interested and varied than it ended up being, I thought hey I can do medium quality art in a relatively short time, so why not? However, by the time I put pixel to... uh... computer screen, I ended up with some real minimalistic sprites.

This proved to not really be an issue since it looks perfectly respectable, and on top of that took me like an hour to create.

As for code, there was a bunch of algorithmic type programming which is my absolute favourite type of programming. For instance, moving the selection cursor between citizens to determine which one to sacrifice was real fun to program, though I did spend about an hour working through one annoying bug which in retrospect, was way more time than I should have.

Another nice one was determining how the citizens should wander around- I went through a few really complicated solutions until the really simple "generate a random point to walk towards, then once they reach that point just generate a new one" system popped into my head.

Overall I'm really pleased with this Ludum Dare submission I gotta say, it's probably my best one yet in so far as its design goes. It's probably got the most replay value, and miraculously the music turned out sounding pretty decent! For the first time since that one music track from Mushroom: The Ruckus... I can't remember what it's called, but it was pretty good.

I also feel like in this Ludum Dare, I paced it way better- previously, I'd have like almost the whole game finished on Saturday, then on Sunday I'd only have audio and a few tweaks left to do. This time, it was much closer to a 50/50 split- probably on account of how much work I had to put into this one as compared to my previous Ludum Dare games. All in all, I put just under 16 hours of work into this Ludum Dare game.

Thanks for watching and stay tuned for more videos about games that I make, some of which are Ludum Dare games and others which are like real proper big games.

Tuesday, 20 November 2018

How To Do Pixel Art With Godot

Some of my videos end up getting a bit technical but let me tell you this isn't one of them. Making pixel art look nice and neat and tidy in Godot is like one of the easiest things ever and I'm gonna have a hell of a job stretching this into three minutes, but somebody commented that they wanted to see a video on this so I guess I'm at the mercy of the people.

So to start with, I'd recommend determining the resolution that you want your game to run at. For most desktop games I'd recommend that this is some nice even fraction of 1920x1080, so that could be 920x540, or in WARP-TEK's case 480x270. All I've done to arrive at these numbers is divide 1920x1080 by 2 and 4 respectively, so that each pixel will take up more space on the screen.

So now that you've made the hardest decision that you're gonna make in this long and tiring process, all you have to do is go to Project Settings, Quality, enable "Use Pixel Snap" to make sure you don't get any weird artifacts when you've moving the sprites, then go back to "Display"->"Window", set "Resizeable" to true, set the Test Width and Test Height to 1920x1080(just to make the game the appropriate resolution when it's scaled up) and for good measure I usually enable "Fullscreen" here too.

Lastly, go down to "Stretch" in the same section and set mode to viewport, and set aspect to keep.

And that's it, you've now exactly recreated the same style of pixel art rendering that I use in WARP-TEK. The advantage of doing it this way is that all things like particle effects, Control nodes, etc will all be pixel-lookin and you don't have to do anything about it.

See? Super easy. I told you I wouldn't fill up three minutes with this. Hmm. So what's up with you guys?


Hm, interesting stuff. Yeah. I hope that all works out for you, you know, the stuff you just said. Yeah.


Well thanks for watching and stay tuned for really short videos that you too can recommend that I make so that it's your fault that the videos are too short and not mine. Goodbye!

Wednesday, 14 November 2018

Play-Testing WARP-TEK

Recently, I've sent my game WARP-TEK to a few friends for beta testing- so they can help me catch bugs, point out things which are annoying or whether the game is just "missing something".

I'm not really expecting to get unbiased feedback. In fact, I'm almost certain that they all had their expectations a bit unfairly tampered with before they even launched the game. However I do think that their feedback is super valuable- they know the core idea of the game better than random people, so I don't have to own up to the fact that I don't have any tutorial system at all, and I don't have to explain it to them otherwise.

I'm probably not gonna get feedback like "this whole system is broken, ill conceived and I spit upon you and your ancestors". If I get feedback like that at this stage, then fuck me it's a good thing I didn't show anyone this pile of garbage before I fix it. If not, then it's a kind of "go-ahead" to pass it on to the next wave of playtesters at some point who would be people a little more removed from me.

I should note at this point that if you're active in my Discord server, there's a much, much higher chance of you getting a beta key. That's mostly because if you never speak to me, then it's really quite unlikely that I'll even know you exist and I'm not gonna fire some beta keys into the ether quite yet.

But the point is that at the moment, I'm not expecting to get really detailed feedback. One active user in my Discord server - Miles - has given me an extraordinary wealth of things to think about, consider, and tweak. I'm super grateful for this but it's a spell of luck that he did. Fortunately, the overall response seems to be that the game is pretty cool(albeit flawed at this stage) which definitely surprised me for the game being so early on in its life cycle!

The important thing about selecting playtesters is to make sure that they have some kind of analytical and game design oriented mind so as to pick out things that are cool and fun and be able to present them. Even if they don't have the best solutions, if they have anything to say at all then it's your job as a designer to evaluate their feedback and consider whether there is a problem there and whether you can come up with a fix for it.

With less experienced game designers or with completely random people i.e the average consumer, they probably will give you a high amount of garbage advice. They might suggest new features that are incoherent with the rest of the game, they might feel frustrated by something but not realize what it is that is actually frustrating them.

I don't mean to frame it as them being stupid, but it does take a certain level of skill to provide good and useful feedback, and when you're interpreting this feedback you have to also consider the playtester's competence in analysis and design.

Lucky for me, out of the three people who playtested WARP-TEK for me, two of them were analytically-minded game developers. The third was my brother and he didn't give me shit for feedback so I'm going to pour syrup in his bed but the point is, I got some good, trustworthy feedback in the end.

Anyway this video sucks and I guess if you watched this far into it then I kind of feel bad for you but I already missed my last scheduled upload 3 days ago and I can't justify missing another one. YouTube is hard! I gotta think of a cool idea every 3 days? And I got a video game to develop? Yikes!

So yeah thanks for watching and stay tuned for more meandering garbage. Goodbye!

Sunday, 28 October 2018

Optimizing Caffeine Intake (+ Other Nootropics)

I'm sure that caffeine use is familiar to pretty much all of my viewers, being the programmers that most of you are- and of course a central tenet of programming is consuming caffeine.

However, if you're drinking caffeine daily over a long period of time, you're probably not using it as efficiently as you could be, as I found out the hard way.

So for some background, I went from drinking about 8 or 9 cups of coffee daily which is known as "fucking heart attack" quantities of caffeine intake- it'd probably work out to 600-700 milligrams of caffeine a day. I woke up every day with a tension headache and constantly had pain in my jaw from muscle tension, and developed some pretty unpleasant anxiety.

However, at some point I got really sick for a week so I couldn't drink caffeine anyway and this had the effect of showing me a level of illness (combined with caffeine withdrawals) that I'd sooner kill myself than try to experience again. But the point is that after this hard caffeine reset(well, it took a couple more weeks to get to actual normal levels) I had lost a lot of the tension and anxiety that caffeine was giving me.

So I decided fuck that I'm never getting caffeine dependence again if that's what the cold turkey withdrawals are like, and I worked out a way to drink coffee occasionally without experiencing dependence or tolerance.

You might be wondering how, and you could probably work it out with a few minutes to think about it because it's not complicated, it's literally just not drinking coffee regularly. I generally limit it to 2 times a week, distributed sporadically so as to not let my body get used to it. This has the effect of making me non caffeine dependent in day to day life, and when I do drink coffee it makes a hell of a difference to my productivity.

Quite often, the amount of work I get done doubles or even triples on days when I drink coffee because I have maximized my sensitivity to it. This also means that on days I don't drink any coffee at all, I can still do an average normal amount of work.

So that's basically my advice, get off caffeine either cold turkey(which I legitimately would not recommend if you drink as much as I used to), or taper off by recording your daily caffeine intake and slowly reducing it- for reference, there's a little under 100mg of caffeine in an average strong cup of coffee, and about 20-30mg in an average cup of black tea.

Once you're off caffeine, just use it periodically- 1 or 2 days a week seems to be a good spot for me, but it depends on how your own brain deals with caffeine. I develop dependence and tolerance remarkably quickly, but I've heard some people drink coffee 3 or even 4 days a week without developing any tolerance at all.

So what about this "other nootropics" bit I put into the title of this video? That's right, your boy's done his research into things that go a bit beyond caffeine.

Now I'm a bit shy so I'm not going to mention microdosing tiny amounts of LSD to enhance flow states and creativity.

However, as I said- I'm too shy to mention that bit, so I'll move onto my next favourite which is l-theanine. This one's a bit niche and I've never taken it in tablet form, but it's a chemical also found in black tea which reduces the jittery side effects of caffeine and increases single-track focus, so your brain's not as all over the place as it would be if you just shotgunned 5 shots of espresso. In my experience, the caffeine experience from black tea compared to coffee is very different. Black tea definitely affords much more focus and clear thought rather than the frantic feeling you can get on a lot of coffee. Plus, black tea naturally has much less caffeine than coffee so that probably plays a role. 

L-theanine is frequently taken on its own as well. A lot of people in nootropic communities consider l-theanine as an obvious frontrunner- it's really hard to build a tolerance, dependence or experience withdrawals with even high amounts of l-theanine daily. It has no real adverse effects compared to caffeine which can cause anxiety, tension, shakiness among other things.

Alright, this one isn't really a nootropic but it's a good idea. Take some damn multivitamins. Caffeine actually drains your brain's magnesium stores, meaning you're more prone to unpleasant muscle tension- which is already an unpleasant side effect of caffeine. Also, if you're not getting enough vitamin B or vitamin D, you might just feel kinda depressed or deflated and not even realize it until you start supplementing them and feeling noticeably better.

This is especially important if you're on a vegan diet, since it's quiet easy to miss out on essential B vitamins or vitamin D3- which is difficult to produce from plant sources. Everyone else feels the effects of animal products generally being supplemented with vitamin B and D before being sold to you, but unfortunately this practice is much rarer in vegan products. 

So that's about all my knowledge on this topic but I've skipped over some details. If you want to know anything else or better yet if you want to share something along these lines with me in the comments, please do! I should also note at this point that you shouldn't expect any nootropic drug to fix your productivity problems- you have to put some brain work and head thinkin into it to get anywhere with it. These should be used IN COMBINATION with other practices, like that pomodoro thing seems useful, project tracking and closing your damn social media channels while you work. Hell, even meditation can prove useful.

Thanks for watching and stay tuned for more videos wherein I, an unqualified 18 year old, gives you advice as to which mind-altering substances to use to help you achieve your goals. Goodbye!

Wednesday, 24 October 2018

10 Tips For Using The Godot Engine

Fuck me I really am doing a top ten list aren't I? Jesus Christ. Anyway, let's get to it, I guess let's start with number one.

1. Singletons. These are basically scripts that don't really attach themselves to any existing node, which means that they exist outside of the current scene- which makes them perfect for things like saving data, playing music uninterrupted between scenes or preloading a bunch of resources to be used later. I've got 14 singletons in WARP-TEK as we speak, so I can tell you that I really like using them.

2. PhysicsBodies. This is close enough to a tip, right? Let me just run through the three types of 2D PhysicsBody nodes and their usual use-case.

KinematicBody2D nodes are what I use for most things that need to move around, so enemies, the player, other colliding entities, etc. RigidBody2D nodes are good for physics-based movement, so if you wanted some boxes for a puzzle game that move and fall like real boxes would, then you'd want to use RigidBody2D. Or, you COULD use KinematicBody2D but you'd have to program all the physics stuff yourself.

Lastly, StaticBody2Ds are good for anything that should never move like walls or the floor. Easy enough but it's good to know the difference.

3. The ternary operator. Now most programming languages have this one, it's the question mark one in C++ and in Python it's just thing if condition else other_thing. In GDScript, it's the same as in Python(as most things tend to be) and it's super useful. I realize it's much nicer to use this ternary operator on one line rather than dedicating 4 lines to an if/else block.

4. Here's a more functional tip, and it's based off something I actually do in WARP-TEK. Use a Singleton script to preload all of your resources to speed up in-game performance. This way if you want to instance a node, you just refer to its entry in this monolithic resource script and instance it. It has in my experience with preloading over a hundred objects made the game start up maybe half a second slower, but it drastically reduces lag-spikes that stem from repeatedly having to load or preload resources, such as when you're spawning a big blast of 30 or 40 bullets.

5. Specifying neighbours in Control nodes. So have you ever run into the issue where you want a menu to be usable with the arrow keys or a D-pad but Godot just won't direct to the correct buttons in the proper order? Well, I haven't because I haven't really considered keyboard accessibility until really recently but there is a really neat solution to this problem.

Any control node will have the "Focus" category, and you can see there are a few properties like "Neighbour Left", "Neighbour Down", etc which basically determine what happens when this button is focused and a specific key is pressed. In case this explanation wasn't super clear I'd say just play around with it because it's a really simple concept and it's implemented really well.

6. NinePatchRects. This is also related to a Control node, but trust me- this is super useful, and it's actually a new thing that only just appeared in Godot 3. Basically, for Mass O' Kyzt I had to manually size and align all the edges and corners for all the menu panels and stuff. For WARP-TEK, I've specified a 3x3 grid of what each corner, edge and middle piece should look like, loaded it into a NinePatchRect and all you have to do is resize it and it'll automatically scale or tile the corresponding parts of the graphic to fit a size of your choosing.

It's super convenient and while it sometimes takes a moment or two to actually configure it so it scales how you want it to, it's definitely worth looking into.

7. Have you ever had that issue where you're cooking pasta for a while and you stir it but you're kind of impatient and you think "well, this is probably good enough" and you strain it and put it into a bowl and you take a bite and it's really crunchy in the middle and so you put it back into water but you have to heat up the water because you used cold water but by the time the pasta's boiling again the pasta has actually dissolved into the water and you're left with a kind of starchy gloop that you have to turn into a soup but you don't even really like soup so you just pour it out and then it blocks the drain because it's still really thick in places and then your sink overflows and instead of calling a plumber or even turning off the hot water tap you just sit under the table crying and feeling malaiseful about your terribly out-of-control life while you wait for the small puddle of water on the kitchen floor to reach you and force you to either clean it up or deal with soggy clothes but when it does actually reach you you just realize you don't have the energy or motivation to even get up off the floor for another hour and your clothes get completely saturated in warm starchy water and by the time you do get around to cleaning it up you've done permanent water damage to that stack of important envelopes that you've been meaning to pick up off the floor but never got around to?

...No? Alright then, moving on.

8. Autotiling! Of course this one had to be on the list. It's a little tricky to get your head around initially what with the bitmask stuff but it's super useful once you do get the hang of it. I won't try to explain it too much here but trust me- learn it. It'll take you an afternoon at the absolute longest, and potentially even faster if you watch my tutorial video on autotiling (I think I have one, I suppose I should check before publishing this but fuck you I guess)

9. Using an external code editor! I did do this for about a day with Sublime Text before realizing that Godot's built-in code editor is fine for my needs but if I had a strong preference(for instance, if I was a Vim or Emacs fanatic) then I would be in luck, because Godot makes it super easy to use a third party editor. Just go to Editor in the top left, Editor Settings, and under "Text Editor" click "External" and configure to your heart's content.

10. The new Audio Bus system. Okay, I don't think this really counts as a tip but it's just something I really like about the engine and you gotta agree it's a step above whatever the fuck 7 was about. Basically, I generally create two new buses in addition to the master bus, and I call them "music" and "sound". Fairly self-explanatory, but the idea is that you route all the music sound through the music bus and all the sound effects through the sound bus. If you wanted to you could have buses for ambient sounds, voice, etc.

The point is that this makes things easier for you when you're adjusting system volume. You can make a nice volume slider that directly adjusts the volume of the music bus, and another that corresponds to the sound bus. This stops you from having to save another variable like music_volume and refer to it any time you want to play some music.

Anyway, that's about all I've got. If you have any more interesting things about the engine that you think I and the world should know about, for real let me know in the comments- I'm still learning new things about the engine constantly!

Thanks for watching, and stay tuned for more top ten lists... maybe... probably not though because this was a pain and really long to write sooo.. uh.. goodbye.