+ 4

Isometric Coordinates

I recently got a game design book that shows the formula for isometric coordinates. It states this: isometricX = x - y; isometricY = (x + y) / 2; I have attempted this here but it won't work https://code.sololearn.com/WfV0yz5UA3BI/?ref=app How do you successfully convert 2d points to isometric points? https://www.dropbox.com/s/9nfa8cnqzdrkldu/IMG_20190809_132844.jpg?dl=0

9th Aug 2019, 12:25 PM
Clueless Coder
Clueless Coder - avatar
9 ответов
+ 7
Instead of recalculating only the upper left point, calculate new coordinates for all the four corners, and use lineTo and fill to connect the four points at their new coordinates. https://code.sololearn.com/W5j9K3ydT02L/?ref=app
9th Aug 2019, 12:59 PM
Gordon
Gordon - avatar
+ 6
114-120 I did it yesterday haha - what a coincidence https://code.sololearn.com/WwfbeaEW0UCJ/?ref=app
10th Aug 2019, 7:35 AM
Martin Möhle
Martin Möhle - avatar
+ 3
You are welcome. It is a good first step anyway. If you want some motivation, you can search for "Mitali's Tiny Park" by Martin in Code Playground with filter option as "Most Popular". Its 3D-imitation rotating view is the best isometric engine in SoloLearn.
9th Aug 2019, 1:31 PM
Gordon
Gordon - avatar
+ 1
Gordon Thanks!
9th Aug 2019, 1:26 PM
Clueless Coder
Clueless Coder - avatar
+ 1
Could you tell me title of the book? I am curious. Thanks in advance <3
9th Aug 2019, 9:21 PM
Zuzanna Joanna
+ 1
Zuzanna Joanna The Advanced Game Developer's Toolkit: Create Amazing Web-based Games with JavaScript and HTML5 https://www.amazon.co.uk/dp/1484210980/ref=cm_sw_r_cp_apa_i_r.NtDbPJN14XG
10th Aug 2019, 8:27 AM
Clueless Coder
Clueless Coder - avatar
+ 1
https://code.sololearn.com/WA1uefwkdrrg/?ref=app https://code.sololearn.com/WIs895qR95vc/?ref=app
17th Aug 2019, 5:33 PM
Gordon
Gordon - avatar
0
Gordon I'm trying to layer up the isometric coordinates to make a cube, it's probably nothing but I've got a bug. For the last 15 minutes I've got rid of some broken parts of the code but something still remains that I can't work out. Do you have any ideas? It won't output any shapes. https://code.sololearn.com/WajRK1SMUFXg/?ref=app
17th Aug 2019, 5:11 PM
Clueless Coder
Clueless Coder - avatar