Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Writing a game engine in Rust


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 04 July 2012 - 09:53 PM

Rust programming language can be the next systems programming language and can be great for game programming.
My question is how much logistic and scripting support should I get if I write a game engine in rust....
My next question is, Should I wait for the 0.3 release or a beta release...
Can anyone probably guess if a systems programming language will be used in future to write game engines, and not managed application languages?

Sponsor:

#2 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 04 July 2012 - 09:54 PM

Can I embed asm, lua and any other high level language in a premature game engine writern in rust??

#3 Hodgman   Moderators   -  Reputation: 30893

Like
2Likes
Like

Posted 04 July 2012 - 11:01 PM

11 Interacting with foreign code
One of Rust's aims, as a system programming language, is to interoperate well with C code.

The Lua VM is a C API, so yes, you should be able to use it from Rust easily.

My question is how much logistic and scripting support should I get if I write a game engine in rust....

Can you re-phrase the question? I don't understand what you're asking.

Can anyone probably guess if a systems programming language will be used in future to write game engines, and not managed application languages?

That's been the trend so far, with C++ being the popular systems programming language. It will be a long time until managed languages replace C++ for this job.

Edited by Hodgman, 04 July 2012 - 11:06 PM.


#4 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 05 July 2012 - 12:18 AM

the question to be rephraced is self answered... thanks.( it meant canned libraries and tools)

I started using rust because everybody says that C++ is less used now, and its future is just like cobol.

Talking about C++
Why there is much talk (and scoldings to me for 'wasting my time with c++') about using a managed language at systems programming sphere??
Are you sure C++ has a bright future? (at least in game engines)???

#5 Tordin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 05 July 2012 - 01:10 AM

I started using rust because everybody says that C++ is less used now, and its future is just like cobol.


I dont think c++ is less used now than it was five years ago, and i dont think c++ will be going out soon either.
"There will be major features. none to be thought of yet"

#6 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 05 July 2012 - 01:20 AM

Then who are those people who misguide young people like me?
Why my freinds laugh at me when I use c++?

So according to you, we will not be switching languages, and keep on using newer standards of c++ only(in present case c++11)?????

#7 M6dEEp   Members   -  Reputation: 893

Like
0Likes
Like

Posted 05 July 2012 - 01:49 AM

Why my freinds laugh at me when I use c++?


Do they only use managed languages?? I told some of my buddies that I wanted to learn C++ and I got weird looks followed by the all too common question "Why".

#8 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 05 July 2012 - 02:21 AM


Why my freinds laugh at me when I use c++?


Do they only use managed languages?? I told some of my buddies that I wanted to learn C++ and I got weird looks followed by the all too common question "Why".


And thats the main reason that makes me ask about the status of c++ at present, and obviuosly at the future...

Can someone solidly state about the future of game programming and the future of c++ ?????
In future, are we going to see c++xx or c# or something else like rust??
Who is right? My freinds or my soul??

There are many questions(especially doubts about my skills..) to be answered.


#9 Hodgman   Moderators   -  Reputation: 30893

Like
3Likes
Like

Posted 05 July 2012 - 02:36 AM

To quote wikipedia:

A System programming language is usually used to mean "a language for system programming": that is, a language designed for writing system software as distinct from application software.


The very names of these categories should be a hint -- "systems programming" languages are well suited for low level "systems programming" tasks, where you're thinking about bits and bytes and structures made up of them.
"Managed" languages are not as suitable for these tasks, because they've already done a lot of the systems programming tasks for you (e.g. they've implemented a GC for you, often precluding your own implementation). Instead, these languages are often called "productivity languages" (because programmers are supposedly more productive when using them) and are designed to make "application programming" easier, where you're thinking about abstract objects and high-level "business logic", instead of bits and bytes.

Systems programming languages are great for writing game engines, but aren't the best for writing games. Higher level ("managed"/"application"/domain-specific) languages are generally able to implement high-level game logic with less code, and with less effort from the programmer, but make low-level operations harder or even impossible to write.

For example, Lua is often used for game programming, but it is of little use to engine programmers, because it's lacking in the fundamental data types required by a lot of low-level systems code (e.g. it can't manipulate bytes or raw integers).
C# (+ .NET) is a great "managed" language, and it lets programmers write code very quickly, but when used for systems programming tasks, it becomes complicated and extremely verbose (arguably more verbose than C++).

The standard practice in the games industry is (IMHO):
*Engine runtimes and performance-critical systems are written in C/C++.
*Game logic is written in a "productivity language", such as Lua or C#. Sometimes C++ is used here, but only when the game team are more comfortable/experienced with it than other languages.

Edited by Hodgman, 05 July 2012 - 02:50 AM.


#10 hannesnisula   Members   -  Reputation: 1034

Like
0Likes
Like

Posted 05 July 2012 - 02:39 AM

Can someone solidly state about the future of game programming and the future of c++ ?????
In future, are we going to see c++xx or c# or something else like rust??
Who is right? My freinds or my soul??


I guess it's not possible to solidly state any future but it doesn't seem like C++ is going away for a while.
If you learn C++ (or any other language really) it will be quite easy to learn any other language. Programming is a skill and the language is just a tool.
You don't risk "wasting" your time learning a specific language.

#11 SimonForsman   Crossbones+   -  Reputation: 6167

Like
0Likes
Like

Posted 05 July 2012 - 03:01 AM

And thats the main reason that makes me ask about the status of c++ at present, and obviuosly at the future...

Can someone solidly state about the future of game programming and the future of c++ ?????
In future, are we going to see c++xx or c# or something else like rust??
Who is right? My freinds or my soul??

There are many questions(especially doubts about my skills..) to be answered.


As for the current state, it is used less in general these days for application level work (With C# taking a very large chunk from it), game logic is being moved to higher level languages(Lua, Python, C#, and many others are common), as a systems programming language it is still standing strong though (And thus it is the most commonly used language in game engines).

As for the future it really is impossible to tell, C++ is severely flawed, (its getting better and better but its far from perfect), Most system programming languages however suffer from similar problems, Rather than replacing C++ as a language for game engines in the near future i'd expect us to get better tools and libraries, (The industry is heavily invested in C++ so a new systems programming language has to be significantly better to take over making it fairly unlikely to happen)
Things like compilers that actually tell you what you did wrong (clang is miles ahead here and i'm sure gcc and msvc will follow suit) and libraries such as boost(Allthough C++11 includes most of the good features from it) go a long way to make C++ far less of a pain in the ass and more will come.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#12 sankrant   Members   -  Reputation: 121

Like
0Likes
Like

Posted 05 July 2012 - 04:23 AM

Thank you all..

I am conviced that, we would not be switching anything, but willbe building better things upon the infrastructure..
We will continue to use C++ for engines, and use HL Languages for logic for a considerably long future ahead.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS