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 iamthecoolguy11 · Oct 12, 2013 at 10:20 PM · javascriptsaveload

Saving lots of objects (Only answer in JavaScript)

I know this is a hard one so a big thanks in advance. So I have this game called borda and the world is made of many many cubes that need to be saved. I can't figure out how to save it all with out the game crashing. So if you guys can help me have unity save and load all this stuff I would be very thankfull.

heres some pics

alt textalt text

Comment
Add comment · Show 17
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 mattssonon · Oct 13, 2013 at 10:03 PM 0
Share

How are you currently saving them?

avatar image iamthecoolguy11 · Oct 13, 2013 at 10:07 PM 0
Share

i was using playerprefs

avatar image tanoshimi · Oct 13, 2013 at 10:19 PM 0
Share

How many cubes is many many cubes? And why on earth do you want an answer in Java?

avatar image iamthecoolguy11 · Oct 13, 2013 at 10:23 PM 0
Share

it could be any amount of cubes cus the player can destroy them and stuff. I need it in java cus I dont know c# that much yet

avatar image tanoshimi · Oct 13, 2013 at 10:33 PM 0
Share

I think you mean JavaScript then - Java is a different language entirely :) It's hard to define a structure to efficiently store "any amount" of data... and the description of your game is sounding horribly $$anonymous$$inecraft-y, in which case you're going about it the wrong way anyway - look up voxels rather than creating millions of cubes - your current approach is just not scalable.

Show more comments

1 Reply

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

Answer by Eric5h5 · Oct 14, 2013 at 12:13 AM

It's not workable to have separate GameObjects for each block. Look up any of the various topics about Unity and Minecraft clones for ideas and code. Essentially, you create mesh chunks using the Mesh class, from an array which represents the world. You can save the array using System.IO classes. e.g., if you use a byte to represent each block, then you could simply use System.IO.File.SaveAllBytes to save the array directly (and ReadAllBytes to load it).

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 iamthecoolguy11 · Oct 14, 2013 at 12:23 PM 0
Share

you got any specific tuts

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

21 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

Related Questions

Trying to save/load game, codes doesnt do anything. not even an error. 1 Answer

Not loading an object if it have be retained from a previous scene. 1 Answer

simple checkpoint/save/load system in javascript 4 Answers

Simple save/load scripting for multi level iOS game. 1 Answer

player prefs, problem but no problem??? 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