Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Which programming language did you choose and why?

J1M

Arcane
Joined
May 14, 2008
Messages
14,631
Are those products actually built with python though? The other arguments I am hearing sound like someone's NPC programming is 5 years out of date. The JavaScript programmer union now agrees that compilers and typing are good after being forced to use TypeScript.

The reason I ask is because I have heard YouTube had its Python rewritten in Go. Maybe someone who cares more can verify how common this is.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,476
Location
down under
Codex+ Now Streaming!
I could see how anyone could hate strong typing after being forced to use Typescript
Huh? TypeScript is a strongly typed language—it's even in the name! TypeScript is actually quite sane if you use it properly. It has a few nifty things (e.g. structural typing and union types) that other type systems could learn a thing or two from.

Having said that, I saw TypeScript projects written by JavaScript guys who didn't quite grasp it and made a horrible mess...
 

Arbiter

Scholar
Joined
Apr 22, 2020
Messages
2,523
Location
Poland
I know people whine about C++ and go "but muh vtable", but they are engaging in the same CPU-cycle counting that I hate.

Typical web apps are I/O bound so the common perception is that CPU performance is not that important. In some cases, however, cycle counting does make sense:
- non trivial mobile apps - the faster your app runs, the longer the battery lasts
- huge websites like Google, Facebook with thousands of servers - if you make your code 1% faster, it translates to millions of savings
- app instances started on demand, e.g. dynamic scaling, functions - you want new instances to start as quickly as possible to limit delay in processing. This might make the overhead of interpreted code or JIT undesirable.

If they really hate vtables that much they can just not use inheritance since IIRC C++ doesn't generate vtables at all if you don't have any virtual functions.

If you abandon polymorphism, there is little difference between C++ OO code and C structural programming, unless you are using templates heavily.
 

ds

Cipher
Patron
Joined
Jul 17, 2013
Messages
1,379
Location
here
If you abandon polymorphism, there is little difference between C++ OO code and C structural programming, unless you are using templates heavily.
You don't need to use templates heavily yourself to benefit from them. Having standard containers and algorithms that you can put your custom types into without a bunch of unsafe casting is huge. But even without templates, destructors alone make C++ infinitely more ergonomic than C.

Also, virtual inheritance is only one form of polymorphism in C++, there are also function overloads which don't have any runtime overhead. And yes, templates too.
 

Arbiter

Scholar
Joined
Apr 22, 2020
Messages
2,523
Location
Poland
I lack experience with large-scale projects written in dynamic languages, but I'd be interested in giving them a go with an open mind and experiencing their particular tradeoffs in a real-world scenario

In my opinion dynamic typing only works well with small 1-man projects.

As soon as you write code that is meant to be used by other programmers, you have to document parameters and return values, you cannot expect users of your routines/library/framework to guess what parameters need to be passed to make the code work. Take a look at the documentation of a sample NodeJS procedure: https://nodejs.org/api/fs.html#filehandlereadbuffer-options. All params and return value are thoroughly documented, including their types. Once you start writing detailed documentation like that, there is really no difference between your code comments and specifying types in method signatures, as required by statically typed languages. And the latter have the advantage of basic checks being performed by the compiler.
 

OndrejSc

Full Auto
Patron
Joined
Apr 1, 2014
Messages
8,402
Location
Central Europe
PC RPG Website of the Year, 2015
u6o04HM.jpg
 
Last edited:

Arbiter

Scholar
Joined
Apr 22, 2020
Messages
2,523
Location
Poland
Worst case, you can write a simple shell script to handle most build cases.

My problem isn't that these systems are useless, it's that they do a relatively simple job in the most complicated, bloated, and difficult to use way possible

At the very least every decent build system provides the following:
- incremental builds - only run tasks if their inputs or outputs have changed since the last run
- parallel execution of tasks in a proper order (i.e. a task can only start once its dependencies have been successfully executed, every task is only executed once)
- for statically typed languages, a build definition is a source of truth when it comes to thirdparty dependencies (e.g. libraries) the code needs to compile, making it trivial to import your project into an IDE
- most build systems come with an integrated package manager that can download libraries from remote repositories

More advanced systems also provide:
- caching of build results, including shared caches used by many developers and/or build agents
- distributed builds
- sandboxing - making sure that tasks do not depend on undeclared inputs, which would break caching and distributed builds

Also, unrelated, the problem with Python isn't it's speed.
Aren't you concerned with the carbon footprint of your code?

:troll:
 
Joined
Jan 5, 2021
Messages
415
Worst case, you can write a simple shell script to handle most build cases.

My problem isn't that these systems are useless, it's that they do a relatively simple job in the most complicated, bloated, and difficult to use way possible

At the very least every decent build system provides the following:
- incremental builds - only run tasks if their inputs or outputs have changed since the last run
- parallel execution of tasks in a proper order (i.e. a task can only start once its dependencies have been successfully executed, every task is only executed once)
- for statically typed languages, a build definition is a source of truth when it comes to thirdparty dependencies (e.g. libraries) the code needs to compile, making it trivial to import your project into an IDE
- most build systems come with an integrated package manager that can download libraries from remote repositories

Make does all of these except the last one, and isn't a total chore to use unlike the rest.

The fact that make can get you 90% of the way and is simple and just works vs cmake needing endless configuring and barely working for the same overall outcome shows how bad most build systems are.

I'm not against build systems in general, but there's no good reason to ever use cmake, Gradle, or many of the large-scale build tools in most projects, and they frequently get in the way to the point where I simply don't contribute to projects that use cmake because I don't want to spend the hours getting it working properly for every project.

If your build system causes more problems than it solves, it's not worth it. Unfortunately I've found that's exactly what most build systems do.
 
Joined
Dec 24, 2018
Messages
1,788
If you abandon polymorphism, there is little difference between C++ OO code and C structural programming, unless you are using templates heavily.
Only reason this isn't the most retarded thing I've read for the past month is that I opened a Licorice thread the other day.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,334
I find it kind of funny that we still don't have a better language than C/C++, for stuff like game development and generic software programming. I think C# is close, but I don't know. I don't like C#'s memory/resource management, it's confusing. Then again, maybe it just feels like that, because I have less experience programming in C#.
 

Arbiter

Scholar
Joined
Apr 22, 2020
Messages
2,523
Location
Poland
I find it kind of funny that we still don't have a better language than C/C++, for stuff like game development and generic software programming. I think C# is close, but I don't know. I don't like C#'s memory/resource management, it's confusing. Then again, maybe it just feels like that, because I have less experience programming in C#.

Rust is a viable replacement for C/C++ is many domains, but it is not popular in gamedev (yet).
 

OndrejSc

Full Auto
Patron
Joined
Apr 1, 2014
Messages
8,402
Location
Central Europe
PC RPG Website of the Year, 2015
https://en.m.wikipedia.org/wiki/Shakespeare_Programming_Language

The standard "Hello, World!" program:

Do Not Adieu, a play in two acts.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.

Act I: Hamlet's insults and flattery.

Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!

You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!

You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.

Speak your mind!

[Exit Romeo]

Scene II: The praising of Juliet.

[Enter Juliet]

Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!

[Exit Juliet]

Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:

Thou art as beautiful as the difference between Romeo and the square
of a huge green peaceful tree. Speak thy mind!

Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!

Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!

[Exeunt Ophelia and Hamlet]

Act II: Behind Hamlet's back.

Scene I: Romeo and Juliet's conversation.

[Enter Romeo and Juliet]

Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!

Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!

[Exit Romeo]

Scene II: Juliet and Ophelia's conversation.

[Enter Ophelia]

Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!

Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!

[Exeunt]
 

beardalaxy

Novice
Joined
Jun 10, 2023
Messages
95
Ever since I was little, I wanted to make video games. Growing up with them and being really interested in them, it was natural. When I was 10 we finally had a computer and internet so I started researching how I could make games. Ended up with a bootleg version of RPG Maker XP and the rest is history. I've been using RPG Maker ever since. I've tried other stuff such as Game Maker, Unity, Unreal, FPS Creator, and a few other smaller ones. Nothing just ever meshed as well as RPG Maker does. The UI of RM is just second to none. It's extremely intuitive.

RPG Maker XP through VX Ace all used RGSS; Ruby Game Scripting System. I worked with XP for so long that I actually did start learning the coding side of it, and ended up making a menu system for 1 character instead of an entire party completely from scratch, which I ended up using in a game jam game that was admittedly subpar (learned a lot from that though). MV and MZ both use Javascript, and while I haven't learned it to the extent of how much I learned of RGSS, I find it really easy to work with and edit things I need to.

I'm not too great at writing code from scratch, but I am pretty good at being able to interpret code and modify it as I get familiar with it, no matter what language it's in. I'm sure something like Assembly would be a lot harder but I've done stuff with Javascript, Rust, Python, and C#. Nothing too crazy, just changing some things here and there to suit my needs more, or just stretching my brain and trying to experiment. A lot of the basics transfer over to other things so editing code is pretty easy once you get a general idea of what coding is. It's a little bit like being pretty knowledgeable of the English language, so when you see words with similar roots in other languages that derive from the same places English words do, you can understand the meaning of them still.

I will say that once I'm done with my current game, my next game will likely be in RPG Maker as well, but during the development of that I plan to look into some other engines that have been maturing a lot more in recent times, such as Godot and Construct. Just want to see how well I work with them. A bit of a problem I have is that, since I've used RPG Maker for so long (17 years!!) I'm very knowledgeable on how to use the engine and with all the ideas for games I have, it's a lot easier to just keep making them in RM instead of learning a new engine and having that learning time cut into development time. I'm interested in other stuff though, even if just to fiddle around with new things.
 

Adeptus

Arcane
Developer
Joined
May 2, 2022
Messages
93
I am not a coder, but rather a (novice) writer who wants to create interactive stories with game elements, so I choose Twine. And I recommend it for other people like me.
 

StippleAlpha

Literate
Joined
Jul 19, 2023
Messages
13
C++ because:
  • Great compiler optimizations. Most compilers will see through to what you're trying to do and turn it into efficient machine code.
  • Expansive and versatile standard library (also well-optimized in most implementations).
  • Can compile even for low-level embedded targets.
  • Well-written code will turn would-be runtime errors into compile-time errors.
  • None of that garbage collection-crap. I manage my code by scope, which all modern C++ should do.
  • Flex on lesser nerds
C lacks some of these advantages, but it's still the best low-level languages. Every programmer should know C. Don't "at" me. Just because you use a miter saw and router doesn't mean you shouldn't be familiar with a backsaw and chisels.
 

Monk

Arcane
Joined
Feb 8, 2010
Messages
6,977
Location
Wat
I was able to take only Pascal as part of a business degree, but was told that it's a good foundation for learning other languages. I think that helped me learn C, and using the same Kernighan and Ritchie book, as well as writing simple code for xBase management and spreadsheets.
 
Joined
Dec 17, 2013
Messages
5,183
Any procedural/OOP language is a good foundation, the basics are all the same, but programming in Pascal is like driving a 1920s roadster, compared to a 1950s landwhale (Java, C#), compared to a 2020 Bugatti Veyron (Python, Ruby). Do you want to spend 2 weeks coding a little thing, or 20 minutes?
 

TheCumGuzzler

Novice
Joined
Jun 2, 2023
Messages
72
I find it kind of funny that we still don't have a better language than C/C++, for stuff like game development and generic software programming. I think C# is close, but I don't know. I don't like C#'s memory/resource management, it's confusing. Then again, maybe it just feels like that, because I have less experience programming in C#.

Rust is a viable replacement for C/C++ is many domains, but it is not popular in gamedev (yet).
Bracket-lib for traditional roguelikes is decent, I just hate the Rust community because of the faggotry.
 
Joined
Sep 26, 2022
Messages
91
I've been coding in Java for a while and really love IntelliJ. What's the equivalent IDE for C++? I'll be jumping to learning C++ soon.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom