Des billets et experimentations Haxe, NME, openFL, Flash, HTML5 et mobiles

Demoscene Memories

30.10.2014 1362 2

Making backup of my HD, I came across this old stuff from my demoscene years as 8bits graphician.
Many memories from this time, I've passed so much nights painting on Grafx2, a Deluxe Paint (Amiga) clone working on PC.
At this time, the challenge was to have the most beautiful picture using just 256 colors max.
I was a fan of some artists as M4de (from Bomb demoscene team), Lazur (from Pulse PL), Yoga, Dzordan, X-man (who is actually one of the coder of Grafx II) and some others, that I'm sorry but I forgot...

You can say, it's not really linked with what I'm doing now for years, but in fact the demoscene world taught me a lot : I was impressed by these raw coders and graphicians that fought with optimization of their routines or pixels, just to fit in minimum size, which todays is forgotten because of the large amout of space we have and the performances of the CPU's...
Let's see some of my humble contributions

Lire la suite

Work in progress

20.10.2014 1105 2

Many monthes I have not posted anything on my blog...
The main reason is that I was really busy with all the stuff I worked on.

Some of the work was personal, that I try to develop and maintain on my free time, like a Haxe website engine, a kind of Haxe CMS, some tools that help me in my daily workflow production, some Haxe contributions...

But I worked also on some new and interesting projects, like a client-server software to send SMS using a GSM modem...

Let's see more in details what I'm writing about

Lire la suite

Templotar : CastleDB localization

24.03.2014 7204 0

CastleDB is a static database written wy Nicolas Cannasse that uses a JSON file to store data and comes with a Haxe library and a simple editor.

You can store different kind of data and retrieve them in the Haxe context, CastleDB comes also with some magic macro, but I use it here simply to store some static texts that I use for my templates and manage language localization.

And to manage all that, from templating with templo for example to translation, here's a little tool, as usual .

Lire la suite

FBuilder a tool to help working with multiple targets

19.03.2014 1754 0

It's a bit hard to manage a project with multiple targets.
For example if you write a website, you'll work with some source code for the server's app, the javascript and/or Flash, some CSS, maybe some template files and then... All that is not really homogeneous.
I work with FlashDevelop which is a good Windows's IDE and even it supports all Haxe's plateforms, it doesn't manage multiple targets.
So I wrote a light tool to help me working with all that, using Haxe, Neko, SWHX and HScript.
Basically, it displays buttons for the targets defined in your xml project file and when clicked, it runs the defined script (written in hscript of course...)
It's also another example of using SWHX

Lire la suite

Custom macro haxe.xml.Proxy completion

04.03.2014 1835 0

I use haxe.xml.Proxy for a long time now in order to manage my texts when I write a website.
You can see a good post about it here.
It says if you have an xml file in your project which looks like that for example :

<?xml version="1.0" encoding="utf-8" ?>
	<t id="wrongLogin"><![CDATA[Wrong login or password]]></t>
	<t id="invalidData"><![CDATA[Invalid data]]></t>

And this magic class in your project :

import haxe.ds.StringMap;

class MyTexts extends haxe.xml.Proxy<"bin/texts.xml", String> {
	public static var all	= new StringMap<String>();
	public static var list	= new MyTexts( all.get );

Then you get compiler auto-completion for your strings stored in the xml file like that :

MyTexts.list.	// Here you get propositions for : "wrongLogin" or "invalidData"
Lire la suite

Haxite : writing an entire website using haxe

28.10.2013 30182 4

All you need to easily write an entire efficient website is in the standard haxe library : a routing system with the haxe.web.Dispatch class, a template system with the haxe.Template class, an ORM system with the sys.db.Object and sys.db.Manager classes.
Here I've written a draft of a website using all that, but instead of using the haxe.Template class, I'll use the Templo library, that you can easily find through haxelib.
To this combo Dispatcher/Templo/SPOD I added here the use of HSS to generate the output CSS, DBAdmin lib to generate and manage database and I use the haxe.xml.Proxy magic class to manage my texts (the website is multilanguage...)
This code can be compiled for the nekoVM or the PHP target.
At the end, I've done some benchmarks to test different kind of outputs : mod_php, mod_neko (use of cacheModule or not), mod_tora (use of database session system or the memory shared Tora's system)

Lire la suite

Chat example with Tora Queue in comet-style and Protocol

28.10.2013 3410 0

The Tora server offers the possibility to share persistant data between different modules running on it. The tora.Share class is used to share the data.
Knowing how it works, it can be used with an kind of event system that trigger a notification when a shared data is modified.
That's where Tora's Queue and Protocol are useful.
I've written a quick and light example of chat, one using the tora.Queue class and the comet-style communication with javascript, and another on Flash using the tora.Protocol class and a direct Flash-Tora connection.

Lire la suite

Neko cacheModule and Tora Share

27.10.2013 3289 2

Using the Apache's module mod_neko (or mod_tora), you can use the neko.Web.cacheModule function to cache all the statics initialisations that occur during the module's boot that is executed just once, at the first request and then is cached into memory for the future requests.
You can for example cache all the website configuration, the texts, the templates.
It works fine, and makes often the website more responsive, but there are things to keep in mind some things

Lire la suite

Haxe javascript-neko IDE

29.09.2013 2445 0

For now about 8 years, I work with Flash Devleop which is, IMHO the best editor for Flash and Haxe projects on Windows (I haven't tried another ones because I never needed to use another technology than Haxe since about 2006 )
I'm personally satisfied with Flash Develop but it runs only on Windows and yesterday, I read a thread on the Haxe mailing list about the next Haxe IDE in plan and, havning heard Nicolas Cannasse talking about a Javascript IDE some mothes ago in a meeting, I couldn't resist to give a try to a HTML-Javascript-CSS-NekoVM Haxe IDE.

Lire la suite

HTML font with border using FontForge

02.09.2013 159582 0

Here comes an alternative to get a font with a border in HTML without using text-shadow CSS property neither -webkit-text-stroke or another text processing as sifr (using flash...)
I also remember using this process in order to get font's border on Flash Player 7 and less, in the past, before the comming of Flash Player 8 with its filters.

Text borderText border
Check this out !Check this out !
Lire la suite