[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
New Javascript Engine   (Read 20990 times)
Old Post January 09, 2007, 05:06:37 am
#1
Job
Shining Light *

Posts: 230

Logged
New Javascript Engine
I've been gaining some valuable Javascript experience with some recent unrelated projects and knocked up a pretty nice Javascript Engine
http://www.bloo.us/javascript/tileengine/
Lets see how far it gets. I'm going to make this engine Open Source.


Old Post January 09, 2007, 05:17:55 am
#2
Blahian *

Posts: 38

Logged
Re: New Javascript Engine
This looks very interesting! Can't wait to see what develops from this.


Old Post January 11, 2007, 06:12:07 am
#3
Job
Shining Light *

Posts: 230

Logged
Re: New Javascript Engine
This thing works great even with layers. I added a character layer on top, with a number of characters on it. It's starting to look like a Shining Force engine.
Pairing this up with a reverse Ajax approach will definitely make a nice multiplayer engine.


Old Post January 11, 2007, 08:18:02 am
#4
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: New Javascript Engine
Loving it Job.
Keep the good work up.
Let me know if you need a tester Cheesy

my alias @ hotmail for msn.

~Elvenfyre


Old Post January 23, 2007, 02:34:14 am
#5
Job
Shining Light *

Posts: 230

Logged
Re: New Javascript Engine
I actually found a way to implement smooth scrolling. I was never able to do this with flash. I'm still debugging though.

http://www.bloo.us/javascript/tileengine/


Old Post January 23, 2007, 05:51:35 am
#6
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: New Javascript Engine
OK a couple of bugs I came up with.  Firefox 2.0.0.1

Perhaps you should shift the screen when the char is one more square away from the edge?
Because when moving the screen up or left, the char disappears when you've just moved the screen - until you press a key then he reappears.
When moving the screen(mainly right or down, but on the odd occasion left) a second "hero" appears(he goes away when you press another key too).
Also at one point when i did cause this second hero to appear on walking left, the obstacles on the screen had been misplaced by one square(the obstacles were 1 higher than the bush graphics) - and the mirror image hero didn't go away.

I'm getting 0 cpu useage when leaving it running with the dudes moving round etc, and up to 87% useage when I move.
Athlon 2500, 1.25GB ram, nVidia 6600GT

~Elvenfyre


Old Post January 24, 2007, 04:23:58 am
#7
Blahian *

Posts: 38

Logged
Re: New Javascript Engine
This looks really cool! I'm getting the same results as Elvenfyre though, with the duplicate (and somtimes triple) hero and a jump in the animation when it starts. Also, the buttons (up,down,left,right) don't do anything for me though.  I tried it in Firefox 1.5 and IE 6.


Old Post January 24, 2007, 06:12:37 am
#8
Job
Shining Light *

Posts: 230

Logged
Re: New Javascript Engine
Thanks for the bugs reports guys, i'm aware of most of these issues, i hope i can improve performance a little on the scrolling.


Old Post January 31, 2007, 01:43:26 am
#9
Administrator Shining Spammer *

Posts: 1,129

Logged
Re: New Javascript Engine
Perhaps the smooth scrolling is causing more problems than its worth?

~Elvenfyre


Old Post April 24, 2007, 07:31:01 am
#10
Administrator
Shining Spammer *

Posts: 1,208

Logged
Re: New Javascript Engine
That looks pretty cool.

It indeed looks like the scrolling could use some optimization. Perhaps you can post that piece of the code here and we can take a look at it? Smiley

Devlyn

Great news for Shining fangame developers! Wink

Correcting your non-working <img> tags since 1982 Wink


New Post April 29, 2007, 04:51:15 am
#11
Job
Shining Light *

Posts: 230

Logged
Re: New Javascript Engine
I finally got some time to work on this thing and fixed plenty of issues. I managed to keep smooth scrolling while maintaining fairly good performance.

Dev, if you want to look at the code check TileEngine.js in your Temporary internet files. The smooth scrolling makes the code a little more complex and it needs a little staring at.

Basically i use a table of 16*10 cells, with 48*48 sized tiles. For smooth scrolling, we need to move Bowie from cell A to adjacent cell B, progressively rather than at once.
I actually move the contents of cell A by x pixels and the contents of cell B by -x pixels in intervals (using setTimeout), and yes i'm surprised this works at all.  Smiley


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines