LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2011, 01:36 PM   #16
anon02
Member
 
Registered: Aug 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by lnarea View Post
whatever you end up with, make it subscription based, not one-time purchase based. Learn from the masters and those who are now multi-multi millionaires like the guys who created WOW.
Such a pity that I believe in libre (My definition on my last reply) software. And most game players nowadays are not really interested in text based games.
 
Old 09-20-2011, 02:18 PM   #17
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ThatPerson View Post
So getting it messed up should not be too much on an issue.
Well, it is your time, so do what you like.

Quote:
Originally Posted by ThatPerson View Post
I did look at that, But I cannot see a way of using a variable as a variable name,
You'll need macro black magic for that. There's a "stringize" operator. You can make macros like ("MAKE_GLOBAL_VAR(variableName, variableType)") that will decalre a variable, store its name somewhere, register that name within global std::map<string, someclass> or std::map<string, type*>, etc. Such things are easier to do in C++, not in C, since in C++ you can create a class instance anywhere, and that instance can perform some operation when being constructed/destroyed. Global class variables will perform operations within their constructor during program startup/shutdown, which is quite useful.
 
Old 09-20-2011, 02:25 PM   #18
anon02
Member
 
Registered: Aug 2011
Posts: 223

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SigTerm View Post
Well, it is your time, so do what you like.


You'll need macro black magic for that. There's a "stringize" operator. You can make macros like ("MAKE_GLOBAL_VAR(variableName, variableType)") that will decalre a variable, store its name somewhere, register that name within global std::map<string, someclass> or std::map<string, type*>, etc. Such things are easier to do in C++, not in C, since in C++ you can create a class instance anywhere, and that instance can perform some operation when being constructed/destroyed. Global class variables will perform operations within their constructor during program startup/shutdown, which is quite useful.
Thanks for the tip. As I do not need to add many more weapons it should not be too much or an issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Space Trading, Simulation and Combat RPG Game 'Naev' 0.5 Released for Linux LXer Syndicated Linux News 0 06-04-2011 10:40 AM
LXer: Naev: Space Trading and Combat Game Similar to Escape Velocity with RPG Elements LXer Syndicated Linux News 0 10-15-2010 09:11 PM
Sauerbraten, cube 2, great rpg game frenchn00b Linux - Games 4 02-03-2008 09:22 AM
Missing Plugin Help for RPG Game sk8er319 Linux - General 3 10-30-2005 12:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration