View Single Post
  #45  
Old August 11th, 2015, 07:44 AM
Lyrgard's Avatar
Lyrgard Lyrgard is offline
 
Join Date: October 1, 2009
Location: France - Bordeaux
Posts: 1,056
Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla Lyrgard is inducted into the Halls of Valhalla
Re: Heroscape with HexScape

Quote:
Originally Posted by EthanB View Post
I didn't switch it from hex chess to heroscape. No biggie.
That would have been the first question I'd have asked you. Great to see you found it. I'll probably make it more intuitive for next vertsion.


Quote:
Originally Posted by The Grim Reaper's Friend View Post
Quote:
Originally Posted by ollie View Post
I've long been interested in that last "hardest part", mostly as an intellectual exercise. If someone with the appropriate programming skills is also interested it'd be cool to start putting together an AI algorithm that could play at least reasonably.
Seconded. It could be great for the slightly 'unskilled' players (like me) to have something to practice against, without taking the time to set up a normal game.
~TGRF.
Really, the hardest part is creating the "rules" of the AI. The programmation of thoses rules will then be easy compared to it ! I'd love to take part on such project, but I need to stay realist, I wouldn't have time for both that and HexScape, currently.
From an HexScape perspective, HexScape would need to evolve to add a "I finished my turn" button to let the AI know when to play. Then, I'd start creating an AI that ignores powers and only do normals attacks. Then, from that, refine it until it is a challenge to play again ^_^
But it is an enormous task (not the programming part, the "AI rules" part). Just think about how the AI would choose to put order markers on card ? Or decide to attack with the more advanced members of a squad or choose to make some from the rear line move forward, to have a better position next round.
The usual way to do such AI is to create a way to evaluate, or give a score, to a given board situation. The AI can then, from a given board, calculate all the possible moves, for each move, calculate the previsible score, and then do the move that give the best previsible score. The hard part is finding the way to abstract a whole board position into a single score.
What is fun in doing such thing, is that you'll probably have intermediate score that you aggregate into a single score, with coefficients. And by making the coefficients vary, you can make an AI that is more berserk (increase the coefficient on the "can kill something" score), or an AI that is more defensive (increase the "have better chance of surviving" score), and so on !
If such a project start, I'm sure I'll at least lurk it a lot !

Quote:
Originally Posted by EthanB View Post
I have zero knowledge about this sort of thing, but could you use plans of 3d miniatures someone else has made? For examplehttp://3dmag.org/en/market/item/511/

Like I said, I may be way off.
Yes, any 3D object in the .obj format can be used in HexScape. I'll probably make (in the futur), some software to allow people to generate assets for HexScape (to create custom army card, for instance). IF someone want to make such a software, please do . For now, it can be done manually and here is how to do that :

On a computer where HexScape is installed, there is a folder that contains all the assets for the game.
An asset (.hsd) file for HexScape is just a zip file renamed into .hsd.
Importing an .hsd file is only unziping its content into the asset folder. So if one know what need to be where to use an army card in HexScape, creating the .hsd is easy.

So, what need to be where to use an army card in HexScape.

At the root of the asset folder, there is a folder for each type of game you can play with HexScape, and a "common" folder. When you change the game type in the option in HexScape, you basically tell it to look into one of those folders. For instance, if I select "heroscape" in the option, HexScape will look for asset in the "heroscape" folder in the asset folder. The common folder is for assets that are available for all game, so whatever you choose, any assets in there will be available to all game type. For now, it typically contains asset for 20-sided die.

Inside a game type folder, there is 5 possible folders (for now):

- "3dObjects" : this folder contains the 3D models that are used in the game, from the figure to the decors. For instance, if you imported Wave1 asset, you'd have a folder named BladeGruts2 inside this folder, containing the BladeGruts2.obj 3D model along with its .mtl (texture descriptor) file and a .png that is the texture. The name of the folder (BladeGruts2) is used as the id of the 3d models. So to use a custom, you need to have a folder here, with the 3D model inside. (the .obj file need to have the same name as the folder).

- "cards" : This folder contains the definition of the army cards. For the blades gruts, we have a folder nammed classic_BladeGruts here. This folder contains 3 files : card.jpg (or card.png), a full view of the card. icon.jpg (or icon.png), a small and square image representing the card, and a card.properties files. the .properties file is a simple text file containing :
Quote:
name=Blade Gruts
3dFigures=BladeGruts1,BladeGruts2,BladeGruts3,BladeGruts4
Name is the display name of the card, and 3dFigures is a coma separated list of the ids of the 3d figures to use for this card.
The name of the folder (classic_BladeGruts) is the id of the army card, thez one you'll list into army file to include the army card into your army. The "classic_" prefix indicate that this figure is from classic heroscape. SoV figures will have a "sov_" prefix, and so on. individual custom should have a prefix that is the name of their creator. If I create a custom army card named "Super Custom", I'd name it "lyrgard_SuperCustom". That is to prevent name clash if two custom makers made custome with the same name.

- There are also "dice", "markers" and "tiles" folder, that respectivelly are for dice type definition (attack dice, Valkyrie dice, and so on), markers definition (order marker, wound marker, grenade marker, ...) and tiles textures (the texture used to drew the game board. You can play with this file to change how the Heroscape tiles are rendered !)

So... yeah, to use any 3D model with an .obj format, you need to create a folder "heroscape", inside it create a folder "3dObjects" and another "cards". inside them create the folder for you 3D model and cards. Zip thez heroscape folder, rename it from .zip to .hsd, and import it into HexScape.
Reply With Quote