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

Plan how you're going to maintain and debug your code when you write it


Technical debt is an insidious thing. This term describes the downstream cost of fixing a mess that was left in the code, usually as a result of rushed development. And it's a project-killer.

Let's say, for instance, that you needed to get something ready for a demo, and you ran out of time so you put in a hack solution. Then, you left it there and built a bunch of additional systems on top of it. Now, you're trying to get your game online, and the thing you did shows up incorrectly on the client, and you realize to your horror that you have to rewrite every one of those systems you built on top of that hack that went in for the demo, and, even worse, you realize it's going to take weeks of work to do this.

Or, let's say you were in a hurry building your blueprint, and it works but looks like a clump of hair in a drain. You move on to the next problem. Six months later, you're about to demo the game for your publisher and a weird bug keeps happening in your system. You haven't looked at it since you wrote it, and now you're forced to spend all day and all night untangling the mess you made so you can figure out where the bug is happening.

 

 

In both of these cases, you would have saved yourself a lot of time and heartache if you'd taken the time to clean up the work you did while it was fresh in your mind. If you absolutely have to hack, mark the hack as a hack, and if you know what the proper solution should really be, write it into a comment right next to the hack. And then fix it before you build anything else on top of it. If you've gotten a blueprint or a bit of code running, go straight into your make it right phase while everything you learned during your make it work phase is still fresh in your mind.

Remember this truth: The vast majority of the life cycle of a piece of code is spent maintaining and debugging it. Drill this into your head. It's much harder to debug code than it is to write it the first time, so give yourself every advantage you can. You are not saving yourself any time if you rush when you first write your solution. You're saving time on the small part of its life and creating a big headache that will haunt you during the long part of its life. Plan for your code to be debugged when you write it. You'll be happy you did.

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