Tuesday, January 15, 2013

Approaching game coding

Over at indie resource they've a game writing comp going on where people are encouraged to give updates. I've given one which gives a look into getting it done (based mostly around a text based PHP game) which you might find inspirational. Originally posted here.

I've layed back in bed with pencil and paper to figure out some of the programic structure to the game. I used to just try and jump in front of the computer and hash it out as I go, but mostly this just blurs the feeling of having accomplished something, as you might set up an array structure and...that's all you get done, before you tire, but you sat down to write out a whole game - which you didn't accomplish. Also if you sit down to your coding language, you can't just write notes - you write code or write nothing. Well, I guess you could write pseudo code, but that's another subject. When you sit down to pencil and paper, you can write out notes and code snippets and it doesn't matter if you write them sideways, you've still gotten something done in how much you fill up a page with your crazy writings! :)

Anyway, at first I'm going to test the game using session values to store the data, loading values from the session as if from a DB. I just prefer this as you don't have to juggle a database around at the same time and can feel free to add or remove session values without much concern. You just need a reset button somewhere that reinitialises all the session values.

And then I got onto breaking down the subject of the game. This is where you take the fuzzy wuzzy fiction of the to be game you have in your head, and start drawing connections from the fuzzy wuzzy to actual lines of code and memory systems.

Here I had trails. So what does that involve? Well you might have several trails leaving one place - so...probably an array with a start location and an end location. And perhaps when you are at a place, the code can search through to see if you are at that start location. Then it'll list them as selections.

So the first thing I'll code wont have any game like conflict at all - it'll be just the capacity to choose a path, walk along it, arrive at another spot from which you can choose a path again. No conflict, but the capacity to do so is necessary for something to conflict with. Gotta have something you can do before something else can get in the way of it!

Okay, that's enough for now as I feel writing more would get in the way of further development - after all, I've only written this in pencil so far. I haven't actually coded it. Ironically such would involve less description, but probably the greater effort!

See ya!

No comments:

Post a Comment