Now I just need some helpful hints from the community as to what I could use to display a hexagonal playing field of about 40x40 hex units. Trying to build an online strategy game with Ruby on Rails. Working out the methodology on paper and then scaffolding some. Any ideas which technologies I could possibly use ? other than just simple .gifs as icons and maybe overlayed css graphics ? Would that be the fastest page redraws on screen? Basically, I''m planning on having units move from one hex to another. What technologies or programming logic would best suit to display this? - Thad
Thad, I have done this before. In that occasion, I was using C# and could use its extensive graphics library to render the graphics in memory, convert them to png and stream them back to the client browser. I don''t know which graphics libraries are available from ruby. Probably the Gnome Canvas would be a good try. Another possibility could be to use SVG, which frees you from having a particular graphic library installed on the server and makes the dowlonads lighter, but not all clients support it natively. In any case, it is not difficult once you''ve worked the proper trigonometry out. Maybe these links can help you: http://www.gamedev.net/reference/articles/article1800.asp http://www.gamedev.net/reference/articles/article730.asp http://www.gamedev.net/reference/articles/article723.asp http://www.gamespp.com/algorithms/mouseHitsOnAHexagonGrid.html http://www.gamedev.net/reference/articles/article747.asp cheers Victor Thad Guidry wrote:> Now I just need some helpful hints from the community as to what I > could use to display a hexagonal playing field of about 40x40 hex > units. Trying to build an online strategy game with Ruby on Rails. > Working out the methodology on paper and then scaffolding some. Any > ideas which technologies I could possibly use ? other than just > simple .gifs as icons and maybe overlayed css graphics ? Would that > be the fastest page redraws on screen? Basically, I''m planning on > having units move from one hex to another. What technologies or > programming logic would best suit to display this? > > - Thad > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Thad Guidry schrieb:> Now I just need some helpful hints from the community as to what I > could use to display a hexagonal playing field of about 40x40 hex > units. Trying to build an online strategy game with Ruby on Rails. > Working out the methodology on paper and then scaffolding some. Any > ideas which technologies I could possibly use ? other than just > simple .gifs as icons and maybe overlayed css graphics ? Would that > be the fastest page redraws on screen? Basically, I''m planning on > having units move from one hex to another. What technologies or > programming logic would best suit to display this?This is really the domain of Macromedia Flash and not HTML (any kind). If you want to have a game with short interface response times, Flash is the way to go. Or you could try to use HTTPRequest technique. There is no explicit support for this in rails. But www.hieraki.org uses it. http://www.rubyonrails.org/show/XmlHTTPRequest%20LivePages%20wish But this is new terrain. To use it for a webapp is one thing, but to use it for a game is a completely different thing. Flash is ideal for this. -- Sascha Ebach
Hello, all! Long time listener, first time caller. Before considering moving to Flash for dynamic, on-screen redraws, check this link out. http://193.151.73.87/games/lemmings/ Certainly there is a solution, it''s just where your development skills lie and where you want to spend your time. I don''t know how Rails ends up tieing in with the user interaction that you have in mind, though. Maybe when pressing the "End Turn" button? Use Javascript and DHTML to highlight and restrict to legal moves, then process in Rails when a submit occurs? If you''re not comfortable enough with DHTML to know these things are possible, maybe a more server-bound approach is appropriate. But it would not be as "totally bitchin''". :-) If it were my project, I''d be trying to learn Rails, so I wouldn''t get too tied up in the DHTML solutions, but if you''ve got the market in mind for this game, I''d explore all my usability options. You''re in charge of defining the interaction, and now with the renewed interest in XmlHttpRequest, that''s certainly another tool in your kit. Rails could be getting involved constantly. Cheers, Jim