Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Lightmapping/Shadows (https://forums.graalonline.com/forums/showthread.php?t=134257859)

12171217 02-04-2010 05:13 AM

Quote:

Originally Posted by Stefan (Post 1553940)
Looks pretty impressive :)
Wondering for what you need requesturlfromgamefile(), is the lightmap generator running on a webserver?

Yeah. The original implementation used pure GS2, but I wasn't happy with performance and didn't want the NPCServer to suffer.

Unfortunately, the light only collides with tiles because of this; I couldn't trust appending 512x512 bytes of GET data to get a half-res collision map, so I simply did 4096 bytes; the tile map. If you could enable POST on Testbed, though, instantly solved!

With a release, I'd like to host a central, PHP-powered hub for lightmap generation. Might as well go the extra mile; V6 isn't seeing a release soon and I need the requestfilefromblahblahblah function before release..

Also, is there a way to add more GUIControl elements to the scripted RC? Having access to this simply by opening scripted RC and having a simple weapon script that a server manager could install as a sort of "plugin" would be awesome.

coreys 02-04-2010 05:59 AM

Actually a really good idea to use a webserver to generate things like this. You should also release the PHP code so people can put it on their own webserver so you don't have all that stress on whatever server you're using.

12171217 02-04-2010 06:03 AM

Quote:

Originally Posted by coreys (Post 1554090)
Actually a really good idea to use a webserver to generate things like this. You should also release the PHP code so people can put it on their own webserver so you don't have all that stress on whatever server you're using.

Of course. I'm pro-open source; for the most part.

fowlplay4 02-04-2010 06:14 AM

Quote:

Originally Posted by 12171217 (Post 1554085)
Yeah. The original implementation used pure GS2, but I wasn't happy with performance and didn't want the NPCServer to suffer.

Did it work client-side?

Also the plugin thing: http://forums.graalonline.com/forums...ad.php?t=87384

12171217 02-04-2010 06:19 AM

Quote:

Originally Posted by fowlplay4 (Post 1554095)
Did it work client-side?

Of course, but the speed wasn't even comprable to what I ended up doing with the PHP server, and the client would be essentially immobilized until the rendering was done.

Might've been because I was using those panel display things; I could always try just writing the PNG information directly from an array, but then the max loop limit still comes into play, and I feel the PHP server is the most elegant solution.

coreys 02-04-2010 08:58 AM

Quote:

Originally Posted by 12171217 (Post 1554091)
Of course. I'm pro-open source; for the most part.

Good man ;)
If you're still looking for some performance improvements, and you're familiar with Python, the Python Imaging Library should be much faster than GD (PIL is written in C). If not, I hear imagemagick is faster than GD.

12171217 02-06-2010 05:51 PM

Quote:

Originally Posted by coreys (Post 1554108)
Good man ;)
If you're still looking for some performance improvements, and you're familiar with Python, the Python Imaging Library should be much faster than GD (PIL is written in C). If not, I hear imagemagick is faster than GD.

I'll port it to Python when I get ungrounded :< I'm on my phone.

Admins 02-07-2010 04:07 PM

For increasing the loop limit there is obj.maxlooplimit, for using TSockets you need to contact me for enabling them on your server (need the host/ip and port range).

Crow 02-07-2010 04:09 PM

Quote:

Originally Posted by Stefan (Post 1554760)
For increasing the loop limit there is obj.maxlooplimit, for using TSockets you need to contact me for enabling them on your server (need the host/ip and port range).

I never understood how to change the loop limit, never worked for me. Post an example, maybe?

Admins 02-07-2010 04:20 PM

Just set the variable in onCreated? this.maxlooplimit = 100000; or so, default is 10000

xXziroXx 02-07-2010 04:40 PM

Makes me think of this:


Crow 02-07-2010 04:56 PM

Quote:

Originally Posted by Stefan (Post 1554762)
Just set the variable in onCreated? this.maxlooplimit = 100000; or so, default is 10000

Yea, I tried that before. That didn't seem to work, still got the error.

calani 02-14-2010 10:47 AM

Incredible. Props!

cbk1994 02-14-2010 11:06 AM

Quote:

Originally Posted by Crow (Post 1554765)
Yea, I tried that before. That didn't seem to work, still got the error.

It works for me, but sometimes you have to let it "update". If you set it, then run the script again (or add a sleep after setting it) it tends to work.

Crow 02-14-2010 11:30 AM

Quote:

Originally Posted by cbk1994 (Post 1556101)
It works for me, but sometimes you have to let it "update". If you set it, then run the script again (or add a sleep after setting it) it tends to work.

Thanks for that hint, I'll give it a try later.


All times are GMT +2. The time now is 05:46 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.