User Tools

Site Tools


en:tutorials:shaders:maps_in_a_shader

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:shaders:maps_in_a_shader [2020/08/20 21:02 (4 years ago)] – 2 component vectors to be clearer sausageen:tutorials:shaders:maps_in_a_shader [2020/11/01 01:42 (3 years ago)] (current) sausage
Line 14: Line 14:
  
 <code ini> <code ini>
-[BlocksGraphic+[Block] 
-Texture = blocks.png +Graphic       = @ 
-Pivot = top left +Texture       block.png 
-TextureSize = (32, 32)+TextureSize   = (32, 32)
  
-[Blocks1Graphic@BlocksGraphic+[Block1@Block
-TextureOrigin = (0, 0)+TextureOrigin = (0, 0)
  
-[Blocks2Graphic@BlocksGraphic+[Block2@Block
-TextureOrigin = (32, 0)+TextureOrigin = (32, 0)
  
-[Blocks3Graphic@BlocksGraphic+[Block3@Block
-TextureOrigin = (0, 32)+TextureOrigin = (0, 32)
  
-[Blocks4Graphic@BlocksGraphic+[Block4@Block
-TextureOrigin = (32, 32) +TextureOrigin = (32, 32)
- +
-[Blocks1] +
-Graphic = Blocks1Graphic +
- +
-[Blocks2] +
-Graphic = Blocks2Graphic +
- +
-[Blocks3] +
-Graphic = Blocks3Graphic +
- +
-[Blocks4] +
-Graphic = Blocks4Graphic+
  
 [GameMap] [GameMap]
-MapRow1 = Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 +MapRow1       Block1 Block1 Block1 Block1 Block1 Block1 Block1 Block1 
-MapRow2 = Blocks1 Blocks2 Blocks2 Blocks3 Blocks3 Blocks4 Blocks4 Blocks1 +MapRow2       Block1 Block2 Block2 Block3 Block3 Block4 Block4 Block1 
-MapRow3 = Blocks1 Blocks2 Blocks2 Blocks3 Blocks3 Blocks4 Blocks4 Blocks1 +MapRow3       Block1 Block2 Block2 Block3 Block3 Block4 Block4 Block1 
-MapRow4 = Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1 Blocks1+MapRow4       Block1 Block1 Block1 Block1 Block1 Block1 Block1 Block1
 </code> </code>
  
Line 71: Line 59:
   - Create a Map using [[https://www.mapeditor.org|Tiled]].   - Create a Map using [[https://www.mapeditor.org|Tiled]].
   - Export the tiled map to a TMX file.   - Export the tiled map to a TMX file.
-  - [[en:tutorials:creating_your_own_project|Create a new Orx project]]. +  - [[en:tutorials:projects:creating_your_own_project|Create a new Orx project]]. 
-  - Use [[https://wiki.orx-project.org/en/tutorials/community/sausage/tmx_to_orx|TiledToOrx]] (at least version 0.71) to convert the TMX into Orx configuration data. +  - Use [[en:tutorials:tools:tmx_to_orx|TiledToOrx]] (at least version 0.71) to convert the TMX into Orx configuration data. 
   - Create an empty data config file in your projects data eg. ''tiled.ini'' to hold the map data temporarily.    - Create an empty data config file in your projects data eg. ''tiled.ini'' to hold the map data temporarily. 
   - Copy the config data from TiledToOrx, and paste into the ''tiled.ini'' in your project.   - Copy the config data from TiledToOrx, and paste into the ''tiled.ini'' in your project.
-  - Use the [[https://gitlab.com/sausagejohnson/orximagemap/-/raw/master/orximagemap.zip|OrxImageMap]] [https://gitlab.com/sausagejohnson/tiledtoorx] program to create an image map file and a ''shader.ini'' file for use in your project. OrxImageMap is a command line project. Example usage:+  - Use the [[https://gitlab.com/sausagejohnson/orximagemap/-/raw/master/orximagemap.zip|OrxImageMap]] [[https://gitlab.com/sausagejohnson/orximagemap]] program to create an image map file and a ''shader.ini'' file for use in your project. OrxImageMap is a command line project. Example usage:
   
     orximagemap -i C:\Dev\orx-projects\MyScrollingGame\data\config\tiled.ini -m "GameMap" -o C:\Dev\orx-projects\MyScrollingGame\data\texture\map-image.png -s C:\Dev\orx-projects\MyScrollingGame\data\config\shader.ini     orximagemap -i C:\Dev\orx-projects\MyScrollingGame\data\config\tiled.ini -m "GameMap" -o C:\Dev\orx-projects\MyScrollingGame\data\texture\map-image.png -s C:\Dev\orx-projects\MyScrollingGame\data\config\shader.ini
en/tutorials/shaders/maps_in_a_shader.1597982539.txt.gz · Last modified: 2020/08/20 21:02 (4 years ago) by sausage