Update damage calculation, use defense and penalty values.
Just implemented initial version of initiative system on client and server. It is a bit straightforward, but it will evolve.
Also implement damage calculation on server.
Last week I worked on new database scheme. Due this I refactored client and server code. If code is static typed it is more fun to do than with dynamic one. So I tried use dialyzer for my erlang code. Dialyzer found some errors in my function and type specification and some errors in pattern matches.
Use dialyzer is not so easy as HaXe typing system, but it does his work.
I not stopped working all this time, but had no motivation to blog.
All this time I mostly worked on client side and did small fixes on server.
I played with ASwing as gui library, I even wrote my custom PLAF, but ASwing too heavy. And I found MinimalComps as alternative to it. Now I use haXe port of MinimalComps with my custom patch and components. But some component implemented not optimal and I think to refuse of MinimalComps too.
Yes, I also switched from as3 to haXe - mainly because as3 compiles too slow. Also haXe have NME and I plan to use NME to port a game to mobile platforms and Windows. What I use more from haXe
* type inference - so I reduce keyboard typing
* typedefs - in my practise - nearest analog is a c++ templates
I very inspired by haXe and have only positive experience of using it.
About game. I found rendered particle effects that can be used in non-commercial game. I implemented loading and animating of this effects. For doing this I refactored actions system for game characters. It now more flexible than was.
I added characters icons and characters info window. Also added damages informers and loading screen.
About cache engine. I decide that inventing my own cache engine is not that I need. Now browser caches assets that I use and I thrown out assets management code from client and server and use nginx to serve static assets. Also I remove data socket (http://zerg.tumblr.com/post/9212973096/i-found-solution-i-will-use-two-sockets-one).
Today I thought about assets caching and about Flash SharedObjects for it. I asked about it on reddit and after it we discussed this with my brother. We spoke about TankiOnline and he told that TankiOnline uses browser cache. Searching about browser cache support by Flash and found great interesting post . All what I thought in the morning was described in this post!
Another two or three weeks was gone…
During this time I implemented a protocol for commands and data. As I wrote earlier, it is used two transport sockets - one for commands and one for data. Data transfered via data socket only in one direction - from server to client.
Next thing I implemented was logical protocol: login -> screen of game character selection <-> screen of city <-> screen of battle
And, finally, we have created a database and started to fill it up.
Today I pushed code to the test server and ran it. During deploying I found one small race condition error and fixed it.
jwopitz, author of as3isolib, shared interesting links about as3 performance:
- Beware of Getters and Setters - Interesting, that function call even slower than property call
- Inlining Math Functions
I found solution - I will use two sockets - one socket for commands and one socket for data transfer.