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 Ambaryerno · Oct 04, 2011 at 06:02 PM · interface

Spreadsheets and Decision Tables

I'm working on prototyping a fully 3D adventure title along the lines of the old Sierra adventures. Right now I'm in the process of developing my control interface but wasn't sure how to approach the way characters actually interact with objects in the game.

Specifically, the character can do one of four things with an object: He can Look at it, Interact with it (either by manipulating it in some way or by picking it up and adding it to inventory) use an Inventory item on it (IE, cutting a rope with his knife or sword for a physics-based puzzle) or attempt to Talk to it. I'm looking for the most efficient way of doing this across a WIDE variety of objects as possible.

I could certainly do a script for each object outlining what the game's response would be depending on how the character is interacting with it, however considering just how MANY objects there would be in the game (possibly even the prototype depending on how complex I decide to make it) this would require a LOT of scripts. While prefabs might work for SOME things, even two obects of a type (IE, two rocks) might not be able to be interacted with in the same way (one rock may be able to be pushed over, while another of the same size and weight may be immovable because it's stuck in the ground, or has something blocking it that needs to be moved first, etc). I suppose I could also use prefabs for objects that would give the same responses and separate out the unique ones.

One thought I'd been having was to use a spreadsheet to record every item that can be interacted with, and the subsequent cells listing what the game will do if a particular action is taken. The Control script would then reference this spreadsheet by finding the item in the list, determine what action is being taken, and return the appropriate response.

Any thoughts on which method to pursue? Would the spreadsheet even be possible?

Related to this, can the Unity engine be set up to reference Decision Tables? I want to create a fighting system that's highly complex and dynamic, with controls that are still very simple for the player. IE the player clicks LMB to swing his sword, but whether the character makes a falling or rising cut is determined by criteria pulled from a Decision Table (with factors such as distance, skill with a particular weapon, etc) rather than any specific action taken by the player themselves. So a circumstance that meets X, Y and Z conditions would then fire off one attack animation, whereas for the same input if the conditions are X, B and C it would use a different one.

Comment
Add comment · Show 3
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 Ambaryerno · Oct 14, 2011 at 03:31 PM 0
Share

Anyone have any thoughts on this?

avatar image BerggreenDK · Oct 14, 2011 at 05:33 PM 0
Share

yes, I have some. Unity is two things. 1) a 3D render engine which includes a lot of objects fit for developing games or other interactive programs. 2) Unity has scripting language + supports animation with keyframes too.

Its very similar to Flash in many ways, but a spreadsheet wouldnt be a language thing. its more a software design approach if you ask me. so you might need to think in objects.

avatar image DaveA · Oct 14, 2011 at 05:53 PM 0
Share

BerggreenD$$anonymous$$, You should hit 'answer' when you have an answer.

2 Replies

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

Answer by DaveA · Oct 14, 2011 at 05:02 PM

You can absolutely use CSV (write your own importer, unless C# supports it, I haven't checked), so you could do anything you like in a spreadsheet and export it as CSV (or any delimiter you like). You can also export CSV from Unity back to the spreadsheet. I've done this with editor scripts to manage large real-world systems.

I've been working on a set of scripts which would interface directly to spreadsheets to make this all easier, to put in the Asset Store sometime later this year.

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 Ambaryerno · Oct 14, 2011 at 05:53 PM 0
Share

Thanks a lot, I'll start Googling to see what I can turn up on that. There anything particular you can suggest as a starting place?

avatar image DaveA · Oct 14, 2011 at 07:12 PM 0
Share

Google. But this too: http://social.msdn.microsoft.com/Search/en-us?query=csv&x=0&y=0 and http://msdn.microsoft.com/en-us/library/system.string.split.aspx and http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=editor

avatar image
0

Answer by Graham-Dunnett · Oct 14, 2011 at 03:49 PM

Unity does not work with spreadsheets. I guess if I was faced with your problem, I might be tempted to use a spreadsheet to allow me to enter the data, but then write some code that takes this spreadsheet and generates scripts from it. I think if your game has a lot of object types and a lot of interactions between them, then you'll need a lot of code.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Loading interface 0 Answers

Airlock Door Code Problems [Solved] 1 Answer

How to import the object from server to unity 2 Answers

How to create an agenda or timetable system? 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