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 RamonBrand · Oct 04, 2012 at 08:20 AM · movementrecordreplayghost

ghost replay system as for a racing game ?

I am trying to get a replay of an object to play when I load a level.

Therefore it will need to be somewhat saved beforehand and loaded upon level load. I have a 2D bike game, like a side scroller, and I would like to have a replay of my bike racing alongside me like a ghost. I have no idea how to go about it. Thank You in advance.

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
4
Best Answer

Answer by Fattie · Oct 04, 2012 at 08:38 AM

To be honest, you should realize this is far from easy.

Are you a beginner programmer or do you have years of experience?

Yo begin, you need absolute mastery of all forms of lists, arrays and the like.

Essentially, you do just save the position of the vehicle every (let's say for now) 0.2 seconds.

Leter, you play it back.

(If you're asking "how to make it transparent looking" that will be the least of your problems, look in to transparent shaders and so on.)

Some of the issue that arise

  • I casually say 0.2 seconds above. This is not unlike saying "to play real time video over the internet - download the data !!!". In practice you often need a real-time heuristic system that determines of it's own accord what Hz you have to use, as the system is in use

  • you need have total mastery of interpolating on the fly - not unlike the difficulties that arise when you do a realtime multiuser racing game.

  • I mention List, it could be a rare case where performance is so demanding you have to use a raw array and all the problems that arise with managing those dynamically (if you were programming at a lower level, like in XCode, it becomes a huge thing about memory management, juggling how much is available, how much you can use, how many are playing, blah blah)

  • when you play back as I casually mention above, you have all the problems of playing two things in sync (the ghost replay and the current driver), again not unlike engineering RT MP games.

  • when i say save the "position" it's often very complicated, you may need to save the rotation, weapons, bones, damage, whatever .. a big hassle.

For example a buddy's company has worked on ghost systems for racing titles, you're talking €100,000s man-hour jobs.

All that being said ...

in a word, it's as simple as: use List to save the position (etc) at a regular interval, and then play that back.

Unity makes things incredibly easy, so you could get something going, but just be aware you're taking on an impressive challenge. There's a reason that dozens and dozens of full-time engineers work on gran turisimo, you know! Heh!

For very broad questions like this you may find much more information on general game development sites

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 RamonBrand · Oct 04, 2012 at 10:25 AM 1
Share

Thank You for the reply, I understand exactly what you mean with storing data in arrays, was just wondering if unity might have some built-in record or animation system specifically for this purpose. Il take a look into it for a very basic version, thanks again. Ramon Brand

avatar image
0

Answer by SamohtVII · Feb 22, 2019 at 02:37 AM

I have created a script for this exact scenario:

https://assetstore.unity.com/packages/tools/integration/ghost-recording-and-replay-script-138922

Let me know if that helps

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

12 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

Related Questions

Ghost Trail - Creating Sequence of Images that move on players position 0 Answers

Disable Share Options in ReplayKit 0 Answers

How can I make my player walk like a ghost 0 Answers

How to add all PlayerPrefs to a list? 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 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