3D games... again

Game development with Board Game Arena Studio
Post Reply
User avatar
Morgalad
Posts: 108
Joined: 17 January 2017, 20:46
Contact:

3D games... again

Post by Morgalad »

Hi all...

After some period of inactivity I am back coding, I was developing Dragon Keeper for our fellow ZousElzozo but I faced some issues during this.
Why? because of the current approach many of us is using in the Studio to move divs and game elements is based on Dojo animate and this does not work very well on absolute positioned elements and it has a lot of issues when moving objects from one absolute item to other...

Instead of using the power of the css animations and the translate3D functions embeded on the browser (the translate3D css has a huge advantage over the translate function: it uses the graphic hardware to move and calculate the position of transformed divs into the browser)

see this as an example of how fast this could be:
https://keithclark.co.uk/articles/calc ... rms/demo6/

Under the hood there is only CSS ... no funny stuff like Adobe's Flash or MS Silverlight...

See how a game figurine would look:

https://codepen.io/Morgalad/pen/LzGZGJ? ... orks=false

I've based my new approach on one key point:

Following the guidance of this article I'm now using the vertex "a" of all divs to calculate the position in space of any element inside of the browser:

https://keithclark.co.uk/articles/calcu ... ransforms/

So when moving game elements I only need to compare the vertex a ... and apply a native css animation.

For anyone interested this is how the game looks:
Image
Cheers...
Morgalad

Developer of: Incan Gold , Takara Island , Taluva and Veggie Garden
User avatar
Morgalad
Posts: 108
Joined: 17 January 2017, 20:46
Contact:

Re: 3D games... again

Post by Morgalad »

For those interested this has given some fruits :D

http://en.studio.boardgamearena.com/#!g ... ame=taluva

and

http://en.studio.boardgamearena.com/#!g ... agonkeeper

Please open these on the studio... HINT: use the secondary mouse click to drag around the scene

You wont be disapointed ;)
Cheers...
Morgalad

Developer of: Incan Gold , Takara Island , Taluva and Veggie Garden
Post Reply

Return to “Developers”