tile-engine

Mapping a branching tile path

烂漫一生 提交于 2020-01-04 15:54:46
问题 I'm working on a game (and have asked a couple questions on it already), and now I have another question to ask of you guys. The level format in this game is set up as a tilemap of Uint16's (I'm using SDL) which are indices into an array of tilemapData structs. One of the bits of the tilemapData struct is the isConductive bit/boolean. The use of this bit is basically to create paths that connect various objects together into a single "powerNet." I've got some code below on the current method

C# XNA Random tile engine

不打扰是莪最后的温柔 提交于 2019-12-13 07:12:29
问题 public void Draw(SpriteBatch theSpriteBatch) { Random rand = new Random(); for(int y = 0; y < map.GetLength(0); y++) { for(int x = 0; x < map.GetLength(1); x++) { theSpriteBatch.Draw(tile[rand.Next(0,3)], new Rectangle(x*tileWidth,y*tileHeight,tileWidth,tileHeight), Color.White); } } } When I do this it just flickers the tiles and constantly redraws them. What do I do to get the random effect with it only drawing once? Is there a way I could click on these tiles with the mouse and have them

HTML5 Tile Engine

最后都变了- 提交于 2019-12-03 07:20:53
问题 Where can I find a tile engine for HTML5 <canvas> , for writing 2D games? 回答1: Possibly: http://www.effectgames.com/effect/ and in particular http://www.effectgames.com/effect/#Article/docs/Sprites_and_Tiles_Guide However note that effect is free to use but proprietary and not open source. Other Javascript/Canvas game engine libraries that would make it easy (but may not have specific tile support/documentation): http://github.com/kesiev/akihabara http://gamejs.org/ http://code.google.com/p

HTML5 Tile Engine

寵の児 提交于 2019-12-02 20:52:29
Where can I find a tile engine for HTML5 <canvas> , for writing 2D games? Possibly: http://www.effectgames.com/effect/ and in particular http://www.effectgames.com/effect/#Article/docs/Sprites_and_Tiles_Guide However note that effect is free to use but proprietary and not open source. Other Javascript/Canvas game engine libraries that would make it easy (but may not have specific tile support/documentation): http://github.com/kesiev/akihabara http://gamejs.org/ http://code.google.com/p/cakejs/ http://gamequery.onaluf.org/ Sites you might want to follow: Mozilla Labs Gaming Badass Javascript