View previous topic - View next topic |
Author |
Message |
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri Apr 23, 2010 11:52 pm Post subject: |
[quote] |
|
I think it causes a compounded interval. Never use setInterval if you can help it.
Are you drawing all the tiles on the map per frame, or just the ones in view of the camera?
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Sat Apr 24, 2010 12:26 am Post subject: |
[quote] |
|
I think it causes a compounded interval. Never use setInterval if you can help it.
Are you drawing all the tiles on the map per frame, or just the ones in view of the camera?
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Sat Apr 24, 2010 1:16 am Post subject: |
[quote] |
|
Just the ones in view of the camera, plus a tile more outside the screen boundaries because those are visible when in between two tiles. Also the y-sort only acts on entities in view of the camera. _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Sat Apr 24, 2010 2:06 am Post subject: |
[quote] |
|
"Y-sort"?
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Sat Apr 24, 2010 3:59 am Post subject: |
[quote] |
|
Yeah, the entities (NPCs, etc) are 16x32 while map tiles are 16x16, so I have to draw the entities in order of their current y-position or the bottom half of one sprite could overlap another that's supposed to be in front of it. _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Sat Apr 24, 2010 10:33 am Post subject: |
[quote] |
|
It looks like CANVAS needs to optimized, then.
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Sat Apr 24, 2010 4:15 pm Post subject: |
[quote] |
|
Yeah, it's still an emerging technology, so it may be a while before every browser has it right.
Of course, it'll be a long time before I'm finished the game also :) _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Mon Apr 26, 2010 10:38 pm Post subject: |
[quote] |
|
Got a working editor!
http://abstract-productions.net/arc/editor.html
Still need to get the entity delete and duplicate buttons working and figure out a way to allow adding/deleting tile layers and changing the map size, but other than that it's fully functional.
Either click to put a tile down or shift-click as an "eyedropper" to select a tile to draw (or you can just select a tile from the big tile palette on the right). In the collision layer, shift-click removes a collision block. In the entity layer, shift-click the lower half of an entity to select it.
To save maps, I just have it export the map-generating JavaScript into a text box which I then copy and paste into a file.
This is big news! This means I can actually work on real maps for the game now! I'm thinking of redoing them all from scratch since I wasn't very satisfied with how they were originally. _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Tue Apr 27, 2010 7:28 am Post subject: |
[quote] |
|
d'oh. There was a huge memory leak in that. Fixed! _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri Jul 09, 2010 9:08 pm Post subject: |
[quote] |
|
I think you can reduce the number of updates to the graphics by drawing to two different canvas elements layered on top of each other. Draw the clipped tiles as well as the unclipped tiles, hiding the clipped tiles by specifying a DHTML clipping region that is only the width of the unclipped screen. Refresh the map only when it scrolls an entire tile, else move the layer itself in the direction of the scroll. When the entire layer "scrolls" full tile, reposition it to the center in a kind of "spring board" action. This saves a lot of drawing. Same with the sprite layer, btw.
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Sat Jul 10, 2010 6:51 am Post subject: |
[quote] |
|
There's no practical way I could implement that without adding a ton of Javascript to figure out what parts need updating and what needs to be clipped. Some tiles are animated or can change on the fly, and entities are located between two tile layers and can move around.
Anyway, it's only the actual sprite-drawing step that's slow, and every major browser is adding hardware acceleration in their next major versions (even IE9 will support Canvas and hardware-accelerate it) so I'll just stick with what I got now and let the future take care of it :) _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Sat Jan 18, 2014 5:19 am Post subject: |
[quote] |
|
Whoa, has it really been three and a half years since I last did any work on this project?
Anyhoo, I am resurrecting The ARC Legacy project, and I really want to get this thing done this time!
Beginning of March there will be a demo! _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
|
|
Back to top |
|
|
jeffd1830 Pretty, Pretty Fairy Princess
Joined: 17 Sep 2013 Posts: 13
|
Posted: Sat Jan 18, 2014 9:34 am Post subject: |
[quote] |
|
Great work so far! I love the amount of power you've gotten out of such a simple level format.
|
|
Back to top |
|
|
XMark Guitar playin' black mage
Joined: 30 May 2002 Posts: 870 Location: New Westminster, BC, Canada
|
Posted: Mon Jan 27, 2014 6:59 pm Post subject: |
[quote] |
|
Reviving this project, I'm also starting the whole thing over again, and even choosing a different aesthetic. Last time around, I was trying to go for a 16-bit look (Mandrake, Fooolking and Josiah did some great sprite work for it) but in the upcoming demo that I'll be releasing in March you'll see that I'm going for a more retro 8-bit look, including limiting color selection to the 54-color NES palette.
For the moment I'm doing everything including sprite work myself. I'll think about possibly getting help with it when the demo is out and I've convinced myself more thoroughly that I'll actually bring the project to completion this time. _________________ Mark Hall
Abstract Productions
I PLAYS THE MUSIC THAT MAKES THE PEOPLES FALL DOWN!
Last edited by XMark on Wed Jan 29, 2014 4:52 pm; edited 2 times in total
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Tue Jan 28, 2014 2:14 am Post subject: |
[quote] |
|
54 colors are fine... but please don't force 3 color limits on sprites. >_> I'm tired of looking at sprites I can barely make out.
|
|
Back to top |
|
|