Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4 Virtual Reality Projects

You're reading from   Unreal Engine 4 Virtual Reality Projects Build immersive, real-world VR applications using UE4, C++, and Unreal Blueprints

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789132878
Length 632 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Robert Ruud Robert Ruud
Author Profile Icon Robert Ruud
Robert Ruud
Kevin Mack Kevin Mack
Author Profile Icon Kevin Mack
Kevin Mack
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
About Packt
Contributors
Preface
1. Thinking in VR FREE CHAPTER 2. Setting Up Your Development Environment 3. Hello World - Your First VR Project 4. Getting Around the Virtual World 5. Interacting with the Virtual World - Part I 6. Interacting with the Virtual World - Part II 7. Creating User Interfaces in VR 8. Building the World and Optimizing for VR 9. Displaying Media in VR 10. Creating a Multiplayer Experience in VR 11. Taking VR Further - Extending Unreal Engine 12. Where to Go from Here 1. Useful Mind Hacks 2. Research and Further Reading 3. Other Books You May Enjoy Index

Describing your solutions in positive terms


We talked a bit about cargo-cult programming in Chapter 10, Creating a Multiplayer Experience in VR, and made you promise not to do it. To take this idea further, let's look at a phrase we'd like you never to utter: It works—don't touch it! 

This isn't how we describe a robust system. If you feel tempted to say this, congratulations! You're at step one of the make it work; make it right; make it fast process, and that means you're not done. What you've created is a successful example of what your ultimate solution may look like, but now it's time to start the make it right phase. You've met the requirements for this step of your development when you can give three answers about your solution in positive terms:

  • It needs to solve X
  • I know it solves X because....
  • I know it's safe because....

 

Remember these three statements. Don't skip them. You should be able to describe in clear, simple terms what you're trying to do. (Your rubber duck is a good listener for this too.) You should be able to explain why the thing you just did takes care of the thing you're trying to do, and you should be able to do this in positive terms: We needed to make sure the player can't fire their weapon while the pause menu is up. This takes care of it by having the input handler check for a paused state before it calls the fire function. Finally, you should be able to explain why this thing is safe to do: I know this is safe because we're ensuring that we clear any existing input when the pause state begins, and the input handler knows to allow only the unpause command through.

Discipline yourself to do this, and use clear, positive terms. If you're being vague, you're hiding from a thing you need to solve. Make this a habit: describe what you're trying to do, why you know your solution does it, and why you know it's safe to do it. You'll head off a lot of bugs before they ever even have a chance to make it into your software this way.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image