in this video I'm going to show you how you can speed up game development using custom tools
believe it or not this is a solution to a problem that I've been having but we'll get on to that
later I've been making a difficult platforming game called faceplant for over a year and a half
now it's my first solo developed game and on this journey I've learned some ways to make the process
more efficient so I'm going to show you four ways I've done that with my full process for
how I create a tool as well I'm using the Godot engine but this should be transferable to whatever
engine you use and as a disclaimer I'm no expert and these tools might not be directly related
to the type of game you're making but hopefully you can learn something and maybe it can inspire
you to make your process more efficient if you have any tips or if you've made any interesting
tools for your game please let us know in the comments you might just help someone out thank you
this is rules for tools otherwise known as common sense which I sometimes have to remind myself of
because I am the biggest tool so number one is it has to save time you don't want to spend more time
working on tools than you do on actual development number two good enough is good enough one problem
usually has multiple Solutions and there is no real perfect solution so good enough is
generally good enough in number three if it isn't broken don't fix it making tools is fun right but
not everything needs to be optimized so following these let's take a look at some things I've done
so here's the problem my game is huge this tile map is in one scene and it holds all of my levels
these white blocks here represent the platforms at some point I'm going to want to put some artwork
there like this little placeholder here so how can I get this level layout into an art editor
so I can draw on top of it first thing I thought was maybe I could screenshot each level and then
just put it into the art editor manually but with 56 screens planned and that's gonna take a
lot of work if I screenshot it manually how can I make sure the window size is the same size as the
background art and how can I make sure I'm getting it lined up perfectly per screen doing it manually
is just not an option fortunately in Godot there's a way to save the screen as a texture like a
PNG image and then I just had to set up some automation so that I can go through each level
step by step so if I'm in the game and I press my screenshot button to change the window size to the
actual pixel resolution that I'm going to be using for the background art and it's scrolling through
every single level in my game and exporting them as textures into a folder it even automatically
hides everything that I don't need in the screenshot all conveniently named as well
so all I need to do now is open that folder drag those images into my art editor and I have the
templates for the levels ready to go by the way you can wish list faceplant now on Steam I believe
steam shows the most wishlisted up upcoming games in the popular upcoming section so it's
a free and simple way to support if you want I'd really appreciate it sometimes it's useful to have
some information on screen when you're playing the game so one of the first tools that I ever
made was this little debug window as you can see here at its most basic this is just a display that
works at runtime which gives me some information that might be useful like can the character jump
what's the Y velocity what's the gravity scale what's the current FPS can the character double
jump and all those things so if I just play the game I made a little button that toggles on and
off the debug some of these I haven't used in a long time so they don't work anymore I also added
in some toggle buttons like wall bouncing when I was testing wall bouncing it was useful to turn
it on and off fire mode and it's no longer in the actual game but if you touch the fire you die and
you basically have to start again I've got a little timer toggle Here For Speed runs when
you start playing the game I can easily track how long each section takes and obviously I can have
this little toggle for horizontal movement which I later mapped to a keybind but the coolest thing
I think is this little line edit tool here as you can see it says type a number to teleport
so one problem that I had pretty quickly with this game was how do I test out the levels individually
without having to get back to that level usually if the levels are scene based you could just open
that scene and since my level is in one huge scene as I showed before I needed some sort of system to
test the levels individually so in order to solve that I basically came up with these level targets
as you can see here just above my head I placed them in the game where I want to test from certain
areas like level 1 level 2 level 3. if I play the game and I type in a number into this little box
like let's say we want to go to level five press enter it will teleport the player to level five
and then I can turn horizontal movement on and test it again this is really useful obviously
because I can go as far as high as I want and test out any level basically immediately when I first
set the system up I would manually have to assign each of these levels a position in the script but
the way I set it up now uses some of the tips from earlier from automation let's say we're at the
current level Target level 60 and I want to add a level Target here all I need to do is duplicate
the level 61 put it in place play the game type in 61. and it's taken us to the level that is all
automated in the way that it works is basically we have this level targets group here which is where
all of the level targets are stored each of these nodes has a position I can change the position of
60 for example and it's updating the position in the transform when I play the game and type
in 60 it says okay which is the 60th child in this group and what is its position let's teleport the
player to that position and it's as simple as that a very useful tool that has saved me so much time
so obviously when you're debugging your game you can use the in-game debugger here and set break
points in your script so you know exactly when the codes breaking and you can figure things
out a little bit easier with your code but one thing that I find really useful is to have some
actual visual debugging functions as well small but simple things like turning the character
green on jump changing the player's Direction when I want to checking if the players on the
floor by either turning the player green turning the player red or turning them blue these visual
indicators just help me identify when something's happening when I play the game so I'll show you
the effectiveness of these visual debuggers so recently I've been working on the Springs
which is one of the mechanics in the game and I wanted to know when visually certain momentums
for the spring activated so I can put the game in slow motion as I've done here and then play
the game and we'll see the characters blue but turns green and red and the green indicates that
it's the second level of spring momentum and the red indicates that it's at the highest level of
spring momentum and it works exactly as I like there we go so to show another use case for this
I'll show you the ghost Sprite so when I jump in the air a Sprite will appear at the position that
the character was at now the Sprite is Lumber because I implemented this when we had Lumber
in the game and not the new plant character also uh rip Lumber but it does work as intended this
gives me a visual indication so I can see what's the character in The Collision box when I press
the jump button and so it should activate all I'd need to do is update the Sprite but I mean maybe
this is just the ghost of lumber coming back to help us not that Lumber's dead the cool thing is
I'll have a bunch of these on screen I can easily clear them with a hotkey as well and if I merge
this with my slow motion I can get an even better idea of what's Happening sometimes thinking and
code makes my brain hurt but being able to see something helps me understand it a lot better
so for all the tools that I've shown you so far like the debug menu and the visual tools I feel
like some of these things work best when you have custom keybinds if I teleport to an area and the
and the player is just constantly moving it can be very difficult to control what's going on so like
I said I have this button to stop the horizontal movement but I link that up with a key bind that
goes for a bunch of different things in the game I have keybinds to start and stop the movement if
I fall down and want to retest that area I can simply press T and I go back to the start of
that area and that changes depending on the area that I'm at so let's go like 51 for example I go
there if I lose progress press T I'm back to that area that's all automatically set up I can change
the player's direction if I need to that's just to help me test certain areas obviously you won't be
able to do that in the game because the character is always moving I can even speed up and slow
down time I don't know when I'd need to speed up but it's kind of funny these are just very
useful little things that I can do to make the development process the level testing specifically
way way easier but that's not all because you can also have custom keybinds for the editor let
me show you a big problem that I had so when I'm designing levels I frequently switch between the
objects that I'm selecting and needing to place tiles on the tile map now in order to do that I
can click on the objects if I'm in the object mode but to find the tile map I have to go all the way
to this little hierarchy thing scroll all the way up maybe past my level targets where's my find
where my levels is there's my levels there's my time up and there you go I can now start placing
levels but now if I want to go back to moving the object I have to click on something else click the
object and then I can move the object and that just isn't very efficient at all if I'm doing
that constantly when designing one screen I'm gonna be wasting so much time just on clicking
objects on the tile map and it's a nightmare one cool thing that I found out about were tool
scripts so basically if you have a script which has the keyword tool at the top it will run not
just at runtime but in the engine so like right now when I'm just making the game so one very
simple thing that I made using this tool script was a custom keybind where I can press F9 to go
to my tile map and place tiles and F10 to select objects and move them around and f11 to select the
last known level Target so that I can easily duplicate that and create a new level Target
that I can teleport to at any time very very simple is set up toolscripts are super powerful
but how do you put that all together to make a tool well let me show you with this problem in
my game we have variable jump in right we have short jumps long jumps and how do I know where I
can place the next platform when doing the level design well when I first started making the game
I would literally just memorize the blocks up and along that I could go and I also had this
little jump ruler that I could use and memorize the values and just move around the map and see
how far the next platform could be but things have gotten way more complicated since then
because now we have way more mechanics we have these conveyors which speed up and slow down the
character and the result of that is when you're going fast your jump Arc is lengthened and when
you're going slow your jump Arc is reduced and springs which obviously eat you through the air
giving you a much higher jump Arc so basically when I'm designing these levels I have to place
a platform in an area where I think you may be able to jump to open up the game
teleport to the area and then test out the jump if I can make it and all of that takes way too
much time so because of all these variables what I'd really like to do is I'd like to be able to
click on any part of the map in the editor while I'm doing the level design and I want to see the
jump trajectory of the character so let's see if I can figure that out first thing I do when
making a tool is write down the functionality I want to achieve in a notebook or most likely in
paint so in this case when I click the screen I want to see the jumper aux of my character
to determine where to place a platform I would need all the trajectory lines for the various
jumps available like long jumps conveyor jumps and spring jumps so then I'll research some
possible solutions I discovered that the way to draw a line in Godot was with the draw function
this takes in an array of points and then draws them to the screen but how do I get the points I
first export the math side of this you know how to get the Arc of a jump parabolas trajectory
formulas equations of motions but because my chord is spaghetti and my brain is smooth I
think it's just going to hurt my head if I try and figure it out so I had another idea which is
a bit easier it's kind of hacky but it's going to be faster for me to implement and remember
good enough is good enough so essentially I'll write a little script that when the player is
in the air it will record the coordinates of the player's position on a time interval and
once you land it will print out these coordinates to the console and then I can take that array of
coordinates and plug it into the draw function to display the line so write the script jump in
game get the coordinates from the print out plug that into my draw function which is on
a tool script so it works in the editor and boom the jump trajectory line displays in the editor
started experimenting with how it should look since you can change the thickness of the line
and I realize that would be helpful to display two versions on top of each other this thick kind of
deformed pineapple ring would actually be super useful so I can show one Thin trajectory line one
thicker trajectory line which is the same width as the player's Collision box and the thick line will
mean I can see why the player might Collide and bounce back or be able to make the jump would also
be nice to have the player spray in the starting position that I can use for reference when placing
around the map before I change the style I got it moving on Mouse click and hold right
now it's offset from the mouse position because the coordinates were recorded locally in the game
so I'll have to translate the points to the zero position before I set them to the mouse position
I got the character sprite at the mouse position trying to add the reflected line
uh with some problems but I fixed that and styled it and made it snap to pixels so it's
easier to place now you can see how useful the thicker trajectory line is in determining jump
placement and it actually works a lot better than I expected I can place platforms and I know for a
fact the character can make the jump and I can analyze level design to see if anything needs
tweaking I did the same for the conveyor jumps and spring jumps and now I have this
I can place my character anywhere in the game and use a hotkey to switch between jump arcs
I can design levels without needing to test as much in game there we go let me know what
you think in the comments and make sure you join the Discord community so you can share
your games or art or whatever you make and stay up to date with how things are going in my next
devlog I should be very close to finishing the level design so make sure you subscribe so you
don't miss that and maybe check out another one of my devlogs while you wait thanks for watching