• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
    437
  • comments
    1000
  • views
    334984

Runtime Compiled C++

Sign in to follow this  
Followers 0
evolutional

4684 views

I came across the Runtime-Compiled C++ project the other day and I'm intrigued. I've always been fascinated by scripting, virtual machines, reflection and other dynamic runtime stuff that adds flexibility into development. The Unreal 4 engine also has this with the "Hot Reload" feature, so I can see it really becoming more popular.

I'm interested in what effect this new sort of dynamically compiled C++ will have on scripting in particular.

One of the use cases for scripting has always been because you can change the script and modify behaviours quickly without having to stop and recompile your own game. Runtime-compiled C++ will blow that out of the water, especially when you see that it also has crash protection built in (eg: a crash won't kill your game).

Naturally, scripting will still have a valid place in development - script languages are often simpler for non-developers to use and often present functionality at a higher level than how you'd code C++ or any other low level language. But it does make me wonder whether this runtime compiled stuff will move some people away from scripts.

I'm going to grab the runtime-compiled code and have a play around with it.

4
Sign in to follow this  
Followers 0


12 Comments


Interesting project but for me it doesn't really address the key features of scripting:

[list]
[*]Users don't require any tools other than a text editor installed to change moddable scripts
[*]Script language can be chosen that best suits the domain that is being scripted
[/list]

Compilation model is one of the least significant things for me that makes C++ a poor choice to use for expressing the high level concepts that a scripting system would address.
0

Share this comment


Link to comment
I agree entirely. I think the prime reason for this sort of tech has to be for those scenarios where performance is paramount. And even then, the JIT systems implemented in script libraries nowadays will challenge that assertion.

Still, it's an interesting project.
0

Share this comment


Link to comment
Interesting. I could imagine using it on large projects alike Flightgear for ex. Now you could have a meal while waiting for fgfs to recompile or searching through the code. Hence it would speed up work nicely. Should I try that on fgfs with Eclipse or will such not work?
0

Share this comment


Link to comment
We only support windows at the moment, with Visual Studio as the IDE. However only a few changes are needed to add a new compiler, probably less work than is needed to make changes to the codebase to support this style of approach (changes are required to make the code hot swappable).
0

Share this comment


Link to comment
Wow, I'd like to try this sometime.... my codebase is around 400k lines of code, and the recompile/link times can be painful when making small adjustments to the code.
0

Share this comment


Link to comment
I guess what interests me most now is what sort of changes you'd have to make to make your code hot swappable?
0

Share this comment


Link to comment
C++ has been used in a few engines for scripting, probably the best implementation (until Runtime Compiled C++ and UE4 demos) was in the C4 engine where scripts are written and compiled in C++ and designers use the script node graph tool. Honestly I think there will be a much larger push towards this in the future simply because of how much time gets burned near the tail end of a project due to bad code/scripts by designers (no offence designers we love you!) that your programmers now have to go in and fix / optimize. In my opinion it is so much more efficient to have dedicated gameplay script programmers working in C++ and designers using the node based / property grid system. If you have them working together as a team you will end up with optimal code, features, and usability.
0

Share this comment


Link to comment
@evolutional - take a look at the source code for one of the runtime objects or headers. Basically in the current prototype you derive from a base class, declare the class in a C++ file with a macro, and optionally declare headers as being runtime editable. There's a video of the later just gone up on the site.

@Saruman - this isn't C++ scripting, but runtime compiling and loading of C++. That I know of this is the first public example of this approach, though some developers have hot loaded dll's for similar functionality. The C4 example is actually not altering C++, but using a data driven GUI node graph which is interpretted to provide scripting functionality, akin to CryENGINE's Flowgraph or Unreal's Kismet. I agree with you on giving designers better tools than scripting to create gameplay, with visual tools being a great way to do that.
0

Share this comment


Link to comment
[quote name='evolutional' timestamp='1339950528']
And even then, the JIT systems implemented in script libraries nowadays will challenge that assertion.
[/quote]

An important consideration for console developers is that data can't be executed due to content protection measures, so JIT systems can't be used. I know of several developers bitten by script performance on consoles, indeed Havok Script was developed in part to address this issue by creating a higher performance script interpreter for consoles.
0

Share this comment


Link to comment
@dougbinks Yes wrong terminology by me I just meant replacing scripting gameplay code with compiled C++ and I'm dead sure that you do in fact have the first public example as the topic interests me quite a lot :) I just meant that C4 took the approach of writing code in C++ that has traditionally been scripted and letting designers leverage visual tools. When you take this approach and merge it with Runtime Compiled C++ in my opinion it turns into the best possible solution.
1

Share this comment


Link to comment
Yes - that does sound like a great approach, since you can write new code for visual objects on the fly, then play with them. I was wondering about using this with Google's [url="http://code.google.com/p/blockly/?redir=1"]Blocky[/url]...
0

Share this comment


Link to comment

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