User Tools

Site Tools


en:tutorials:shaders:hexagongrid2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:community:ludig:hexagongrid2 [2019/09/19 06:13 (5 years ago)] ludigen:tutorials:shaders:hexagongrid2 [2020/08/31 07:11 (4 years ago)] (current) – ↷ Links adapted because of a move operation sausage
Line 2: Line 2:
 =====Introduction===== =====Introduction=====
 This tutorial showcases how to draw a hexagon grid using a shader, as well as using the mouse position to highlight specific hexagon tiles.\\ \\ This tutorial showcases how to draw a hexagon grid using a shader, as well as using the mouse position to highlight specific hexagon tiles.\\ \\
-{{en:tutorials:community:ludig:hex_shader_screen.png?200x200}}\\ \\ +{{tutorials:shaders:hex_shader_screen.png?200x150}}\\ \\ 
-It is based off of the this [[en:tutorials:community:sergeig:hexagongrid | Hexagon Grid Tutorial]], the key difference being that this example makes use of an axial/cubial coordinate system for pixel-to-hex calculations, as opposed to the grid-based system used by the old tutorial.+It is based off of the this [[en:tutorials:shaders:hexagongrid|Hexagon Grid Tutorial]], the key difference being that this example makes use of an axial/cubial coordinate system for pixel-to-hex calculations, as opposed to the grid-based system used by the old tutorial.
 =====Details===== =====Details=====
 The axial/cubial coordinate system and associated mathematics used in this example are derived from the theory presented in this blog post: https://www.redblobgames.com/grids/hexagons/ The axial/cubial coordinate system and associated mathematics used in this example are derived from the theory presented in this blog post: https://www.redblobgames.com/grids/hexagons/
 =====Source Code===== =====Source Code=====
-A complete version of this tutorial's source code can be found at the following git repository: https://github.com/LudiG/tut_hex\\ +A complete version of this tutorial's source code can be found at the following git repository: https://github.com/LudiG/tut_hex\\ \\ 
-This repository also contains hexagon resource files that can be used as textures for your hexagon shader.\\ **__*Note:__** Pointy-top and flat-top hexagons use different texture files, so you will need to ensure that you match the right files with your hexagon layout. +This repository also contains hexagon resource files that can be used as textures for your hexagon shader.\\ \\ 
-====INI File==== +**__NOTE:__** Pointy-top and flat-top hexagons use different texture files, so you will need to ensure that you match the right files with your hexagon layout. 
-**ORX config file**+====INI File (tut_hex.ini)==== 
 +**ORX Config File**
 <code ini> <code ini>
 [Display] [Display]
Line 171: Line 172:
 " "
 </code> </code>
-====CPP File====+====CPP File (tut_hex.cpp)====
 <code cpp> <code cpp>
 /** /**
en/tutorials/shaders/hexagongrid2.1568898836.txt.gz · Last modified: 2019/09/19 09:13 (5 years ago) (external edit)