Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411582 Posts in 69386 Topics- by 58445 Members - Latest Member: Mansreign

May 06, 2024, 12:16:25 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Is using c++ maps to store data sane?
Pages: 1 [2]
Print
Author Topic: Is using c++ maps to store data sane?  (Read 3607 times)
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #20 on: July 12, 2009, 08:51:55 AM »

With the exception of Lisp, interpreted languages came much later.

Interpreted languages have been around almost as long as compiled languages.  They aren't a recent phenomenon, nor did they come "much later."  Their performance simply hasn't been truly viable until hardware advanced to the point where it could negate most of the overhead of interpretation.

To be truly pedantic, there is no such thing as an interpreted language anyway.  It's a question of implementation.  There are C and C++ interpreters in existence, for example.  Likewise there are Java compilers that output native code.
Logged



What would John Carmack do?
Impossible
Level 3
***



View Profile
« Reply #21 on: July 12, 2009, 11:09:56 AM »

It really seems like you should integrate lua and write all of your game code in lua. Lua tables work similar to your global unordered maps, and you get the ability to execute arbitrary code from a string.
Logged
Massena
Level 4
****


Satisfied.


View Profile
« Reply #22 on: July 12, 2009, 12:13:09 PM »

So how would I go about using Lua for my game code? Which part of the program should be C++? Just the loading, initializing and blitting?

edit: I replaced my maps with tr1's unordered_maps and everything was A-OK

edit2: Ah forget it. The moment I started making anything game-like and went out of my theoretical bubble I realized "I'm gonna need arrays, and vectors" and that I'd end up with more maps than I can point a pointer at. (pun totally great hahahalol)
Still interested in using Lua or maybe python, though, will look into that.
« Last Edit: July 12, 2009, 04:30:49 PM by Massena » Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic