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
1
Question by cpl Kindel · May 17, 2010 at 06:20 PM · timeturn-basedtiming

how well does unity work for turn-based game time-type?

How well does unity work for turn-based game (time type) design? I have two game design ideas, one is a chess-like game that is wholly turn-based, another is a more complex game design that is both turn & real time based similar to dominions III & MOO3, etc.. Players conduct their strategic moves on the main board in a turn-based manner, after the "turn" button is pressed any battles take place in a "real time" format outside player control. However, fleets etc have settings which affect their real time scripts (prioritize missiles over beams for example), which can be set & changed by players before the turn end.

I would think turn-based design would be much easier, but I've never designed a computer game so I have no experience. I have a CS degree through school, but have never used it professionally.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Ashkan_gc · May 17, 2010 at 06:33 PM

unity is a game engine that you can create any game in any genra with it. turn based games are one of the easiest game types. you should just program some click events to create the logic for turns and fall your functions when user clicks on objects or GUI elements. (GUI means graphical user interface) unity supports coroutines and immediate mode GUIs. they are great for turn based games and that second complex genra that you said. emmidiate GUI of unity will be your friend. unity has a big helpful community so every question will answered soon here. don't worry. learn one of the C#, javascript languages and read unity docs and tutorials and start making your game.

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 qJake · May 17, 2010 at 09:30 PM 0
Share

I wouldn't say turn-based games are the "easiest" to create, having done one myself, but they are certainly possible with Unity, and Unity handles it extremely well.

avatar image
1

Answer by Novodantis 1 · May 17, 2010 at 09:39 PM

Agreed. Turn-based games can be done in a lot of ways, but on the whole can be simpler to design (from a gameplay perspective) than real-time ones.

To do the combination you described (I'm thinking Baldur's Gate here, right?) you can use the game's timescale value (= 1 to play, = 0 to pause), and call a player input menu each time it completes a turn of set time length.

If you want something to try this out, make a Unity scene with something going on, anything as long as it's moving. Then add an empty object and attach the following .js script (check out the tutorials and Getting Started help sections if you're unsure of how to do this).

var nextTurn = false; var turnLength = 2.0;

private var turnTimer = 0.0; private var realTime = false;

function Update() { if (Input.GetKeyDown(KeyCode.Space) && !realTime){ nextTurn = true; // if space is pressed, advance a turn }

 if (nextTurn) {
     turnTimer = 0.0;   // reset turn timer
     Time.timeScale = 1.0;   // speed of time set to 1 (normal)
     realTime = true;   // tells us we're in realtime mode
     nextTurn = false;    // toggle this off now
 }

 if (realTime) {
     turnTimer +=Time.deltaTime;   // add millisecs this frame took to the turn timer
     if (turnTimer > turnLength) {
         realTime = false;
     }
 } else {
     Time.timeScale = 0.0;   // speed of time set to 0 (pause)
 }

}

This is only a startpoint of course, but should demonstrate the principal.

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
avatar image
1

Answer by buffonomics · Jun 16, 2010 at 05:52 PM

See here for a turn-based game created with Unity:

link text

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 TheLedworks · Mar 30, 2012 at 12:57 PM 0
Share

*DEAD link

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

No one has followed this question yet.

Related Questions

Timing pulses from microphone 0 Answers

Checking for input by using Update or a Coroutine - is there a timing difference? 1 Answer

RPG Action Progress Bar always same speed 1 Answer

Script is only working when slowing down timescale 0 Answers

Accurate millisecond timed thread 2 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