Re: Software Architecture/Design
Megan Fox <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
> GameConfig -> [GameStateMaker] -> GameState
> GameConfig+TestConfig -> [GameStateForTesting] -> GameState
> NetworkMsg -> [GameStateFromNetworkMsg] -> GameState
> GameState+Time -> [GameTicker] -> GameState
> GameState -> [GameTester] -> GameTestReport
> GameState -> [GameSaver] -> GameFile
> GameFile -> [GameLoader] -> GameState
> GameState -> [GameStateToNetworkMsg] -> NetworkMsg
> GameState -> [GameStateVerifier] -> GameStateErrors
> GameStateErrors -> [GameStateErrorPrinter] -> Console
> GameStateErrors -> [GameStateWindowMaker] -> Window
> etc.
Seemingly, is is roughly equivalent to a component/entity structure
where the "entity" is little more than a data stream - it's yet
another way of looking at a data-driven system that simply processes
data streams.
... to that end, what do the internals of your GameState, for
instance, look like? In my case it's an entity, but I'm still left
with a lot of components/whatever that want to read, modify and store
data on a stream in an extremely opaque fashion without ever caring
what other data is on that stream, if the data member was already
defined, etc. That in turn leaves me with some kind of map that I'm
indexing via strings, or via ASCII->int identifiers like
{'P','o','s'}, or something similarly ugly that is either terrible for
performance, or usability, or both.
Does there exist a structure that deals with this? Or is everyone
just throwing their data into a hashmap, keeping their strings to a
reasonable length, and balancing collisions vs wasted memory/resize
costs/etc?
(in my case I'd also want to load it down with some kind of stream
merger, which in turn had some concept of priority, so that for
instance physics stream writes to Pos override most other attempted
changes of that value, etc, but that's likely immaterial and easy once
I have a decent base structure)
--
Megan Fox
http://www.shalinor.com/
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com