BBGameZone.net PBBG Network | BuildingBrowserGames | Top-PBBG
September 03, 2010, 01:59:36 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Our Scripts Vault contains many game scripts that you can use to create your own game!
 
  Home   Forum   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Tile based map using canvas  (Read 838 times)
jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« on: August 28, 2009, 08:14:47 AM »

I'm experimenting with the canvas element to create a tile based map. Right now it's still a small and not very useful script, but please take a look at it.

So if you have any suggestions, or the script can be useful to you, feel free to comment / use the script.
Logged

jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #1 on: August 28, 2009, 01:46:44 PM »

I have a question. Does anyone have a good idea to go about terrain transitions ?

There's a good article about it here: http://www.gamedev.net/reference/articles/article934.asp

But if someone has another way I'd love to hear it. Also, although it doesn't look that hard, I don't fully understand what he's saying in the article. So if it's explained differently, or something, that would also be helpful.
Logged

jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #2 on: August 29, 2009, 07:10:35 AM »

It was a nice experiment, but I'm afraid that a tile based map with canvas would really be a pain. Because clickable areas are a pain...

So if anyone is curious for a map with canvas, I suggest you just go with a more 'standard' method.
Logged

Fizzadar
Level 8
*

Reputation: 0
Offline Offline

Posts: 39


Rawr!


View Profile WWW
« Reply #3 on: September 02, 2009, 11:13:11 AM »

For my maps I just use a series of div's each a certain width and height, and float them alongside each other. The actual map is simply one background image, but could be easily made up of blocks, so you could have a "live" map editor, but photoshop does that anway...
Logged

~Fizzadar
jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #4 on: September 04, 2009, 04:56:58 PM »

Now I know a little bit more about image maps I know clickable areas are possible. You need to put a transparent image on top of the canvas element, and create an image map. That's it.
Logged

raines80
Level 8
*

Reputation: 0
Offline Offline

Posts: 44



View Profile
« Reply #5 on: September 24, 2009, 09:14:07 AM »

Clickable maps using tiles is time consuming, but can be accomplished.... my question on this is thus...


Is there a way to do a tile based map while having an indepent charcter that would react to the canvas (ie; mountains, holes, whatever....)?  The reason I ask is because I have developed a couple of maps for navigation within my game, but I would like to have my character on the map move to the nav points and not have him floating above the canvas....
Logged
jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #6 on: September 25, 2009, 09:47:30 AM »

Check out this: Game Development with JavaScript and the Canvas element

That may help to see the potential of the canvas element.
Logged

jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #7 on: March 05, 2010, 05:37:42 PM »

I have a new blogpost up over at BBGameDesign with a very basic game map script (but more advanced than the previous snippet). There's even a hand drawn programmer art tile set to go with it and an actual demo Smiley. Nothing difficult but it might help some newer programmers.

http://www.bbgamedesign.com/pbbg-community/basic-game-map
Logged

raestlyn
Level 29
**

Reputation: 4
Offline Offline

Posts: 461


View Profile
« Reply #8 on: March 05, 2010, 09:08:44 PM »

Sorry Janne, but it doesn't work for me in FF, in IE or in Chrome.
Logged



I can send you pics of my cocks if you want reference.
jannesiera
Level 35
**

Reputation: 5
Offline Offline

Posts: 1,014



View Profile WWW
« Reply #9 on: March 06, 2010, 03:55:55 AM »

Sorry Janne, but it doesn't work for me in FF, in IE or in Chrome.

I needed to update a link somewhere, I'm sorry, but it works now Cheesy.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
SimplePortal 2.2 © 2008-2009
Valid XHTML 1.0! Valid CSS!