• Advertisement

MeshGearFox

Member
  • Content count

    310
  • Joined

  • Last visited

Community Reputation

158 Neutral

About MeshGearFox

  • Rank
    Member
  1. Nevermind, this was an issue with SCITE, not Lua.
  2. [quote name='JTippetts' timestamp='1327153093' post='4904814'] Personally, I would prefer the contents table have a list of object names or IDs that can be used to look the objects up. [/quote] As I said, all of the objects are stored in a hash table. The local contents tables in the rooms are just either going to hold strings that the actual object can be looked up from the hash table with, or a references to the objects in the hash table. wqking, references SHOULD be faster -- from my understanding not because they use integer keys, but because... well, apparently local variables are faster to access in lua because they're stored in registers and not the global hash table, and register lookup is faster than table lookup, which I think is the case. However, table lookup in Lua is still supposed to be pretty fast -- tables are like, its main data structure, so it's optimized for those. The problem with references is that, as data, they're a bit fiddlier to work with, and may or may not lead to a leakier abstraction than I'd have otherwise. The other problem is I'm not entirely sure how the Lua garbage collector works, or how Lua handles references as a whole, so what I'm assuming are fairly permanent references might actually be not that permanent.
  3. Simplified version of what I'm doing: Basic text adventure engine. Rooms and game objects are stored in hash tables. Rooms themselves are a table containing, among other things, a table indicating what their contents are. The contents table could be two things: 1) A list of object names which could be used to look up the actual game objects from that hash table. B) A list of references to said objects. Which would be preferable?
  4. How would intrasystem trading make the gameplay more interesting/fun?
  5. The good old "which one"; choosing a language.

    I'm pretty sure Little Fighter was a QBasic game. Also if you're asking which language to learn you're probably missing the point. Learn how to program, learn different programming paradigms -- but not a specific language per se, outside of what you need to learn the broader concepts.
  6. Civilization/ Technology Progression Sim

    Change your title. Era Online was already used for some crappy VB MMORPG made by a Norwegian kid in the late 90s that somehow got really famous. You REALLY don't want to associate yourself with it.
  7. Testing Social Game Design Ideas

    [quote]explanation as to why it may not be the best idea[/quote] It's a social game. That's why it is a bad idea. This should've been evident from my post. Social games are roughly on par with pyramid schemes, both in terms of how they actually work, as well as, well, their merit to society as a whole. [quote]Why reply to a post that you don't even take the time to read the whole post.[/quote] I read your whole post, I just told you how far I had to read into it before it became apparent that it was a terrible idea. Basically, look at it this way. If someone says they want to shoot themselves in the foot, you tell them not to. You DON'T go off recommending various crossbows with which they could experiment.
  8. Testing Social Game Design Ideas

    [quote]Social Game[/quote] Without reading the rest of your post I can tell you that every thing about your idea is terrible.
  9. Adventure Game Concept

    [quote]he probably meant to say... "someone already made that, I already played that", Nothing original, not really interesting.[/quote] I've actually never played another game like that. What's informative is that there is a [i]reason[/i] that I've never played another game like that.
  10. Adventure Game Concept

    [quote]n the game youplay as a man who has been possessed by a demon and is able to harness the powers of the demon within him. His powers are used to aid the government in top secret missions that the military cannot handle. Throughout the game you have the ability to use your gift for good or evil.[/quote] Basically I would change all of that, completely.
  11. To global or not to global!

    Question. I'm kind of looking at a situation like this: If you have a text file with weapon stats somewhere in the program directory, theoretically, anything in your program could access it with your language of choice's file-loader function. In that sense, it's already global to the program. Loading it into a global thing, as long as said thing is constant, doesn't seem like it'd be that different to me.
  12. [quote]I'm rather cynical about the state of "professional" software products, given that I've actually seen the code that goes into these things. They are so unstable and inefficient. I can't think of any other industry where you could get away with selling a product that is this shitty on the inside.[/quote] College CS degrees, by year: Year 1: OH MY GOD I AM GOING TO MAKE VIDEOGAMES IT'LL BE PRETTY SWEET. Year 2: Well um... Databases are nice too, I guess. And hey, you can do some pretty neat things with Java! Maybe I won't be the next Sid Meier but programming's still pretty fun. Year 3: "90% of software projects are shipped over budget, late, an non-functional. Have fun working 80 hours a week in a sweatshop trying to fix this." Year 4: This is the part where you just cry yourself to sleep every night.
  13. So let's talk weapons...

    Weapons in turn based RPGs are pretty much different only in how much damage they do. They RARELY behave differently/interestingly.
  14. Purely Theoretical MMO game mechanics

    [quote]knowledge | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | --------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ Dmg % of base | 50% | 60% | 70% | 80% | 90% | 100%| 105%| 110%| 115%| 120%| 125%| 127%| 129%| 131%| 133%| 135%|[/quote] Because Microsoft Excel is the best game on earth.
  15. Code design help

    Just something I noticed. "return new MapObject(str_type,str_bmp,x,y);" I don't personally like to return new objects. There's no guarantee that they're going to be used sanely and as such you can get some weird memory leak errors. One option might be to have parseLine take a reference to whatever data structure you're storing and just have parseLine add the new object to that structure. That way, you're sure that the new object is being kept in something stable instead of just shot off into space. Or you could turn parseLine into a constructor for MapObjects, actually, and keep the other constructor when you're not making map objects from a file. I don't, unfortunately, know why your pointers are CURRENTLY getting lost. Althoooouuuuugh, and I don't know if this is what's happening here or not, I do recall that the memory addresses of stuff in vectors can get shifted around during vector resizes, so it's not generally a good idea to store pointers to things in vector. I think having a vector be a vector of pointers actually is safer in this sense because, while the pointers themselves can get moved around, the stuff they point to never will. If you plan on having a lot of additions and removals to objects, a list might be a more appropriate container.
  • Advertisement