[example] basic tile based drawing with camera

69 views
Skip to first unread message

alex.symbroson

unread,
Feb 1, 2018, 1:12:42 AM2/1/18
to DroidScript
In case you want to create a tile vased game you often need a camera to follow tge player or smth. So I created a little example for you. I tried to make it as short and efficient as possible without losing readability - will need your feedback to be sure it is :)

On the request of @ManuelLopes I will also make an example with pathfinding. I had posted an A* example in the past - so I will just take it and include it somehow to the current code

happy coding!

GLView Tile-Cam Demo.spk

Manuel Lopes

unread,
Feb 1, 2018, 6:06:57 PM2/1/18
to DroidScript
very thanks alex,you are great

Valerio Falco

unread,
Feb 2, 2018, 1:33:03 PM2/2/18
to DroidScript
very thanks ale

alex.symbroson

unread,
Feb 4, 2018, 7:04:12 AM2/4/18
to DroidScript
I found out that my astar implementation was very inefficient. Most implementations are using a linked list, or even binary trees for that. So I want to suggest this site for the astar algorithm in javascript:
https://briangrinstead.com/blog/astar-search-algorithm-in-javascript/

Best regards :)

Reply all
Reply to author
Forward
0 new messages