Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by herc34es · Sep 18, 2017 at 06:56 AM · hexagonmap makingmap-generation

Can I use predifined hexagons in generating random maps?

This might be tricky, but I have created 70 hexagons (in Photoshop), and i want to use 64 of them to create various maps in my game:

  1. 8x8 map (like a chess but with hexagons)

  2. randomly placed hexagons; adjacent and in a shape like an "O" or "U" for example.

The trick is not for me to pre-make those maps; this way the maps will be the same every time! Instead, I want each time the map to be different by a random placement of the hexagons. I.E: imagine in game 1, hexagon ONE being in position A; then in game 2, i would like the hexagon to be placed in position 42. It could be positioned in the same location; but not necessarily.

Can this happen through creating seeds of maps? Me creating all those different combinations and saving them as seeds in numeric vectors, and then each game a random seed will be selected with each hexagon's number going to the assigned position of the seed?

Hopefully I am clear!!! If any clarification is needed please let me know! Thank you.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Animatick · Sep 18, 2017 at 10:02 AM

There is a guy on youtube that I used to watch a long time ago, he does a lot of game programming tutorials. this sound like what you are trying to do. check it out here

I hope this helps.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image herc34es · Sep 18, 2017 at 01:52 PM 0
Share

I came upon his tutorial series; i am just wondering if it makes sense to use photoshop created hexagons first. I will most definitely check it out thank you!

avatar image
1

Answer by Glurth · Sep 18, 2017 at 03:42 PM

-You can make a single hex shaped mesh, and store it as a prefab. Configure the mesh such that it's UV's match that of the hex images you will use.

-Store each photoshop hex image as a separate file (asset) in your project.

-Now you can create a new material, manally during scene configuration or automatically at runtime(harder), for each one of your imported hex images.

-Then instantiate the prefab at each of your random location, assigning to each new instances' MeshRender, the material you want the hex to display.

So, a fair bit going on: creating a mesh from scratch, assigning correct UV texture mapping to it, creating materials at runtime, and instantiating prefabs. Obviously, a lot to cover, but hopefully breaking it up into parts will help your research.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

70 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

,Identifying direction of GameObject in Range 0 Answers

google maps 3d API lacks detail 0 Answers

Create map of the USA 0 Answers

How do I make an interactive map on Unity? 0 Answers

Adding rivers to procedural generated 2D map 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges