Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 CrazyPizza · Oct 25, 2013 at 11:10 AM · androidjavascriptgridpuzzletube

Resizable grid of gameobjects

Hello, I'm working on a tubes puzzle game like This(Bioshock) and I wanted to create a grid that I can use to randomly instantiate tube blocks in. This is an example of the UI I'll use for the game

alt text

at the moment I'm using a plane with a mesh to display the background and the tubes squares are just flatted down cubes with a custom mesh; the lower part of the UI is not yet implemented. (No idea if this is the best way to achieve it but it works for now).

What I'm trying to create is a grid that adapts to the size of a plane (to fit different screen sizes) and in which I can instantiate tubes (which also need to adapt to the grid block size). The tubes can't be moved from a block to another, they just rotate.

The game is all in 2D and I use Javascript but any idea would be great. I don't know if Unity scales down things automatically when it detects the screen size but that's the main problem I have because the game is intended for android mobile devices. Thanks :)

provaui.png (20.0 kB)
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

1 Reply

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

Answer by lukos1986 · Oct 25, 2013 at 11:21 AM

Its quite a task, and there is no quick answer for that. Make few Tile Prefabs, Then Place them in the grid. Each tile need to talk to each other when "filling up"

Animating each tile might me an issue. You could for example animate UV offset on the pipe texture to make it look like is filling up. This will require set of tiles generated in 3d package with specific uv. Ive done this before for game for one of beer companies in uk. Here is some fbx to save you some effort. link text

This are simple 3 model of pipes with correct uv, if you apply texture and change material offset you will see how its behaving


archive.zip (17.2 kB)
Comment
Add comment · Show 2 · 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 CrazyPizza · Oct 25, 2013 at 11:31 AM 0
Share

Thanks! I haven't tought about how to make the water flowing animation yet, I'll probably make a simple 2D animation. To check if water can go through a tube to another I simply used boolean variables (true=pass, false=you shall not pass!) in a script that stores the tubes in a 2d array. The way the game works and checks if the tubes are in the right position is all done through a script. The only problem left is how to resize the game's objects according to screen resolution

avatar image lukos1986 · Oct 25, 2013 at 12:09 PM 0
Share

Use NGUI, best for this task

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

16 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

Related Questions

[Android]How to move an object and have it snap to grid? 1 Answer

Javascript for simple grid puzzle? 1 Answer

Puzzle open door ? 1 Answer

display txt file content on textarea GUI Android 1 Answer

Where to start with making my own 3D mobile puzzle game similar to "The Room" 0 Answers


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