Jump to content

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. :(

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  :(

Link to post
Share on other sites
  • 1 year later...
  • 3 months later...
  • 2 months later...

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 :)

Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...