RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4  Next 
View previous topic - View next topic  
Author Message
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Thu Jan 26, 2006 12:26 am    Post subject: [quote]

RuneLancer wrote:

Rendering a large map may take a few seconds if you don't know too well what you're doing with VB, whereas with your script rendering a mere row takes roughly a second or two.


Funny... on my AMD 1.5ghz the entire map was drawn without problems. Just how long was this "row" you're talking about?
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Thu Jan 26, 2006 12:33 am    Post subject: [quote]

[quote="RuneLancer"]Hehe, don't get me wrong, JS is a decent scripting language when it comes to 2D games if decent heuristics are used to carry the game across to the player. What applies to programming languages doesn't apply to scripting languages most of the time because the environment is restrained sensibly.

I think the big mommma of JS RPGs would be Triglav. Which runs decently enough. The reason for this is because of the way the game works: it doesn't use tiles. Instead, there are maybe just a handfull of images onscreen at once, one of them being a big-ass jpg representing the ENTIRE map. Obviously creating the map with tiles would've killed the game's performance: moving a control in a window is far easier and faster than updating an array of say, 1000 (25x40 tiles onscreen.) Characters are all just overlaid animated gifs; the only things that change are the control's position and the path of the image itself.

This works fine because the authors had the common sense to restrict what gets managed to a minimum to compensate for JS's inability to work without going through the browser for just about everything. On a small side-note, I have practically all of Triglav's client-side data, images, scripts, and whatnots... if anyone wants specific resources to pick at. ;)

Quote:

LG's problem seems to be that he intends to use JS like a programming language. That, and, no offense LG, sub-par code and algorithms. Ambition can only lead you so far; personal abilities and the tools you work with can make even the greatest project grind to a halt.


Strange, we've seen none of these great personal abilities from your side. I never intended to optimize it, as though I've not already made that plain. Only a fool optimizes code they plan to modify later.

Triglav runs on ActiveX controls. That's why you can't run it without IE.
Back to top  
RuneLancer
Mage


Joined: 17 Jun 2005
Posts: 441

PostPosted: Thu Jan 26, 2006 2:59 am    Post subject: [quote]

My tests with your map script were made with the test example. Rendering a map took roughly 4-5 seconds in total; very slow considering the size and simplicity of the map in question.

LordGalbalan wrote:
Strange, we've seen none of these great personal abilities from your side.

http://forums.rpgdx.net/viewtopic.php?t=1376
http://forums.rpgdx.net/viewtopic.php?t=1456
http://forums.rpgdx.net/viewtopic.php?t=1332
http://forums.rpgdx.net/viewtopic.php?t=1446&start=30
http://forums.rpgdx.net/viewtopic.php?t=1333
http://forums.rpgdx.net/viewtopic.php?t=1418
http://forums.rpgdx.net/viewtopic.php?t=1423
http://forums.rpgdx.net/viewtopic.php?t=1421&postdays=0&postorder=asc&start=75
http://forums.rpgdx.net/viewtopic.php?t=1437

Indeed.

Quote:
Only a fool optimizes code they plan to modify later.

There's this saying that goes something more or less like, build your house on a foundation of sand and it will break down in no time at all. Build a house on a foundation of stone, and it'll stand up to the toughest of storms.

Just food for thought.
_________________
Endless Saga
An OpenGL RPG in the making. Now with new hosting!

Back to top  
Nephilim
Mage


Joined: 20 Jun 2002
Posts: 414

PostPosted: Thu Jan 26, 2006 6:51 am    Post subject: [quote]

FWIW, it seems to run faster than what RuneLancer is describing under Safari on a G4 laptop - I don't see it rendering row by row. It still takes a second or so to redraw the map, though, so it's too slow for scrolling, but it would probably work for a screen-by-screen RPG.

Then again, the app seems to be cropping the map data down to 32x32 tiles. Maybe RL removed that restriction, and that's why he was able to get it to slow down. And that's a reasonable thing to do - chances are good that people would want maps larger than 32x32.

LordGalbalan wrote:
Triglav runs on ActiveX controls. That's why you can't run it without IE.


(Hadn't seen Triglav before RL mentioned it. Interesting.)

The fact that Triglav had to offload processing onto an ActiveX control does not bode well for Javascript being able to support games like that. Is the whole game in the ActiveX control, or is it Javascript with an ActiveX control to speed up a bottleneck somewhere?
_________________
Visit the Sacraments web site to play the game and read articles about its development.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Jan 27, 2006 12:48 am    Post subject: [quote]

Nephilim wrote:
Then again, the app seems to be cropping the map data down to 32x32 tiles. Maybe RL removed that restriction, and that's why he was able to get it to slow down. And that's a reasonable thing to do - chances are good that people would want maps larger than 32x32.


Here are the instructions.

Quote:

To use:

Fill the textarea box with values in the following form,
seperating each value with a semicolon
- Map name (as text/string data; may leave blank)
- width of map (in tiles)
- height of map (in tiles)
- tile graphic dimensions (single value for width and height)
- number of available tile graphics
- tile graphic name (may leave blank)
- tile graphic filename
- repeat for each available tile graphic
- map data, stored as tile graphic indices in order of description.
Data begins at the first tile of the first row and continues to the
last tile of the last row.


Example:
Make an 8x8 chessboard map with two tile graphics 32x32 pixels each,
one white and one black.

Chessboard;8;8;32;2;WhiteTile;WhiteTile.gif;BlackTile;BlackTile.gif;
1;0;1;0;1;0;1;0;
0;1;0;1;0;1;0;1;
1;0;1;0;1;0;1;0;
0;1;0;1;0;1;0;1;
1;0;1;0;1;0;1;0;
0;1;0;1;0;1;0;1;
1;0;1;0;1;0;1;0;
0;1;0;1;0;1;0;1;


I don't know what kind of computer RL is trying to run this thing on, but folks, that example is just 64 table squares. It shouldn't take a modern computer--hell, even a decade old computer--that long to render something so simple. But consider, he's probably accounting for the actual loading of the tiles themselves. (which of course, can't be preloaded because they are at the user's discretion)

I could make it faster by removing a few function calls, but that would spoil the learning environment. Never teach optimization over technique.

Furthermore, this is a generator, not a loader. It generates the map from the start, with custom size. A loader would only need to reload the pictures. Much faster.

RuneLancer wrote:
My tests with your map script were made with the test example. Rendering a map took roughly 4-5 seconds in total; very slow considering the size and simplicity of the map in question.

LordGalbalan wrote:
Strange, we've seen none of these great personal abilities from your side.

http://forums.rpgdx.net/viewtopic.php?t=1376
http://forums.rpgdx.net/viewtopic.php?t=1456
http://forums.rpgdx.net/viewtopic.php?t=1332
http://forums.rpgdx.net/viewtopic.php?t=1446&start=30
http://forums.rpgdx.net/viewtopic.php?t=1333
http://forums.rpgdx.net/viewtopic.php?t=1418
http://forums.rpgdx.net/viewtopic.php?t=1423
http://forums.rpgdx.net/viewtopic.php?t=1421&postdays=0&postorder=asc&start=75
http://forums.rpgdx.net/viewtopic.php?t=1437

Indeed.


Listen RL, I don't attack your work. Hell, I barely pay attention to it. Why not just keep your comments to yourself if you have nothing but hate to spew? You've never yet said anything that has helped me at all, and I'm pretty sure the same holds for me to you.

Quote:
Only a fool optimizes code they plan to modify later.


Quote:

There's this saying that goes something more or less like, build your house on a foundation of sand and it will break down in no time at all. Build a house on a foundation of stone, and it'll stand up to the toughest of storms.

Just food for thought.


That's right. Which is why you keep TWO versions of your distributed code: the code that is optimized (which you just use for distribution) and the code that isn't. (which you use for extension development)

I didn't make this app for "cut'n'paste"; that'd be pointless. Furthermore I've never seem a decent app made from just cutting and pasting other people's code without understanding how to use it, so why should I encourage it?


Last edited by tcaudilllg on Fri Jan 27, 2006 1:52 am; edited 1 time in total
Back to top  
RuneLancer
Mage


Joined: 17 Jun 2005
Posts: 441

PostPosted: Fri Jan 27, 2006 1:10 am    Post subject: [quote]

The amount of research you put into your work is staggering.

http://javascript.internet.com/miscellaneous/preload-images.html

It shouldn't take a genius to figure out how to avoid loading images all the time from that simple tidbit of code. Or did you assume that every browser handles caching the same way?

Yes, yes, you did. :)
_________________
Endless Saga
An OpenGL RPG in the making. Now with new hosting!

Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Fri Jan 27, 2006 1:41 am    Post subject: [quote]

Oy: I swore that I would not post anything more in response to He-Whom-Shall-Not-Be-Named; I even tried my best when I saw complete and utter bullshit mentioned earlier. However, the following is a straw the weight of which my back can no longer support. My apologies...

LordGalbalan wrote:
That's right. Which is why you keep TWO versions of your distributed code: the code that is optimized (which you just use for distribution) and the code that isn't. (which you use for extension development)


Bullshit. Combined with the quote that RuneLancer was arguing against, which is just more of your ignorant FUD, this just goes to show that you have no idea what you are talking about!

Let me make a small note here: sure, it is good to have "frozen" distribution releases of a product which are separate from "active" development releases; in fact, the SVN book even so much as suggests that one of the best ways in which to utlized subversion is to do that very thing.

However, what you describe is completely asinine: part of the reason why a developer "optimizes" code --- which, I would like to point out, you are misusing the term; more on this below --- is to make further, future development less painful. This is what refactoring is for: convert the development build over to something as abstract (and, contrariwise, as simple) as possible to ease design.

"Optimization" is often equated to speed/space efficiency; this is not always the case. Indeed, one of the chief aspects of optimizing software is in minimizing the amount of code it takes to describe a system. This mystical technique allows the programmer to reduce the number of locations in which bugs may creep, while allowing for maximum possible future reuse sans editing the existing framework.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Jan 27, 2006 1:53 am    Post subject: [quote]

RuneLancer wrote:
The amount of research you put into your work is staggering.

http://javascript.internet.com/miscellaneous/preload-images.html

It shouldn't take a genius to figure out how to avoid loading images all the time from that simple tidbit of code. Or did you assume that every browser handles caching the same way?

Yes, yes, you did. :)


*sigh* dumbass.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Jan 27, 2006 1:55 am    Post subject: [quote]

LeoDraco wrote:
Oy: I swore that I would not post anything more in response to He-Whom-Shall-Not-Be-Named; I even tried my best when I saw complete and utter bullshit mentioned earlier. However, the following is a straw the weight of which my back can no longer support. My apologies...

LordGalbalan wrote:
That's right. Which is why you keep TWO versions of your distributed code: the code that is optimized (which you just use for distribution) and the code that isn't. (which you use for extension development)


Bullshit. Combined with the quote that RuneLancer was arguing against, which is just more of your ignorant FUD, this just goes to show that you have no idea what you are talking about!

Let me make a small note here: sure, it is good to have "frozen" distribution releases of a product which are separate from "active" development releases; in fact, the SVN book even so much as suggests that one of the best ways in which to utlized subversion is to do that very thing.

However, what you describe is completely asinine: part of the reason why a developer "optimizes" code --- which, I would like to point out, you are misusing the term; more on this below --- is to make further, future development less painful. This is what refactoring is for: convert the development build over to something as abstract (and, contrariwise, as simple) as possible to ease design.

"Optimization" is often equated to speed/space efficiency; this is not always the case. Indeed, one of the chief aspects of optimizing software is in minimizing the amount of code it takes to describe a system. This mystical technique allows the programmer to reduce the number of locations in which bugs may creep, while allowing for maximum possible future reuse sans editing the existing framework.


Completely true, I should have mentioned that I meant "optimization for speed". And I'm pretty sure that's what RL meant, too.
Back to top  
js71
Wandering DJ


Joined: 22 Nov 2002
Posts: 815

PostPosted: Fri Jan 27, 2006 2:15 am    Post subject: [quote]

LordGalbalan wrote:
RuneLancer wrote:
The amount of research you put into your work is staggering.

http://javascript.internet.com/miscellaneous/preload-images.html

It shouldn't take a genius to figure out how to avoid loading images all the time from that simple tidbit of code. Or did you assume that every browser handles caching the same way?

Yes, yes, you did. :)


*sigh* dumbass.

Um. Nice retort, there. I see you managed to address all of his points in one clearly intelligent, all-encompassing statememt of confident superiority. Clap... Clap... Clap.
Back to top  
RuneLancer
Mage


Joined: 17 Jun 2005
Posts: 441

PostPosted: Fri Jan 27, 2006 3:06 am    Post subject: [quote]

Josiah Tobin wrote:

Um. Nice retort, there. I see you managed to address all of his points in one clearly intelligent, all-encompassing statememt of confident superiority. Clap... Clap... Clap.

Meeeh... It's all good Josiah, I deeply enjoy crushing LG's little "moments."


http://www.geocities.com/mapedit_rpgdx/maped.html

(Only tested on IE, dunno about FF; really, I didn't spend much more than a half hour building it. I guess at worse the display may be a little wonky with FF.)
_________________
Endless Saga
An OpenGL RPG in the making. Now with new hosting!

Back to top  
zenogais
Slightly Deformed Faerie Princess


Joined: 10 Jan 2006
Posts: 34

PostPosted: Fri Jan 27, 2006 3:35 am    Post subject: [quote]

Looks like a decent map editor to me, and I'd be interested to try it out on Firefox. Very nice little program btw, and a fun little tool to play with.

Last edited by zenogais on Fri Jan 27, 2006 1:47 pm; edited 1 time in total
Back to top  
Nephilim
Mage


Joined: 20 Jun 2002
Posts: 414

PostPosted: Fri Jan 27, 2006 4:30 am    Post subject: [quote]

RuneLancer wrote:
http://www.geocities.com/mapedit_rpgdx/maped.html


Nice, RL. Runs fine in Safari and very intuitive to use.
_________________
Visit the Sacraments web site to play the game and read articles about its development.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Jan 27, 2006 11:02 am    Post subject: [quote]

RuneLancer wrote:


http://www.geocities.com/mapedit_rpgdx/maped.html

(Only tested on IE, dunno about FF; really, I didn't spend much more than a half hour building it. I guess at worse the display may be a little wonky with FF.)


Tested with Mozilla 1.6, it works fine. Nice work :)
Back to top  
BadMrBox
Bringer of Apocalypse


Joined: 26 Jun 2002
Posts: 1022
Location: Dark Forest's of Sweden

PostPosted: Fri Jan 27, 2006 9:37 pm    Post subject: [quote]

I tested it with Mozilla 1.5. Works well. And now I understand this thread. Didn't know about 1.6... much get it.
_________________
Back to top  
Post new topic Reply to topic Page 2 of 4 All times are GMT
Goto page Previous  1, 2, 3, 4  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum