Third month of development and third status update on Shade, a cross-platform framework for 2D games which will be the core technology of all my future mobile and desktop games.
In case you missed the previous updates or wanted to read more about Shade before reading this, you can check out all the previous posts of the series.
Due to some unexpected, but welcome, work this month I was able to work only for 2 weeks on Shade, but I managed to finish and improve many key features. As usual there’s been a lot of refactoring going on, but most of the work went into adding new features.
The Display module
The display module is almost finished now, the only missing feature is some kind of advanced text management, but you can already create simple text labels and more will be implemented next month.
The main feature this month is the new added possibility to control DisplayObjects visibility and events interaction. Even if this is nothing fancy from a user perspective, the implementation underneath is quite clever and removes any possible overhead during the rendering and events-dispatching stages.
Another important feature is the introduction of display events which extend basic Mouse and Touch events with extra information like a target (the object which received the event) and a local position relative to the target. Furthermore I’ve introduced new events which are fired when the mouse (or a touch) is over or out a display object. Basically the same events you can find in AS3.
Finally, I’ve added support for TextureAtlases to DisplayObjects, which is something always important to have to avoid too many texture changes during rendering.
The Events module
Events and events management went through many changes and improvements this month.
The main news are the implementation of a TouchEvent class, which handles events generated by touching a touch screen, and the introduction of deferred event dispatching for application (non-system) events, which allows to destroy an event sender straight after receiving an event (something I consider extremely useful especially for games).
Furthermore I decided to change slightly the base Event class dropping the category attribute and relying only on unique identifiers for differentiating event types. Such identifiers are now generated by a hash function which is part of the utility module.
During this short development frame I’ve also managed to finish all the main features of the Texture and Font ResourceManages which now allow to load and unload resources before/after needing or using them.
Shade on iOS
After many hours of work and some swearing at Xcode 5 and SDL, I finally managed to create the XCode project and to build Shade for iOS and also to build and run a test in the iOS simulator.
Even if I got everything working I decided I won’t be working on iOS for the next few months and that’s because of 2 main reasons:
- SDL, the library which for now is the core of Shade, doesn’t seem to play well with the iOS simulator. I could spend some time trying to sort this out, but I’d rather postpone the development to when I’ll be able to deploy to an actual device (something which is not going to happen before the end of September) and focus on the proper development for now.
- I don’t like working on OS X and with XCode in general, so the less time I spend with them the more productive I can be.
I haven’t tried to build Shade and my tests for OS X yet, but I assume that granted for now and I will check this further when I restart working on the iOS code.
I haven’t decided the priorities for next month yet, but I think the next big thing will be a GUI module and working on some advanced text management (not as in string management, but as in rich text).
The good news is that no matter what I’ll been working on next month it will be for the full month, so expect much more progress with the next update scheduled for the 31st of July.