Jump to content
Niunio_Martinez

Allegro for Smart Mobile Studio (Yay!)

Recommended Posts

Actually, I don't know if it should be there or here.

 

Thing is that I was playing with SMS last weeks, and I did a test game using Allegro...  Allegro.js actually.  Compilation was done by the SMS command line compiler.  Didn't test it on IDE,

 

I had to write a brief wrapper unit, and it works seamlessly.  I plan to release it once it wraps the whole library, with examples and docs.  Give me some time.

 

Here you have the test.  On mobile and tablet devices it doesn't work as expected. :(

Share this post


Link to post
Share on other sites

Actually, I don't know if it should be there or here.

 

Thing is that I was playing with SMS last weeks, and I did a test game using Allegro...  Allegro.js actually.  Compilation was done by the SMS command line compiler.  Didn't test it on IDE,

 

I had to write a brief wrapper unit, and it works seamlessly.  I plan to release it once it wraps the whole library, with examples and docs.  Give me some time.

 

Here you have the test.  On mobile and tablet devices it doesn't work as expected. :(

 

Good Job!

 

However, I could only play to 9 seconds before the counter reset  :(

Share this post


Link to post
Share on other sites

Good Job!

 

However, I could only play to 9 seconds before the counter reset   :(

Thanks. :)

 

Each level is 9 seconds long.  Then it increases the level, and appears a new circle.  May be it appeared just in the same place your circle was and then collided.  Anyway, what browser did you use?

Share this post


Link to post
Share on other sites

This should be fixed now.

Having said that, and had a look at the latest allegro sources, our code is actually faster!

In the previous update I added lookup tables to make RGB -> Color  .. Color -> RGB close to instantaneous. Allegro uses expensive and slow text-to-value conversion (or worse, variant which is the default value type in JavaScript).

Seondly, allegro is just a thin wrapper over Canvas2d, which is exactly what we have as well - but we have added a lot more features. The tile/block copying code we have is from a demo library that is much faster than allegro ever was.

We also give you direct pixel access via TW3ImageData, something allegro doesnt event support. It does a slow and simple setpixel() style call.
You could probably inherit from TW3ImageData and implement line, circle, fillrect etc. like you would do with a DIB in delphi -- and it would beat the crap out of HTML5's canvas even. I was going to do that earlier but my time is limited with so much to do.

If you look around the RTL you will find all the pieces you need that match and surpass allegro.

But, the more the merrier, so I do see the idea of having support for it. Quite a few C games that could be ported I guess, as long as the logic is vanilla C and pointers is kept at a minimum. We have support for pointers btw -- check out the memory buffer classes and "blue-pointer"  scheme. I dont think any JS system does what we do there at all.

Just my two cents :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×