Jump to content

  • Log In with Google      Sign In   
  • Create Account


prototyping c/c++ codes in easier script language


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
6 replies to this topic

#1 fir   Members   -  Reputation: -456

Like
1Likes
Like

Posted 25 January 2014 - 07:25 PM

I never did that and I totaly do not know if this is reasonable

approach but sometimes someone seem to mention that:

 

when one write game in c/c++ can it be prototyped for some

reason in the script language (I do not know, mechanics of it?) ?

Is this usable to run something in script language and then 'port it'

to c/c++ ?

 

 



Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 15164

Like
3Likes
Like

Posted 25 January 2014 - 07:28 PM

Sure; this is actually a pretty common thing to do. Basically you write one version of the game in some language that's easy to be productive in, and then write another version in C++ that aims for optimal performance.

#3 Hodgman   Moderators   -  Reputation: 29729

Like
5Likes
Like

Posted 25 January 2014 - 07:31 PM

The last console games company that I worked for chooses to write heir games in Lua, because programmers are more productive in Lua than in C++ (it's easier to focus on the details of the problem rather than focussing on not shooing your foot off).
Then, only if it's required, they'll rewrite parts of it in C++ (eg. If it's too slow).

#4 fir   Members   -  Reputation: -456

Like
0Likes
Like

Posted 26 January 2014 - 12:25 PM

alright tnx for answers, i never saw that yet, maybe some day i will try if it helps



#5 rnlf   Members   -  Reputation: 1117

Like
1Likes
Like

Posted 27 January 2014 - 02:09 AM

It's also the "usual" way to write performance critical applications or libraries in Python. You first write them completely in Python, then you profile it and whichever part has the worst performance impact is rewritten in C and exported back to Python (basically without changing this part's interface).


my blog (German)


#6 bernardfrancois   Members   -  Reputation: 130

Like
1Likes
Like

Posted 27 January 2014 - 02:48 AM

Starting in a more productive language for prototyping, and switching to a different language later definitely has advantages.

Leading a company specialized in rapid prototyping for games, these are a few that come to my mind:

  • Better gameplay: You'll be able to actually play your concept in a shorter amount of time, and improve the gameplay based on those findings.
    In C++, this would take quite some extra time, so you may not have the funds to play around and improve the gameplay as much.
  • Cleaner code: It's okay to change the concept a few times and make your code messy in the scripting language. You'll get a better sense of what you'll need to implement in the final game, which allows you to come up with a better structure for your code.
  • Prevents reusing prototype code: By prototyping in a different language, it becomes more difficult to reuse your prototype code, which will reduce the temptation to reuse those dirty hacks which worked well within the limited scope of the prototype.
  • Cancel cheaply: You can try a concept or features, and have the luxury to decide not to proceed with them without a heavy cost, in comparison to when you would have developed everything in a slower-paced (but more efficient) language.

Very important to know when doing this is that you need to limit the scope for the prototype.

If you're going to implement the entire game in a prototype (i.e. including all content, menu system, monetization, etc), you're wasting a lot of time and losing the advantages of prototyping. Prototyping needs to be fast and focused on the lessons you need to learn to be able to develop a better game.

 

You can use prototyping to figure out the gameplay, but you can also do this to try out a complex algorithm you had in mind, without having to worry about memory management.

 

Here at PreviewLabs, we're prototyping in C# in Unity, whereas the final games may or may not be developed in a different language.


PreviewLabs - Rapid Game Prototyping


#7 frob   Moderators   -  Reputation: 20501

Like
0Likes
Like

Posted 27 January 2014 - 02:29 PM

In fact, we often would have additional prototypes.

The first prototypes are not written in a computer's programming language. They are design documents and ideas that more closely resemble a custom-built D&D game or card game than a video game. Often these get refined over several weeks. I've seen studios that have a constant flow of experimental game designs where everyone participates in some degree either as designer or player/guinea pig.

Only after the mechanics are reasonably well understood and feel fun is any source code written.

Usually the next major part is a very quick prototype in an existing engine, such as Unity or an in-house engine. Worlds are often called "white box" or "gray box" because that's all they consist of: a bunch of rough boxes. Sometimes I've seen a few basic creatures created with EA's Spore since it has creature builders with a collada exporter, it becomes a quick way to prototype characters. Such a prototype is nothing like a finished game, but it does provide a good idea if the game is viable and has the potential to be much fun.
Check out my personal indie blog at bryanwagstaff.com.




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