
Create a First-Person Shooter In Godot - studentLS
https://godottutorials.pro/fps-godot-tutorial/
======
nurettin
We play with this at home before my 5 year old goes to bed. I create little 2d
scenes that we draw together on tuxpaint such as him going to school or riding
a space rocket. It's good family fun. We used to do this with pygame, but I
had to hand-craft a lot of the animation and scene building, and the code
screen was a bit boring to look at for 15 minutes while I figure things out.

~~~
ghostbrainalpha
That's pretty awesome, I really feel like I need to up my Dad game.

Do you mind sharing a game or screenshot so I can see what's possible?

My four year old is really struggling with the alphabet, I'd like to make a
Shooter for him called "Destroy Z", where he would have to identify letters
and then go kill them.

~~~
kick
Godot's download size is pretty small, and there's a small demo included,
along with a few other demos that are similarly pretty small files that you
can download directly from the client, mostly MIT-licensed, including a first-
person shooter demo, I think.

Grab some freely-licensed assets (there are a bunch of them, they're pretty
easy to find with the obvious search queries, mostly CC-licensed), then the
code for what you want should be pretty easy to hack up in a couple hours.
GDScript, while not very elegant, is simple enough to where you should be able
to learn it pretty quickly (it's aimed at non-technical people), and if you
don't want to use it, you can use other languages, too.

Some of the ways it does things is a bit confusing, but if you keep docs and a
search engine close-by, you'll figure it out; good luck, it's always nice to
see parents who care so much!

------
matsemann
As someone used to living in my editor, I have a hard time grasping the
workflow that combines configuring lots of stuff via UI, and then having code
in some files in addition. When making "real" games (something bigger than a
demo/prototype) in Godot , Unity etc., is the UI used much? Seems
constraining, or how does it play together with lots of code?

Asking because I'm interested in learning, but when experimenting myself I end
up with the worst from both somehow.

~~~
jokoon
I never managed to like unity or godot because they remove freedom from the
developer. Your code becomes a second class citizen.

Apparently level design people and artists like it, which makes sense, of
course, since indie gamedevs and small teams who are full of ideas and
content, want to work as quickly as possible.

But as a developer, I just loathe those tools. They sort of make sense for
non-developers who want to make a prototype game and "tweak" things by writing
as little code as possible while getting bleeding edge graphics. In reality it
just enables unambitious projects so that "anybody can make games". It's like
comparing LEGO to mechanical engineering. Of course, if you're pedantic, a
LEGO car fits the definition of a car. You can sell a lego car, and then you
realize how twisted the indie video game market is right now.

But if you want to make a game, those WYSIWYG things are horrible. They're
viable, but if you have some issue or limitation with the tool, you're really
stuck. If there's a performance problem, it becomes more difficult. If you
want to release on console, there are additional steps and work to do. You
cannot "use what you want", because it's a huge generic blob of things that
you cannot really understand how it's made.

I watched a video about the internals of godot and was not convinced at all.
Of course it's open source but it's a giant mess. Unity is not even open
source.

I will always show this video each time those WYSIWYG tools are talked about:
[https://www.youtube.com/watch?v=tInaI3pU19Y](https://www.youtube.com/watch?v=tInaI3pU19Y)

It's the 40 years old debate "should I use this feature rich framework to make
the website of my grandma?". The answer is "you either care about your ability
to write code, or you don't.". Simple as that.

Another result is a large bubble in the video game market. There are just too
many games. In a way, it helps people gaining experience, but even many of the
great games are often very short lived. I think it will give a bad reputation
to platforms like Steam etc.

~~~
quacker
Honest question: What does the dev process actually look like for AAA games?

\- Do they create levels/scenes without a visual tool to set the positions of
everything?

\- Or, if AAA studios tend to use some kind of visual tool, is it not a
WYSIWYG tool? How does it differ?

I'm not a game developer, but I've tried gamedev as a regular developer,
trying to do everything in code. Laying out the positions of objects in code,
rather than visually, is a huge time sink. So I'm really curious how this
could be done quickly at a large scale without some kind of visual tool.

~~~
xsmasher
Professional game teams use visual tools. Visual tools allow non-programmers
to do work / prep files / iterate on ideas / create animations without an
engineer being involved.

An individual indie dev doesn't care about that, so having hardcoded data may
be a faster workflow.

In the studios I've worked UI artists work on the UI files and then pass them
off to engineers to connect to the code. Tuning data comes from spreadsheets,
and art/animation comes from artists, and they generally have a one-button
import process that doesn't involve an engineer.

------
nihil75
Thanks! Good to see a proper textual tutorial. Videos are sometimes hard to
follow (pause-play-rewind..)

------
darkwater
If you don't know, just like me, what Godot is, it is a 2D/3D opensource game
engine. [1]

[1] [https://godotengine.org/](https://godotengine.org/)

~~~
jmiskovic
It is open source alternative to Unity3D and UnrealEngine that bundles 3D
engine, scene editor, code editor and debugger. The editor is much more
lightweight and faster than competition so you can use it even on older
laptops. Supported languages are GDScript (python-like), C# and visual
programming with routing nodes. There is also support for native code
execution which allows community to hook up their own favorite language.

The engine targets all major platforms including mobile and VR. Consoles are
not supported due to necessary NDAs, but there are still some Godot games
deployed.

Some things lack polish (API documentation mostly), but the development and
community around it is very active and positive. Works best with Blender as
modeler. Currently the Vulkan support is in works and planned for next major
version.

As for engine quality, you can judge from last year's showcase:
[https://www.youtube.com/watch?v=NlKEO1N8wMM](https://www.youtube.com/watch?v=NlKEO1N8wMM)

------
martijn_himself
Does anyone know the state of C# support and documentation? I played around
with Godot in the early days of C# support, and I found I had to translate
from its documented API calls in GDScript which was quite cumbersome.

~~~
novaleaf
i spent aprox 160hrs learning the newest version of godot (3.2) using c#.

It's pretty well featured for hobby projects and experimenting. You can
translate any GDScript example into C# on nearly a 1:1 basis. So honestly "C#
docs" are not needed.

The big turn off for me, which I only came to the realization after my 160hrs,
is that there is no easy way to performance analyze/tune your code. You have
to manually instrument with Timers and even that is of limited utility when
you have unknown 15ms+ spikes every couple seconds (and that's not even GC
related).

My desire getting into Godot was to build a job/ecs system similar to unity
(because I did this 10yrs before with my own xna based engine) but sadly,
until there is better perf tools this is a futile task.

~~~
martijn_himself
Wow, thanks for the insight! I've really only ever used Godot to play around
with so I haven't hit any performance issues.

Would your XNA based engine work with MonoGame and/or FNA?

~~~
novaleaf
yes, it's a C# system, though it's written for the .net framework 2.1, and
assumes a desktop so care isn't taken to reduce GC pressure very much. The
unity job system is based on structs and unmanaged memory to avoid GC
pressure, which in hindsight is a good idea for targeting broader platforms
(phones, embedded)

------
thedaemon
Thank you so much for creating a web page tutorial, instead of a Video
tutorial.

------
arminiusreturns
I can't upvote this enough seeing as doing an FPS is my main godot project.
I've been collected fps projects in godot and comparing different methods and
really like the simplicity of this one. Cool stuff.

------
mastrsushi

      var x : float = 5.0
    

What a stupid fucking language. Everything else is great.

~~~
shmerl
It has other options, like GDNative:
[https://godotengine.org/article/dlscript-
here](https://godotengine.org/article/dlscript-here)

See for example: [https://github.com/GodotNativeTools/godot-
rust](https://github.com/GodotNativeTools/godot-rust)

~~~
mastrsushi
It just sounds like another glue language. The reason UnrealScript halted
development was because they found that its whole purpose is to call C++ code.
So they put their focus into making Unreal a more reusable framework instead
of confusing developers with some zainy little toy programming language
project that serve as an interface.

~~~
shmerl
This allows using any language really, as long as you can produce a shared
library that matches the ABI/API. Which should be good enough for those who
have some issue with a particular scripting language.

------
pojntfx
Godot is an awesome engine and I recommend everyone still using the ancient
ones like Unreal and Unity to switch to it, at least on new projects. You can
script it in pretty much whatever language you want.

~~~
darkwinx
How are Unreal and Unity ancient?

~~~
shmerl
They might be not ancient, but they still didn't manage to produce a good
quality parallelized Vulkan renderer. Unreal made something (and marked the
whole effort "archived"¹), but it's not really parallelized and performance is
bad. I bet Godot will beat them to it, because they are focusing on Vulkan as
their primary API.

1\. [https://trello.com/c/lzLwtb5P/124-vulkan-for-pc-and-
linux](https://trello.com/c/lzLwtb5P/124-vulkan-for-pc-and-linux)

