Best language to create a dynamic image?
Best language to create a dynamic image?
I would love to hear the members thoughts and recommendations about which language would be most useful for making a dynamic map display for my game. The map would be displayed to the player and would be made up of individual squares that would be arranged based on a numbering system.
I have actually created something in php that will dynamicly create the map and send it to the client browser, but I am concerned that php is a server side script and I was wondering if I should be using a language that would create the map on the client side.
I have actually created something in php that will dynamicly create the map and send it to the client browser, but I am concerned that php is a server side script and I was wondering if I should be using a language that would create the map on the client side.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Best language to create a dynamic image?
Language isn't important. Most of the web-based dynamic image effect extensions available are available for all major web languages. A great, high-performance image manipulation library is ImageMagick. As an example of how language-agnostic these things can be, ImageMagick can be run with Ada, C, C++, Java, Lisp, ASP.NET, Pascal, Perl, Python, Ruby and more.
The indelible lord of tl;dr
Re: Best language to create a dynamic image?
Thanks for the response Jackolantern.
If I were to use ImageMagick with Javascript would this allow the images to be downloaded to the client and combined to create a game map? I was thinking that if I could do a one time download of the images to the client and manipulate them on the client it would be more efficient for bandwidth purposes.
If I were to use ImageMagick with Javascript would this allow the images to be downloaded to the client and combined to create a game map? I was thinking that if I could do a one time download of the images to the client and manipulate them on the client it would be more efficient for bandwidth purposes.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Best language to create a dynamic image?
Sorry, just saw that the main question was client-side vs. server-side. And the answer to that depends on how the map needs to work. If you are wanting to have mostly a static map, and just move the player around on it (like an overhead map similar to the map screen in World of Warcraft or Everquest) then Javascript would save the most amount of bandwidth because every time a dynamically generated map is sent to the browser, the whole image must be sent and displayed. With Javascript you can just send the static map image and the player icon once, and reuse it from the browser's cache every time. If the map is more on the ground level, and will be changing a lot, there is probably not much difference.
However, ImageMagick is a server-side technology and cannot be used with Javascript. What you could do for making the map dynamic with JS very simply without AJAX is to just use the same static map on the page inside of a div tag. Then load the player icon and absolutely position it within the map div based on invisible location information dynamically generated in the PHP code. Or you could update the player location info seamlessly with AJAX, but that would be much more complicated because the rest of the game would need to operate seamlessly to support it.
However, ImageMagick is a server-side technology and cannot be used with Javascript. What you could do for making the map dynamic with JS very simply without AJAX is to just use the same static map on the page inside of a div tag. Then load the player icon and absolutely position it within the map div based on invisible location information dynamically generated in the PHP code. Or you could update the player location info seamlessly with AJAX, but that would be much more complicated because the rest of the game would need to operate seamlessly to support it.
The indelible lord of tl;dr
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Best language to create a dynamic image?
have you watched the forsaken sanctum 1.0 tutorials or at least the overview?
It shows how it is done server side and the lag is minimal, and my code can very easily be made to run faster.
It shows how it is done server side and the lag is minimal, and my code can very easily be made to run faster.
Re: Best language to create a dynamic image?
Prior to last night I had only watched some of the browser mmorpg videos. Last night I watched 3 of the Forsaken Sanctum videos. I'll try to watch all of the videos you have made and see what I can learn from them.
I do have a fairly good php book that covered working with images pretty well so I can create the images I need with php. I was just wondering if using php for images would be a problem since it works from the server side.
There is so much information on this site, I think it will take me awhile to check it all out. I'm trying not to put too much pressure on myself, and just trying to keep the process of creation fun.
Thanks again for the responses and I will continue to try and absorb all this material.
I do have a fairly good php book that covered working with images pretty well so I can create the images I need with php. I was just wondering if using php for images would be a problem since it works from the server side.
There is so much information on this site, I think it will take me awhile to check it all out. I'm trying not to put too much pressure on myself, and just trying to keep the process of creation fun.
Thanks again for the responses and I will continue to try and absorb all this material.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Best language to create a dynamic image?
all good, I am not pushing you, just thought I would point you over there to see if that is what you were meaning. 
Re: Best language to create a dynamic image?
Halls,
Thanks for the info. I think what you did in Forsaken Sanctum is exactly the kind of stuff I am trying to do with my dynamic map and I'm sorry if what I said made anyone feel like I thought I was feeling pressure because I definitely do not feel pressured by anyone here.
I just feel a little bit behind in my knowledge compared to other people on this site, but I don't want to put pressure on myself to try to catch up. I guess I was just trying to say that I feel like I may be setting a more casual pace on how fast my game is made compared to some of the people here.
Thanks for the info. I think what you did in Forsaken Sanctum is exactly the kind of stuff I am trying to do with my dynamic map and I'm sorry if what I said made anyone feel like I thought I was feeling pressure because I definitely do not feel pressured by anyone here.
I just feel a little bit behind in my knowledge compared to other people on this site, but I don't want to put pressure on myself to try to catch up. I guess I was just trying to say that I feel like I may be setting a more casual pace on how fast my game is made compared to some of the people here.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Best language to create a dynamic image?
casual pace is the way to go my friend. Do not rush yourself. There are plenty here just learning and there are plenty of advanced users. Good combination if you ask me.
Take your time and ask questions along the way. You will be caught up in no time.
Take your time and ask questions along the way. You will be caught up in no time.
Re: Best language to create a dynamic image?
Don't know why I didn't see this earlier. I recommend using CSS sprites over imagemagick, I'll have an indepth reasoning when I finish classes for the spring and can actually record dev diaries for my projects.