How much GD is too much?
Posted: Sun Dec 17, 2006 12:57 pm
Im working on a MMORPG and the maps are generated with GD by repeating the background image over a 320x320 pallate minimum, tiles being 16x16. On top of that tiles 16x16 to 80x80 are layred ontop of it, and one final image is saved to the server. Now theres 2 ways I can do this, generate the new map image every single time a new single object tile is layered on [through the map editor you add tiles such as barriers 1 at a time, via form], so that could be 50 times per 1 map edit, and thats a lot considering theres going to be several maps created a day.
So roughly GD will be creating around 50 320x320 images, 1 about every 5 seconds [though the form is filled out and submited 1 at a time, its not a looped action]. The maps when generated will have maybe 6 images at most accessed, and the background repeated 200 times.
Is that too much? Will it cause too much lag or use up to many resources? Right now im running Apache on windows with PHP4, but when this game comes closer to completion I will be investing in a small hosting package, just minimal needs.
I could also just update the image all at one time once your done editing, however the image wouldnt get updated if the editor forgets to click the update map image link, and while your editing the map, people navigating it at the same time will run into random things they dont see, and will completely cause problems (not that this would 100% not happen with the other way, it would only happen if the user slipped between the query insert/update and the GD image write).
So what do you think, would I be overusing GD if I did it so rapidly like that? Or should I just create the new image when all the editing is done?
So roughly GD will be creating around 50 320x320 images, 1 about every 5 seconds [though the form is filled out and submited 1 at a time, its not a looped action]. The maps when generated will have maybe 6 images at most accessed, and the background repeated 200 times.
Is that too much? Will it cause too much lag or use up to many resources? Right now im running Apache on windows with PHP4, but when this game comes closer to completion I will be investing in a small hosting package, just minimal needs.
I could also just update the image all at one time once your done editing, however the image wouldnt get updated if the editor forgets to click the update map image link, and while your editing the map, people navigating it at the same time will run into random things they dont see, and will completely cause problems (not that this would 100% not happen with the other way, it would only happen if the user slipped between the query insert/update and the GD image write).
So what do you think, would I be overusing GD if I did it so rapidly like that? Or should I just create the new image when all the editing is done?