Skip to main content


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mezzoEmrys

Mine was based on the legend of Merlin at Dinas Emrys. I was big into dragons and wizards and Merlin when I was younger, and so the name "Emrys" was one I was a fan of.
The "mezzo" part was not quite so prestigious, when I tried joining an online Go site I hadn't had a good username made yet, so I just got bored and put in "mezzo" such as in mezzo soprano or mezzo forte, and when someone already took that "mezzoE", which got conjoined with Emrys to become the name you see now.
The mezzo is pronounced like mezzanine, though.
Projects / Re: Poncho [Unreleased]
It's not dead, it's just taken a back seat to my first year in college. I've been poking at it every now and then, but between my art person's computer being broked and me having reached a planning issue, things have kinda gone on hiatus for the moment.
I've also been encountering other issues here and there regarding my turn structure and saving/loading, so I've been doing bugfixes.
The function game() occurs once, MapEngine() is what keeps the game running after that, if you want it to loop you'd need game() to call itself at the end.
If I knew how to implement a binary heap off the top of my head, I probably would :P
Seriously though, I considered putting it in add instead of in pop, but I couldn't find a good way of adding things in. A binary heap is probably the best plan, so I'll see about writing that in tomorrow. All it'll probably take is a moment with pen and paper to remind myself how they work and a general framework for writing it. For now, I probably will update it to include the dirty/clean just for the small speed increment I'll get.
Nothing gets added to the queue after the map is generated so putting it in add really is the best plan.
My priority queue works like those timers, except that it jumps straight to the next one that would take an action and cuts out from everyone else's timers the increment that was jumped. It works a lot better, I think I just had to stop and talk out my problem to realize what was actually going on in my code versus what should have been happening.
A quick view of the code:
Code: [Select]
function pQueue(){
var q = new Array();
function qSlot(entity, priority){
this.e = entity;
this.p = priority;
qSlot.prototype.toString = function() { return this.p; };
this.add = function(entity, priority){
q.push(new qSlot(entity, priority));
this.pop = function(){
var g = q.shift();
var n = q.length;
for(var i = 0; i < n; i++){
q[i].p -= g.p;
return g.e;
this.get = function(){
return q;

It takes advantage of a few speedup functions, but the closer to 0 your priority is the faster (relatively) you move. Each entity is responsible for resetting its own timer, and it doesn't account for getting hasted between turns shortening the time until the next turn, but that's fine by me. The important thing is that the visual lag is much less.
The thing is I'm only checking the one entity. However, the way it's written now, since most of the information is stored in a 2d array, I'm technically stepping through each place in the array, checking to see if it is occupied and, if it is, seeing if what's in that particular spot has anything it needs to do.
So, right now, it has to go through each of n spaces each of x times between each turn.

Having a list of units that actually need to do something would definitely help performance, and iterating through the map only once to fill it seems like a much better plan. And Jester's example still seems better than the plan I came up with last night.

My current plan is a priority queue setup where it will pop the highest priority "turn" that needs to occur next, then subtract that priority from the rest, then push in the next "turn" for that entity that would occur a certain time away. A quick visual example of this:
Code: [Select]

Queue Contents: 2(a), 5(b), 6(c)
queue.pop() - Queue Contents: 5(b), 6(c) -> 3(b), 4(c)
queue.push(a, 2) - Queue Contents: 2(a), 3(b), 4(c)
queue.pop() - Queue Contents: 3(b), 4(c) -> 1(b), 2(c)
queue.push(a, 2) - Queue Contents: 1(b), 2(c), 2(a)
queue.pop() - Queue contents: 2(c), 2(a) -> 1(c), 1(a)
queue.push(b, 5) - Queue contents: 1(c), 1(a), 5(b)

I'll probably get to trying to implement this once I'm actually awake, then see how useful it is to me compared to Jester's much simpler code.
As part of my current project I am giving every entity a "speed" value which determines the frequency of when each entity acts. However, my current implementation involves stepping through a numerical "turn", then seeing if any entity or effect needs to trigger on that turn, currently by iterating through all the entities and effects in play on the map.
However, this process of stepping through the turns becomes visible while playing, with each player turn becoming obviously delayed, even when the player is the only entity on the map.
I suppose my question here would be how could I optimally implement this "frequency of acting" turn structure?
By Merlin's Beard, I can't believe we can still get at that stuff! To the repo with it!
Spriteset Support / Multi-Piece and Masking on Spriteset?
As part of my current project I am implementing a character customization system which allows players to pick their skin and hair color, and possibly hair style. So far I have been glad to find the SetPersonMask option, but as I have been planning out the customization system I have encountered a problem.

Would it be possible for me to create a single spriteset, with no mask, from multiple spritesets that are masked? If so, how would I do that, and what kind of things would I need to set up?
Projects / Re: Poncho [Unreleased]

Can I imagine this as a Zelda-like effect? Find better sword, now you're stronger; get better armor, now you have more defense?

You could imagine it like that, but it's not quite accurate. It's more like standard rpg "find better sword"->"equip better sword"->"get stat buff from better sword", except that your stat buffs depend almost ENTIRELY on finding better equipment. You also get three "accessory" slots where you can equip different types of items; each of which has some manner of random stat buff, so you can (somewhat) control your stat growth by equipping weapons with buffs that align with the type of character you want to play.
Projects / Re: Poncho [Unreleased]
The dungeon map, in 1.0, will only be maybe 5 tiles, which is easily implementable, assuming I can make good quality tiles. The complex map is going to be the overworld map, which is constant. I also lack any sprites at the moment as my art asset person is currently entrenched in their end of summer schoolwork, which I won't hit for another few weeks. I am trying at the map tiles, but I am not good at making repeatable tiles, by any metric.
Projects / Poncho [Unreleased] [Pre-Development]

"You are an adventurer delving deep into the dungeon to find out what's at the bottom! Have at it!"

v1.0 Features:

  • A roguelike adventure, with a focus on exploration!

  • There are no standard "experience" or "levels", all your stats are initialized by your class and buffed by the items you find.

  • You get better loot the deeper you go, but you can't go back to a floor you've left.

  • Overworld town for selling your loot and buying rare/unique items that don't generate in the dungeon.

  • Go straight from the current floor up to the town, no need to retrace your steps. Convenient!

  • Permadeath, with quicksave. This is a roguelike, but no need to play it all in one sitting.

  • Randomly generated map, items, and character spell. No two games play the same!

Planned Features:

  • Pet to act as support, such as killing nearby enemies or buffing you.

  • Character customization as simple as picking hair style, hair color, and eye color.

Development Progress:

  • Player creation: 10% (TODO: Classes, Sprites)

  • Items: 99% (TODO: Magic Items)

  • Spells: 10% (TODO: More Spells)

  • Menu System: 0% (TODO: Basic Menu, selling, buying, equipping)

  • Turn Order: 0% (TODO: Implement FFX style turn ordering)

  • Music: 90% (TODO: Get more music together, continue testing of sound manager)

  • Map Generation: 30% (TODO: Implement Algorithm, Map manipulation)

  • Tile based movement: 50% (TODO: Matrixes representing generated map to determine items and obstruction positions)

  • Saving: 1% (TODO: Map Saving, Saving functions, Loading functions)

Screenshots: (v0.01_pre-alpha_badart)


  • mezzoEmrys - Project Manager, Programmer

  • ChocoHugs - Creative Director, Artist

  • Eevables - Musician

I was running it from a subdirectory of my main Sphere directory, now i'm running a couple directories down and over. Upon further tests, moving the old versions to the same directory and running them also causes them to fail. Maybe I'm just cursed?
The new build seems to work for me, at least running from a distant directory. I'll just have to call it good and hope that this doesn't come up in the next update!
Sphere Support / Re: Procedural Generation of Maps?
Thank you muchly, now I just have to actually put together a tileset to test out my attempts ;w;