Tuesday, June 5, 2012

Shop & Co.

Hi everyone,

My computer broke two weeks ago and it was kind of painful to put it all back in shape before starting development again. Fortunately, I didn't lose any data regarding Valyria or not, thanks git and thanks backups. :)

So here are some news from all what happened since my last post:

- I added several new tilesets, and characters sprites set up out of mockups gently given by Jetrel.
You can see the mockups here if you're interested: http://www.http://wesnoth.org/jetrel/Allacrost/
I take the opportunity thanks him warmly for letting me use his work and keep on working on and with it.

To sum up, I gathered all the props in one tileset, added small ground variations for the harrvah, and the mountain landscape, and added the wood, snow, and desert house tilesets. (some of which still have WIP parts).

This will permit to finally add the first game "dungeon", but I'll come back at this part later.

The Wood tileset, 95% based on Jetrel's mockups.
- I also had a fair amount of work on the shop mode, which seemed to be in a not quite good shape after all.
A bit of word about it, if you allow me to:
When analysing the code, and the overall logic done throughout that mode, the main design drawback leading to crashes and display flawed logic was the fact that the deal types (weapons, items, ...) were computed against the items to buy, while those were also used for the items the player can sell.
All this was tricky to sort out, even on a higher level, as several piece of code were initialized once and set in stone, even when the items present there had changed.

To make it cleaner both in my little head and in the code readability, I had to separate the items to buy and to sell, their own deal types, and to make sure they would not be mixed again (as for the readability), I put the deal types in their respective interfaces, since there were only used there.

In the end, the shop is starting to look good, even in the memory management there needs some improvements. I don't know yet whether the text or some other memory management objects are in cause, but again I'll see that later.

The Shop mode, not crash-prone anymore (hopefully) and with the character's sprites display for equipment.

Now that the main parts of the games are, if not fine for a bigger project, functional, my next priority will be to add more space to the three-maps sandbox the game is, atm, and why not reach the state where the first battles can be encountered! :)

Depending on my time and luck on it, I'll also have to review the map display code to finally sort out the bad tiles offsetting seen in the map mode (which was there from the beginning, as for me.), and see whether I can have a go at removing the white edges around the sprites, when the images are enlarged.
Fun to come indeed. ;) Would I fail on this task, I would then look at putting a map view making me out of these kind of problems. (The worse, the better sometimes, eh).

Till next time! :)

No comments:

Post a Comment