How do I set a tiled-board for a chess-like board game?

0 favourites
From the Asset Store
Beautiful Black & White Chess Pieces for Chess Game.
  • I am new to Construct. Long time ago, I saw there was a plugin for C2 to make chess-like boards as backgrounds for board games.

    I want to insert a background picture and set a grid of tiles on it, to move the tokens. Yet, I also need some of the tiles to be of different size from the others.

    How can I do that?

    I am trying the tiled background item and the map tile, but they seem to be planned as obstacles for a platform game more than boxes for a board game. Maybe I am missing something...

  • Well you can use a regular sprite, using different frames.

    Check out the How do I FAQ for Construct 2 at the category "Tiling / Grid" to have examples on how to do it.

    The tiled background or the tilemap plugins can be used as scenery and not obstacles.

    You put them in the background and disable their collisions, they won't interfere with other elements.

    It sounds more like you had a different issues in your tests with them (or perhaps got confused in some unexpected interaction).

    Have you gone through the article manual for each of them to see what they can and are supposed to do ?

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Actually, all my trouble came from not being able to adapt the tile movement. Linking the visual part with the logic one. I need the tokens to move around the board with tile measurement, not pixel measurement. Took a look at the C2 tutorial for Rex's board plugin and have tried that way. Kt seems nlw I can set events saying "move a number of tiles" or "if it is in that particular tile..." Am I on the right path or does it exists a way to do that all straight on with the tiled background?

  • Check Construct 3 release 122 - construct.net/en/make-games/releases/beta/r122 - It now contains a new official Tile Movement behavior.

    Perhaps it will provide you with the movement you need.

  • Wow! Quite impressive. Maybe is what I was looking for. I was wondering how could I fix the grid movement through pixel measurement with a tile map or background.

    I have been messing with Rex's board plugin. Let's try this way to see what can I get.

  • Well, I've been trying to do the thing with tilemap and tile movement but I got stuck in the first place. I don't know what is happening, to be honest. I import a picture to the image editor, set the tilemap size according to the layout, tiles size... Everything is fine and the inage editor shows exactly what I intend to. Yet when I go to the layout view, it is blank. No picture, no tiles, nothing. Just the blue border showing that the object is there. The preview of the object in the bar does actually show the picture. But not in the layout. What I am doing wrong???

  • Make sure your graphic card drivers and browsers are up to date.

    If you are still having issues, provide a copy (.c3p) of your project so that others can investigate.

    Currently, it is just a guessing game and no way to provide you with an accurate answer.

  • santiagoestrade have you used the tilemap tool before? It sounds like you've created the tiles but haven't painted any tiles to the object.

    The tilemap plugin allows you to create a small set of tiles, then you can use "paint" those tiles to the object to create an image. To "paint" a tile you can you the tilemap bar to select a tile and then you can just draw onto the object in the layout view.

    The demonoire demo is a good example of tilemap usage. It uses 2 small tilemaps to draw all of the backgrounds for something like 20 layouts. It also has a separate invisible tilemap that it uses for collisions, a handy trick for grid based games.

  • You're right. I had not used it before. I imported the image which I wanted to be paintes in the image editor and it appeared as grided, so I thought that was it. So I could even just insert my picture as a background in 0 layer, since it has no collisions, and set a blank tilemap over it in 1 layer. Am I right?

  • If you've got an image you want to use as your background the simplest solution is to create a sprite and put and put the image into that.

    You don't need to worry about collisions yet. Objects with collisions won't block character movement, only items with the "solid" behaviour will.

    I don't think you need the tilemap object, the "tile movement" is a behaviour you can apply to sprite, etc. it doesn't actually need a tilemap.

    I made a quick example of the tilemap plugin and tile movement behaviour for you.

    dropbox.com/s/dvpzoo5p3qalx4b/tile_movement_example.c3p

    The tilemap has 1 white and 1 black tile, which I've just painted as a chess board like grid. Then for a character I've created a sprite, which I painted red. I attached the tile movement behaviour to the sprite, and tweaked the positioning so that it sits in the middle of a space.

  • Thanks a lot!! I am checling the example roght now and will take a deep look also to the Demonoire one. So, I could just use tile movement. That's even better!!

  • I am starting to believe it is my version of C3 in Chrome via Mobile. In your example, there is nothing in the event sheet, the tilebar shows nothing and there is just the drawn tile for the background. How did you made it loop to create full background? It seems the same way I did mine. Just that my picture is a map which already contains all the tiles, so it needn't be repeated in the layout. Just one grided picture/map as a background.

    How can I attach my c3p to the post, btw?

  • How did you made it loop to create full background?

    He did not, he did draw using the tilemap tab, directly to the layer.

    How can I attach my c3p to the post, btw?

    In the same way he did, host your file on a host service and put the URL to the file in your post.

  • I can paint to the tilemap in the bar. I also can paint any tile separately in the editor. When looking there, the imported picture does show. The issue comes on the layout and the preview. No picture at all. I tried to add an instance, just in case it didn't create it automatically. Same output.

    Here is the c3p:

    1drv.ms/u/s!AojCIgmN1VlPiT9oKnbUiHXCBSpG

    I know it must be something really really stupid and basic that I am not getting to catch.

  • As indicated in the tilemap manual article : construct.net/en/make-games/manuals/construct-3/plugin-reference/tilemap

    You have to draw your tilemap on the layout (which is currently not the case in your c3p file.

    In the tilemap tab, select the pencil icon and select a tile that has some color on it.

    Then, simply click in the layout and it will draw the selected tile.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)