Page 1 of 1

Example source code for simple tile-laying game with zoom

Posted: 06 March 2024, 03:30
by tabicat
I'm a new BGA developer and I'm looking for sample source code for a tile-laying game that supports zooming. The best example would be Carcassonne, but I can't find the source code for that game. The game I'm developing has a single square board and the player can place a tile on that board. It's similar to Reversi, but the Reversi tutorial doesn't support zooming. I have a high-res jpeg of the board and tiles, and I would like to support showing that board (and the tiles that go on it) at any zoom level.

Re: Example source code for simple tile-laying game with zoom

Posted: 06 March 2024, 12:50
by leocaseiro
Try to use https://github.com/thoun/bga-zoom

Also, the discord is more active than the forum.

Re: Example source code for simple tile-laying game with zoom

Posted: 06 March 2024, 15:08
by nicotacotac
leocaseiro wrote: 06 March 2024, 12:50 Try to use https://github.com/thoun/bga-zoom

Also, the discord is more active than the forum.
This module is not intended for the tile laying purpose but rather zooming in/out a fixed board element (eg no panning included).

You will better to use the scrollmap component. There is an updated version of the "official" one (the one available by default on framework), developped by yannsnow. it is available here : https://github.com/yansnow78/bga_scrollmap

Re: Example source code for simple tile-laying game with zoom

Posted: 10 March 2024, 19:14
by c12h22o11_
There's a discord!?

Re: Example source code for simple tile-laying game with zoom

Posted: 10 March 2024, 20:14
by tabicat
c12h22o11_ wrote: 10 March 2024, 19:14 There's a discord!?
https://discord.gg/XZjT3r4t