Hey once again! Today I want to talk to you about the file and folder structure of the project, as well as about the organization of some of the image files. I have never developed and all my recommendations are based on my sense for cleaning my room up and what I have seen in other repositories/source archives.
1. There is no separation between data, code and documentation. Each could have it's own folder, so a readme and folders would be the only things left in the root of the code.
2. There is no separation inside the data folders. My idea: audio gets subdirectories 'music' and 'sfx'. graphics gets 'sprites' and 'gui'.
3. There are no readme, installation instructions, contributors, license information, todolist, changelog in the svn.
That's all about the folders for now I think. About the graphics:
1. You place multiple images in one image file. There might be a better solution. It might get complicated later on if you choose to change the logical structure. having every frame as one file and divide by using folders might be good (might be not, I don't know how performance gets affected by loading files vs. cutting rectangles from files.)
2. Why is the cursor image an xpm file? Is this an operating system thing? (in the sense that you can't set the cursor platform-independent)
3. Images should not have text in them. I'm talking about the Logo and the 'game paused' images. I'm an enemy to translation and non-original versions, but many people depend on translations, so it should be made easy from the start to support translations by not having text in images.
By the way, do you support translations? (I don't really know how this works, but I suppose there is a file with a heap of variables which are each a placeholder for some phrase/word.) I can provide a German translation if you tell me what to do. (Translations are something I consider 'last polish', but what the heck! =) )
Well, to be honest, I've started moving the datafiles into separate directories, but I've been playing a bit to see what works best. The images will probably be split out soon, since there's enough of each now to warrant the separation. In the past, I tended to keep it all in a single directory as while I was coding it was easier to keep track of while debugging, but it *is* time to start placing it all in trees. You can see in the SVN trunk that it's started, and I'll probably have it all split out by v0.1.3. Splitting the images out by sprite/GUI and the audio files by sound/voice is good advice; I'll do that this week.
The todos, changelog, and contributors I've placed on the project page. I wanted everyone indexed by the search engines. :)
The sprites I placed in a single file as it's faster and seems to give better performance to update the x and y offset of the image file that's being blitted than access multiple files, as well as shaving a bit of RAM as there's a fair bit of overhead associated with each image file when loaded and converted, plus keeping track of each file pointer for each frame of each sprite. The game loads most sprites into RAM at the outset, and (so far) only loads new images when an existing unit needs it due to an upgrade. The cursor as XPM is a holdover from the earliest days when I was experimenting with different image file formats...I haven't updated it since the very beginning, from version 0.1.1! One of these days.... :)
And you are dead right about text in images; those are holdovers again. I'm also dead against English-only games, and that text was there from before I started working on internationalization. I'm still in the process of stripping out all English text from inside the game and placing all text in description files (in the "desc" directory), as I absolutely want translations for the game...I have French right now (as I can sort of, kind of write it), and you bet I'd take German in a heartbeat. All the descriptions are in that one folder, but until I finish splitting all the text into description files (I'm about 75% done), best to hold off, just so there's no extra work. When I'm ready, I hope to have no more hard-coded text and support for on-the-fly language changing; again, by version 0.1.3 that should be ready to go. Each line in each file corresponds to a numeric variable in the game, and what I've done is assign, say, text variable 13 to line 13 in each description file.
Thanks again, mate. You've got good ideas, and I appreciate your taking the time to post them. Anything else you've got, let me know, hey?
Log in to post a comment.