Jump to content
  • Advertisement

King of Men

  • Content Count

  • Joined

  • Last visited

Community Reputation

394 Neutral

About King of Men

  • Rank
  1. Turns out I was looking up an un-initialised variable, interpreting it as double, and consistently getting NaN in one case and some small but numerical value in the other. Not sure why the variable location should so consistently flip me between NaN and number, though. Unless perhaps it is the struct layout that does it; the value in question comes from dereferencing the end of that map.
  2. Nope, the members are all independent. Good one, though - I'll keep it in mind for the future.
  3. So if I declare my class this way: private: vector<ContractInfo*> obligations; map<EconActor*, double> borrowers; double discountRate; then my unit tests fail. But if I do it this way: private: double discountRate; vector<ContractInfo*> obligations; map<EconActor*, double> borrowers; they pass. My heart fills with unbounded joy at the thought of tracking this one down...   I suspect I have a destructor somewhere that I ought to have declared virtual, but didn't. Any better guesses?
  4. King of Men

    Game Design Theory

        Because nobody has the computer power to simulate even an atom using the actual, real laws of physics. There are people using months of running time on supercomputers to approximately simulate single protons. Yes, we know the physics, but it's just insanely frackin' intractable. Ok, so maybe you don't want to do things down to the level of quantum chromodynamics. You never got all that quantum stuff, anyway. Plain Newton and Maxwell is good enough for a game! Very good. We'll put in Newton and Maxwell, and arbitrarily designate atoms as the, um, atomic minimal objects of our physics sim. How many do we need? Well, in a gram of hydrogen there are Avogadro's number of hydrogen atoms; 6.02 x 10^23. The number of interactions per time-tick is, of course, O(n^2) in the number of atoms. So, if we optimistically assume that an interaction can be calculated in one floating-point operation, a computer would need to run at (*)... 181 GGGGGHz to do one frame per second. For one gram of hydrogen. * Footnote: A GGHz is a billion GHz; a GGGHz is a billion GGHz... Yes, I'm aware I'm somewhat simplifying the conversion between FLOPS and clock speed; bear with me, it doesn't affect the argument.
  5. You assert that given a vector u, there exists an orthogonal vector v if "the components are inverse identity of each other", which is not meaningful - what's an "inverse identity"? Perhaps you meant "inverse" (or "negative inverse"), but that still wouldn't be true, as demonstrated by your concrete example, in which the components are not inverses. In addition to which, you have not shown that the vector with "inverse identity" components exists, just that if it exists then there is an orthogonal vector. (Perhaps, if you clarified what the "inverse identity" is supposed to be, it would be obvious how to construct it, and then you would at least have demonstrated that the orthogonal vector exists.) But even if your assertion were accurate, this would not demonstrate that u and v form a basis, just that there exists an orthogonal.    Back to the drawing board. 
  6. King of Men

    In what ways can a text adventure have combat?

    Skill in games is largely about resource management. Randomisation does not change this, it only means you have to integrate over a probability distribution. So, allow the player to say (for example) "I hit the monster with 10 mana". This does a deterministic, not stochastic, amount of damage, ranging from blowing a goblin to Jupiter up to scratching the hide of a dragon. The challenge is to maintain your limited mana (and other resources) until you get a chance to stock up; so skill consists of not using 10 mana on a goblin, because that's a waste, but recognising that the dragon must be hit with 100 mana, or it will hit you back and that will not be nice. Add other resources to make the management more multidimensional (also, maybe mana is scarce and even one point is overkill on a goblin - hit it with your sword, instead, thus only expending rapidly-replenishable stamina points). This also allows monsters to have different vulnerabilities, thus allowing the player to acquire "lore skill", that is, skill that consists of knowing water elementals are vulnerable to fire mana, but not to edged-weapon attacks, and deploying their resources optimally accordingly. Of course, all this is basically just bog-standard RPG combat; the only difference is that it doesn't have to be stochastic. Make the damage algorithm deterministic and be done. 
  7. King of Men

    Senate mechanic (strategy)

    You may want to think in terms of a cabinet rather than a Senate. So you appoint the Minister of Trade from the Yellow faction, but you give Internal Security to the Blues. (Or else!) That way there are more constraints on the skill matchup. With 20 "senators-without-portfolio" to appoint, you can probably find some combination of them who have the skills you need even with the 5-from-each faction problem. But if you need specifically to have someone good at math in the Trade department, well, better hope there's someone like that in the Yellow faction. Especially if the factions care about different things; maybe the Yellow faction really likes trade and finance, and won't be anywhere near as happy to be given Internal Security - even if the Green guy who got Trade is actually really good at it. (Maybe especially then: Those dang Greens believe in subsidising nano-manufactures and taxing hydroponic farmers!) Also, you can have Cabinet positions of different weight; if you give the Treasury to the Yellows, and Internal Security to Blue, then Green has to get Education, Agriculture, and Propaganda to get the same satisfaction level. In Britain, for example, the Treasury was the position with most prestige - for two centuries or so, the "Prime Minister" would usually take the Treasury as his actual departmental responsibility; being "Prime" wasn't a separate title - followed by the Foreign Minister. Then the list goes on down through Admiralty, Board of Trade, "Air Minister" for a while in the thirties... until you get down to the likes of the "Captain of the Yeomen of the Guard", which nobody has ever heard of; but you could give it to the Yellows as a sort of consolation prize for not getting anything important. Sort of like the Admiral position in Junta, if you ever played that. 
  8. King of Men

    Learning modern OpenGL

    Wups, I forgot about my own thread. Thanks for the pointers, gentlemen, I'll start looking at them this week. 
  9. back,   You almost have it. Instead of translating the point you want to rotate to the origin, translate the point you want to rotate around. (In fact this is exactly what is done in the algorithm you describe, but in that case the two points are identical.) So, given pointToRotate and rotateAround:   translation = (origin - rotateAround) translation.applyTo(pointToRotate) pointToRotate.rotate(angle) translation *= -1 translation.applyTo(pointToRotate)   You can see that if pointToRotate and rotateAround are identical, this is precisely what you describe in your post. 
  10. So I've been using OpenGL for a while and I feel I've got a reasonable grasp of the basics: Primitives, transforms, textures. I can make a sprite in a modelling program and get it up on the screen. But this is all using the fixed pipeline and basic glBegin, glEnd calls; I'd like to move on to the modern features. Can anyone recommend a good tutorial for understanding vertex shaders and such? For that matter, just a list of what the advanced features are would be helpful, so I know what the holes in my knowledge are. 
  11.   The game could be about gaining wealth and power for your family, the imperial family grows over time (well, if you piss off the population assasinations and/or riots might change that)   So, you realise you are basically describing Crusader Kings 2, right? (Ok, it doesn't have admirals per se, but it does have disloyal generals.) I feel like I must be missing something everyone else saw, because it seems like "CK2" should have been the first post in the thread. 
  12. King of Men

    Dividing by zero, on purpose

    If you're at the point of testing whether some code is even running, you should really be doing debug builds. 
  13. King of Men

    Anybody left from the 2003 crowd?

    Dammit, I missed the cutoff by four months! Oh well, next year I'll be in among the nostalgics. I had a long hiatus between 2008-ish and this year, though - got married, had a kid, things happen... 
  14. King of Men

    space wars

    I suggest youpost some screenshots so it's easier to understand what's going wrong. Go back to your old unswapped code, take a screenshot or two with that, then repeat with the new swapped code. 
  15. King of Men

    Seeking advice on presenting game information

        Thanks, I will fiddle with this tonight. Perhaps having the terrain texture more fine-grained would also help?          *Coughs* Er, well, yes, guilty as charged. I'll have a bit of a think about this.          I haven't. Guess it's time to figure out how that OpenGL shader language works. Thanks for the suggestion.  
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!