Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About FatManatee

  • Rank
  1. I have a simple question. What are the correct size for a generic tile? Depend from resolution? For example; I have a canvas 500x500 pixel... the tile, better 16x16px or 32x32? How to decide?
  2. FatManatee

    Event in the 2D Tile Map

    True. Thanks all! ..and, tile size? I create tile 32x32. Better 16x16 pixel?
  3. FatManatee

    Event in the 2D Tile Map

    Sure, it's simple. ^^ Next question, i create a class Tile and class Item. Tile { this.with; this.height; this.item = new item; } Item { this.with; this.height; this.x; this.y; } So, collidable == true if the next position of my character is in the item's area. Example: The tile represents grass with one rock; the rock is a Item(). Collidable == true if: Item(x) <= EnityNextPosition(x) < item(x) + item.width && Item(y) <= EnityNextPosition(y) < item(y) + item.height [/quote] This is my general idea for manage all events. The question is: is a good idea? Or exist better solutions? I'm afraid of wasting a lot of ram! I'm at work too, sorry for my bad post. XD
  4. Hi, i'm a beginner and i try to build a 2D Game using <canvas> element and JavaScript. I create a map and a character.. now, i use the keyboard to move a character in the map, but i have many question. What is the theory for collisions and event? I build a map so: var map = { [0, 0, 0], [0, 1, 1], [0, 0, 1] } For example, 0 is water, and 1 is grass. My class render the canvas with this matrix, associating the values with the images. The problem is: my character, walking in the water! Should I create a new matrix? For example: var map = { [{0, event}, {0, event}, {0, event}], [{0, event}, {1, event}, {1, event}], [{0, event}, {0, event}, {1, event}] } ...is the correct way? I don't find any tutorial for solve this problem! Thanks ^^
  5. *EDIT: sorry, wrong section.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!