最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I, using current web tech, generate a hexagonal, interactive map - Stack Overflow

programmeradmin3浏览0评论

I want to learn html5/current web techs, specifically to create a game.

Initially I want to be able to generate a top down, 2d map, made up of hexagonal tiles.

These tiles will be randomly generated with the usual environmental tiles (grass, plains, snow, lake, ocean etc...)

I want to be able to zoom in/out.

I will later want to have avatars represent the player(s)/AIs and assets on the tiles etc...

Where can I find a good starting place to learn the basics?

I want to learn html5/current web techs, specifically to create a game.

Initially I want to be able to generate a top down, 2d map, made up of hexagonal tiles.

These tiles will be randomly generated with the usual environmental tiles (grass, plains, snow, lake, ocean etc...)

I want to be able to zoom in/out.

I will later want to have avatars represent the player(s)/AIs and assets on the tiles etc...

Where can I find a good starting place to learn the basics?

Share Improve this question asked Jul 29, 2012 at 18:45 aSystemOverloadaSystemOverload 3,11418 gold badges51 silver badges74 bronze badges 1
  • I think your options are any of: Flash, HTML5 Canvas or SVG. However I wonder if this question is a bit too discursive for S/O, hence the downvotes! – halfer Commented Jul 29, 2012 at 19:12
Add a ment  | 

2 Answers 2

Reset to default 4

Check out this blog post http://build-failed.blogspot./2012/04/maps-and-boardgames-part-3-client-side.html. The author has done a 2D hexagonal tile map with zoom in and zoom out. You can study the code to get you started. You will have to add the avatars and a different map.

There's no one place to learn the basics, but this other blog is a good place to start on game programming: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex

Good luck!

For the start i reand you to use the canvas tag of HTML5 and a framework like http://calebevans.me/projects/jcanvas/index.php. You will find good documentations and examples on the net. Is very easy to learn but more code.

If you want less code and better results try a JS game engine from here : http://ntt/2011/01/31/66-open-source-javascript-game-engine-for-serious-developers.html.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论