Author Topic: HTML5 RougeLIke  (Read 27781 times)

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
HTML5 RougeLIke
« on: March 26, 2011, 10:14:42 PM »
First has anyone done one yet?  Currently revving up one myself to A)Get experience programming a RL before inflicting them on my students B)To learn the CANVAS tag and HTML and it's always good to see what else has been done before.

Second, is there a common tweet tag for RL development?  #rougelike has nothing, nor does #rougedev.  Those are the two hash tags I was going to use, and will use I guess if there isn't something out there yet.

Ancient

  • Rogueliker
  • ***
  • Posts: 453
  • Karma: +0/-0
    • View Profile
Re: HTML5 RougeLIke
« Reply #1 on: March 27, 2011, 12:42:55 AM »
Cardinal Quest is one such game.

There is nothing under these tags because you are misspelling it. it roGUe, not roUGe.
Michał Bieliński, reviewer for Temple of the Roguelike

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #2 on: March 27, 2011, 12:49:47 AM »
*facepalm* Spelling error.  Of course.  Thanks for the link as well :)

Ancient

  • Rogueliker
  • ***
  • Posts: 453
  • Karma: +0/-0
    • View Profile
Re: HTML5 RougeLIke
« Reply #3 on: March 27, 2011, 07:43:49 PM »
You are welcome. The rogue/rouge mishap is so common nobody gets upset when this happens. There is even The Roguelike 7DRL and POWDER was actually named under this inspiration. You know, rogue is misspelled as rouge, rouge is a kind of powder so ... POWDER!

Enough ranting, you may wish to check out another HTML5 roguelike I remembered:
A Little Anxious When It's Dark has a CSS3/HTML5 HUD. Beware, it is very demanding in regards of minimum system requirements because it also uses WebGL.
Michał Bieliński, reviewer for Temple of the Roguelike

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #4 on: March 27, 2011, 08:44:07 PM »
Well I'll have to wait until I get home to test the second one out.  This netbook is not exactly what you would call a gaming machine ;)   Do love the Iron Maiden reference though. Oddly enough Cardinal Quest crashes FireFox almost constantly, so I wasn't able to try it out very much.

Still nothing under the #roguedev tag, so I'll start using that on twitter.

For anyone that is interested, I'll be blogging about the development of webrogue at http://webrogue.blogspot.com/, and the project website is http://WebRouge.languard.kodingen.com/index.html.  At the moment there is nothing there other than some ultra basic info.  Will be changing soon though.

siob

  • Rogueliker
  • ***
  • Posts: 64
  • Karma: +0/-0
  • blit(brain)
    • View Profile
    • gamejs
Re: HTML5 RougeLIke
« Reply #5 on: March 29, 2011, 11:22:00 AM »
Unclear if it yet qualifies as rogue but I'm developing this with GameJs (canvas + js):

http://apps.gamejs.org/rtsimple/

control with mouse

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #6 on: March 29, 2011, 02:27:47 PM »
@Ancient: How strange, can't load up Anxious on my work machine  :-\  Using Chrome 10, and I can play Crysis, but not a web-based RL.  Technology is grand sometimes  :D

@siob: Thanks for the link.  My first thought was: oh great it's broke on FireFox.  Then 20 seconds later it finally started.  In dev, I know, but you really need to improve that load time, or give a status bar or something.  Attention spans on the web are oooo shiny video....

*coughs* Where was I?  Oh right, improve the load screen  ;)  The GameJs looks interesting as well.

My first round of experimentation is going to be with vector based graphics and the Dojo Toolkit.  I like the UI that you can do with Dojo, so we'll see how that goes.  Hopefully I'll something up later today that is playable.

Ancient

  • Rogueliker
  • ***
  • Posts: 453
  • Karma: +0/-0
    • View Profile
Re: HTML5 RougeLIke
« Reply #7 on: March 29, 2011, 06:04:58 PM »
Anxious has caused a lot of head scratching for us in the reviewing committee too. Half of us were unable to run this. People who were initially assigned to this all happened to belong to that very group.
Michał Bieliński, reviewer for Temple of the Roguelike

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #8 on: March 30, 2011, 04:30:05 AM »
Update on blog: goo.gl/eHMbU  Nothing much.  Backing off on vectors due to low support, started work on core.js.  Hopefully something playable tomorrow.

siob

  • Rogueliker
  • ***
  • Posts: 64
  • Karma: +0/-0
  • blit(brain)
    • View Profile
    • gamejs
Re: HTML5 RougeLIke
« Reply #9 on: March 30, 2011, 07:31:29 AM »
Anxious has caused a lot of head scratching for us in the reviewing committee too. Half of us were unable to run this. People who were initially assigned to this all happened to belong to that very group.

regarding webGL: even if you have chrome or firefox4, your GFX card must be supported and I know that ff4 is still blocking a lot of them due to open bugs.

Maybe in half a year most combinations of browsers/cards work.

edit @languard, this has a ton of up2date info about different JS engines / frameworks / tools: https://github.com/bebraw/jswiki/wiki/
« Last Edit: March 30, 2011, 07:33:53 AM by siob »

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #10 on: April 03, 2011, 02:56:59 AM »
Perhaps someone knows of a better solution, but I found a good solution on the net for including javascript files:

Code: [Select]
//Function posted by jawednazarali
//taken from: http://forums.digitalpoint.com/showthread.php?t=146094
//Attribution added by Languard
function include(filename)
{
    var head = document.getElementsByTagName('head')[0];

script = document.createElement('script');
script.src = filename;
script.type = 'text/javascript';

head.appendChild(script)
}

Finally getting a chance to work on it tonight.  Experimenting with using arrays of functions and a factory system to make the engine easily moddable/expandable.

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #11 on: April 04, 2011, 02:51:31 PM »
JavaScript doesn't support associative arrays, which is very aggravating because the system I had envisioned used them.  Ah well, such is life I suppose.

siob

  • Rogueliker
  • ***
  • Posts: 64
  • Karma: +0/-0
  • blit(brain)
    • View Profile
    • gamejs
Re: HTML5 RougeLIke
« Reply #12 on: April 07, 2011, 12:44:31 PM »
JavaScript doesn't support associative arrays, which is very aggravating because the system I had envisioned used them.  Ah well, such is life I suppose.

maybe I misunderstand, but javascript has nothing but assoc arrays:

var test = {
   "aRandomKey": 123,
   234: true
};

regarding javascript loaders, may I suggest: RequireJs.

No offense, but you don't seem to have much JS knowledge ;) May I suggest this as intro material: https://developer.mozilla.org/en/A_re-introduction_to_JavaScript

If you want a pure reference doc: https://developer.mozilla.org/en/JavaScript/Reference
« Last Edit: April 07, 2011, 12:47:37 PM by siob »

languard

  • Newcomer
  • Posts: 41
  • Karma: +0/-0
    • View Profile
    • Email
Re: HTML5 RougeLIke
« Reply #13 on: April 07, 2011, 02:30:47 PM »
*laughs* No offense taken.  It's been 10+ years since I've worked with javascript, and I never was very heavily into the language.

What you posted is an object if I understand the language correctly, not an array.  I can do the same thing in C#:
Code: [Select]
class test
{
  int aRandomKey = 123;
  bool _234 = true;
}

A few minor syntax differences, but the same thing.  Those are objects, not arrays.  Arrays use the [ ] brackets for access, so it would look like this: someArray["akey"] = something.  While that appears to work in JS, it doesn't really.  Not as a true array.

purestrain

  • Rogueliker
  • ***
  • Posts: 172
  • Karma: +0/-0
    • View Profile
Re: HTML5 RougeLIke
« Reply #14 on: April 07, 2011, 05:48:21 PM »
Code: [Select]
var foo= new Array()
foo["z1"]="x1";
foo["z2"]="x2";
foo["z3"]="x3";

Should work in javascript afaik