Hexgon cells - How to draw [Game Maker | Basics]

Опубликовано: 10 Ноябрь 2024
на канале: 1up Indie
1,920
72

This basics video tutorial shows you how to setup hexagon cells in GameMaker.

Hexagon cells are pretty popular in strategy games and can make each cell look fancy. Drawing/placing these cells can be challenging because their shape is not as straight forwards as rectangles. So what you need to understand here is that you have to place them correctly near to each other. Each horizontal line of cells is a sum of the cell width or the sum of a cell width plus half. The height is bit wonky also, since you cannot take the full height nor the half.

Tldr: It is complicated, not too much but a bit


👑 Support me and get fresh game art and game maker projects every month:
  / 1upindie  

Follow me on:
📸 Instangram:   / 1upindie  
🐦 Twitter:   / 1upindie  
💬 Discord:   / discord  
📜 Udemy: https://www.udemy.com/course/become-a... (See youtube about page for discount)


CHAPTERS
-------------------------------------------------------------------------------------------------------
0:00 What we will do, hexagon cells/shapes
0:38 Subscribe
0:55 How hexagon shapes stick to each other
3:55 Quick setup, a spawner creates all hexagonal instances
4:50 Double repeat loop to add cells vertically and horizontally
5:30 Create each time a loop ends a hexagon instance
5:48 Set xx and yy to place the instances in their correct spot
7:16 Setting xx to with the width of a cell
7:52 Nullifying the iterated hor_ADD values to create a new row
8:17 Setting yy to with the height of a cell
8:37 Adapting the xx to snap correctly horizontally
9:10 Correcting the nullifyed xx values