Git Product home page Git Product logo

gerbuls's Introduction

gerbuls

Which language to use for gameplay code? Existing engine is C++

Choices are: C++, Rust, lua

c++:

+1 I am already an expert with C++, and C++ is already used for engine

+2 much better editor language support than lua/rust(Visual Studio/VAX vs sublime with pluggins)

+2 debugger with editor integration vastly better than anything I've found for lua/rust

+1 built in profiler in VS with editor integration

+1 existing types created for engine can be reused

-1 header/src is irritating shit

rust

+3 more modern lang than lua/c++(Rust has: ADT's, traits, pattern matching)

+1 more enjoyable to write, since less legacy BS in lang(vs C++), and statically typed(vs lua)

+1 safe from some errors that C++ is not

+1 long term benefit of using rust: less mental tax, unsafety is explicit, thread safe without unsafe

+1 cargo build system is much nicer than the hodgepodge of shit C++ offers

-1 using rust will force 2 build systems instead of 1, negating much of the benefit of cargo

-1 terrible C API required to communicate with C++ engine. Duplicating some types in rust will likely be necessary:(

lua

+1 already integrated into project

+1 easy to write

+1 easiest for users to script

+2 fastest compilation

-1 dynamically typed, code can be wrong, but it isn't immediatly obvious. I find dynamically typed code more confusing than statically typed code, when I revisit it after some time has passed.

-0.5 worst performance of the lot, although this shouldn't matter too much for if only used for gameplay

-0.5 GC memory management is severly out of sync with C++'s approach, causing needless complication

-0.5 callbacks into lua are complicated by lua VM's being single threaded

C++: 6

Rust: 5

lua:2.5

It seems I should use C++ based on these results:(

When/If Rust ever gets better editor support, it should become preferred over C++

gerbuls's People

Contributors

trianglespct avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.