Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
MaxLimitz

Programming language

Recommended Posts

I was making a list of programming languages games use. Without opening any of the .lmp files and finding out which software opens that kind of files, according to GitHub, Freedoom is made with Python according to the automatic language categorization, but on the other hand, Doom from 1993 is made with C, so maybe Freedoom is also made with C? On the other hand, you need a game engine, so it depends on the game engine, which programming language Freedoom uses?

 

Share this post


Link to post

Most Doom engines are C, but some have either been shifted into C++ or, occasionally, translated into other languages entirely.

 

The Freedoom project specifically is probably marked as Python because of its build scripts, not what the game itself runs on, since a specific "Freedoom engine" isn't included.

Share this post


Link to post

Freedoom is not really a complete game in itself, it's just the game data. Not the engine. You need to run Freedoom with a Doom exe or source port.

 

This game data is a set of files (e.g. graphics, sounds, music tracks, and miscellaneous other things, plus the maps obviously) and all that stuff needs to be converted to a format that can be used by Doom, which has its own custom formats for archive, image, sound, music... That's where the Python language enters the picture: Freedoom largely relies on Python scripts to handle automatically all the tedious parts of building a usable IWAD. But outside of this, Python is not used in Freedoom itself -- there's no Python code running when you play the game. (Unless you're using a Doom port that itself uses Python, I guess. But the only example I know of was left unfinished due to the untimely death of its author.)

Share this post


Link to post

Generally speaking there are two parts to any game: the artwork (graphics etc. but also things like sound effects and music) and the "engine" (program code that makes it into a game you can actually play). Each is useless without the other. Doom's engine is written in C although some source ports have switched to C++ nowadays.

 

Freedoom is just artwork. So in that sense there isn't any "code" - it's the job of the source port to turn that artwork into something you can really play. However, there's a lot of stuff in Freedoom, and building the Freedoom IWAD files that we distribute is a whole complicated task in itself. Because of that we have code that's run as part of the build process. As a simple example: when you open the main menu you see different graphics saying "New Game", "Load Game", etc. There's a program in Freedoom's build process that generates those graphics automatically from individual letters. There are a number of similar programs that build different parts of Freedoom, some of which are quite technically obscure. We standardized on Python some time back as it makes for a very good fit for this kind of task. But by the time Freedoom's on your computer being played, all that code has already been run far away on someone else's computer. As a player it's not code that's ever being run on your computer.

Share this post


Link to post

Most modern game engines use C++. Older game engines (games pre-2000) used C because C++ compilers were not as good at optimizing the code back then as they are now. Optimized code is important, it allows developers to create more complex games with lower system requirements. 

 

C++ is currently used because it's fast and there's been a lot of programming patterns that were created to take advantage of the programming language. Most of these are implementable in C#, so C# is also a popular language for programming games (see Unity engine). There is not incentive to change this because of all the knowledge that was created around these languages. 

 

Game development is not limited to C, C++ and C# tough. Any languages can be used. Java, for example, is a very popular programming language and it's been used to program the game Minecraft. The problem with Java is that it's not a fast programming language, thus Minecraft suffers from performance issues where other more advance and complex games such as Call of Duty: Modern Warfare 3 can run at 60 FPS. Compiled C++ code executes directly on the CPU, whereas Java code must be run inside a virtual machine. 

 

Game engines will often use a scripting language so level designers and artists can program AI behavior and cutscenes. This is because C++ is a complex language and most level designers and artists don't know anything about it. In some cases, these scripting languages may be LUA or Python, although most game engines have their own scripting language with their own simplified syntax. Some also use GUI tools to abstract all of this (Unreal uses Blueprint Visual Scripting so no programming knowledge is required).

 

Amateur/aspiring game developers are inclined to use a programming language that they are already confortable with. For example, a group of people have been using Mochadoom to develop their own zombie survival game rather than learning how other more powerful Doom engines work. I'm thinking of ZDoom and ACS. I can only suspect that they made this decision because they were already familiar with Java. 

Share this post


Link to post
On dimanche 30 janvier 2022 at 7:23 AM, axdoomer said:

For example, a group of people have been using Mochadoom to develop their own zombie survival game rather than learning how other more powerful Doom engines work.

Any more information about this game? It is relevant to my interests.

 

Share this post


Link to post
20 hours ago, Gez said:

Any more information about this game? It is relevant to my interests.

 


I was going to link it in my post, but sadly I wasn't able to find it. All I remember is that they implemented day and night cycles in the engine. (this is more than 2 years ago)

Share this post


Link to post

sorry for the necro bump but if you are interested on learning about what languages are used in games you might like to know about GDscript with is an programing language made by game devs, for game devs

 

https://en.wikipedia.org/wiki/Godot_(game_engine)

 

its is part of the godot game engine and while godot isnt used exclusively for making games it is still dedicated for it

 

cruelty squad is a good exemple of a game made in godot

Share this post


Link to post
26 minutes ago, omalefico32x said:

sorry for the necro bump but if you are interested on learning about what languages are used in games you might like to know about GDscript with is an programing language made by game devs, for game devs

 

https://en.wikipedia.org/wiki/Godot_(game_engine)

 

its is part of the godot game engine and while godot isnt used exclusively for making games it is still dedicated for it

 

cruelty squad is a good exemple of a game made in godot

Im studying how to use godot, but since a really short time so i couldnt make anything interesting

 

Ok, so to fit this post to the threads theme:

Unity games use C# for coding

Unreal games are coded in C++, and blueprints that is a visual programming language

Gamemaker games uses a propietary language named game maker language or GML

The already mentioned Godot uses GDScript but also can use C# and C++ and is working on a visual scripting language too.

There are the löve2d games that uses lua, that language is used also on roblox

For python, there is the pygame module, i dont know what games were made with it thought

And for shaders (not an engine, but graphics processing on the GPU), there are glsl, hlsl, etc

HTML5 web games uses javascript/web assembly

Flash Games were programmed with actionscript

The first videogames ever were programmed on assembler

The already mentioned java, its used by minecraft and mobile games

 

Edited by URROVA

Share this post


Link to post
9 minutes ago, URROVA said:

Im studying how to use godot, but since a really short time so i couldnt make anything interesting

ive been making a game using godot for 4 months now but ive been learning about the engine ever since the year started

 

gdscript is such a joy to write

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×