Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » HTML5 games

This thread is locked; no one can reply to it. rss feed Print
HTML5 games
Matthew Leverton
Supreme Loser
January 1999
avatar

Has anybody here used any HTML5 frameworks (e.g., Things like https://phaser.io/) to make games like https://devrunner.fora-soft.com/?

GullRaDriel
Member #3,861
September 2003
avatar

No. It seems to still use a lots of resources even if it's fun.
My laptop ran hot in like a few minutes when playing. A mean 40% of the cpu of all my 4 cores.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Matthew Leverton
Supreme Loser
January 1999
avatar

Anything with Java in the title is designed to consume maximum resources.

Niunio
Member #1,975
March 2002
avatar

I used Allegro.js. ::) Not professional but still Allegro-esque...

-----------------
Current projects: Allegro.pas | MinGRo

Eric Johnson
Member #14,841
January 2013
avatar

Quote:

I used Allegro.js. ::) Not professional but still Allegro-esque...

Wow! :o I didn't know someone was working on a JavaScript library based on Allegro! That's really cool. I'll have to give it a try.

Chris Katko
Member #1,881
January 2002
avatar

Wait... so it's Allegro ... 4?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Eric Johnson
Member #14,841
January 2013
avatar

Wait... so it's Allegro ... 4?

Looks like it. But it's syntax style only. Still pretty neat.

Gideon Weems
Member #3,925
October 2003

As a user, I do not like running into frivolous JavaScript online. Consequently, I have not seriously pictured myself using JavaScript as a programmer. However, in-browser HTML5 (i.e. JavaScript) games have great potential to reach more users than does distributing machine code--at least for today. Perhaps years later, when dust has settled around a smaller quantity of triumphant platforms, the pendulum will reach its apex and return to native code. After all, JavaScript itself becomes native code eventually. Beyond compatibility, there are nothing but disadvantages to its many layers.

Were I charged today with reaching as large an audience as possible with a new game, I would make it a web page. For phone and tablet app stores, I would release apps as nothing more than URL links and home screen icons. Users would not know the difference. They might even praise the app for being so "small".

Incidentally, I would probably start with Allegro.js, as its succinct examples have impressed me a great deal. Thank you for pointing it out for the umpeenth time, Niunio. It finally caught my attention.

Eric Johnson
Member #14,841
January 2013
avatar

I sat down and played with Allegro.js for a bit this evening, and I absolutely love it! :D

The first thing I did with it was write a simple "game" where you run around collecting randomly-spawning guitars forever. Super simple stuff. I like the syntax (what I've seen of it so far, anyway), despite it being based off of Allegro 4. And I really like how I can share the game with anyone else without having to hassle with making binaries for every platform. So cool. ;D

I'm not sure what all the library can do (I've just begun looking at it), but I am already thinking of potential games I could write with it.

Edit
@Chris Katko: You might like this...

I quickly threw together a simple shim/wrapper for allegro.js that lets you use the library with normal Allegro 5 syntax (think al_map_rgb() instead of makecol(), etc). Check out the attached .zip for details. It even contains a simple "game" where you collect hearts. It's incomplete, but think of it as proof of concept.

Another Edit
I put the shim on GitHub. Feel free to take a look. I added support for basic bitmap tinting and transformations (neither of which allegro.js supports on its own, AFAIK).

amarillion
Member #940
January 2001
avatar

I've done some work with Phasar.js. Compared to Allegro, it's much more high level: it gives you collision detection, tilemaps, animations etc. out of the box. To me it feels constricted: it doesn't take much to run into limitations, e.g. with what you can do with tilemaps. However, being javascript you have access to every internal data structure and with some effort you can hack around any limitation.

Eric Johnson
Member #14,841
January 2013
avatar

Compared to Allegro, it's much more high level

That is one aspect of Allegro that I truly admire: its low-level nature; it does just the bare minimum (and occasionally a little extra), but it never gets in the way.

High-level extras, like collision detection and animation, certainly are nice, but the one-size-fits-all mentally usually bogs things down the more specific your purpose becomes. Besides, I think it is more fun to write your own collision functions that do exactly what you need, rather than use a pre-baked generic solution that someone else already made (unless it is a generic library, like math functions, which are usually not too varied between implementations).

Derezo
Member #1,666
April 2001
avatar

being javascript you have access to every internal data structure and with some effort you can hack around any limitation.

As someone who spends most of his day hacking at things with JavaScript, this sounds like torture :P

"He who controls the stuffing controls the Universe"

Chris Katko
Member #1,881
January 2002
avatar

I can get around any Javascript limitation. All I have to do is rootkit the computer and bypass multiple stacks with a couple of buffer overruns, inject a LISP compiler into the master-boot record, and then my GUI library can finally talk to DirectX.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Go to: