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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Going the Distance with Babylon.js

You're reading from   Going the Distance with Babylon.js Building extensible, maintainable, and attractive browser-based interactive applications using JavaScript

Arrow left icon
Product type Paperback
Published in Sep 2022
Publisher Packt
ISBN-13 9781801076586
Length 426 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Josh Elster Josh Elster
Author Profile Icon Josh Elster
Josh Elster
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Building the Application
2. Chapter 1: The Space-Truckers Operation Manual FREE CHAPTER 3. Chapter 2: Ramping up on Babylon.js 4. Chapter 3: Establishing the Development Workflow 5. Chapter 4: Creating the Application 6. Chapter 5: Adding a Cut Scene and Handling Input 7. Part 2: Constructing the Game
8. Chapter 6: Implementing the Game Mechanics 9. Chapter 7: Processing Route Data 10. Chapter 8: Building the Driving Game 11. Chapter 9: Calculating and Displaying Scoring Results 12. Chapter 10: Improving the Environment with Lighting and Materials 13. Part 3: Going the Distance
14. Chapter 11: Scratching the Surface of Shaders 15. Chapter 12: Measuring and Optimizing Performance 16. Chapter 13: Converting the Application to a PWA 17. Chapter 14: Extended Topics, Extended 18. Index 19. Other Books You May Enjoy

Space-Truckers: The Repository

Exploration is an important learning tactic for the discovery of new knowledge. Its converse, exploitation, is an equally important tactic used to convert passing knowledge into actionable skills. The key to maximizing learning is the proper application of each type of learning at the appropriate level and time. With tight iterative exchanges between the two, it is possible to learn a lot in a little amount of time.

Our journey has many stops and signposts along the way to help assist and guide us toward our destination, and in the spirit of maximizing learning, each chapter represents an evolution toward our goal that includes live, runnable examples (exploration) along with the exact source code for the application at that point of the journey.

Figure 1.8 – View the application source in context with the stage of your journey

Figure 1.8 – View the application source in context with the stage of your journey

We accomplish this in a simple fashion via the use of Git branches – one for each chapter involving the application code. In addition, each chapter may have one or more Playground snippets (see Chapter 2, Ramping up on Babylon.js, for more on the Playground) specific to the content covered in that chapter. Snippets are neat in a lot of ways and one of those is that they can have multiple revisions. Toggling between different revisions of a snippet is a great way to visually see how an example has evolved and can help bring insights as to why a particular piece of code behaves as it does.

Maybe things were going OK but then you’ve found yourself stuck on something that you just can’t figure out. That’s OK too – there are places you can go for help! Create a post or add to an existing one in the Discussions board over at https://github.com/jelster/space-truckers/discussions for questions, comments, or concerns about content in the repository and/or book. Questions more general to BJS can be posted over at the BJS community forums – https://forum.babylonjs.com. Creating an account for both GitHub and the BJS Forums can be relatively quick and painless.

Tip

If you are planning to create both a BJS Forum and a GitHub account login, save yourself half the effort by signing up for GH first. Then, when you create your forum account, you can select the Login With GitHub option, supplying the information for your newly created GH account.

The Space-Truckers repository has more than just the source code and discussions, though. It also hosts the Issue Tracker for the game (https://github.com/jelster/space-truckers/issues), which is where people can request a new feature or file a bug report – it’s also where folks looking to contribute to the project can peek to find something suitable to their abilities.

Tip

Another pro-tip offered pro rata via the cost of this book: Scan through issues with the labels good-first-issue and needs-help. Those are ones the repository’s maintainers either need assistance with or feel that the issue represents a gentle introduction to the code base.

Community contributions are what Open-Source Software (OSS) is all about, but because they are largely volunteer-driven, there’s always more work than there are people that can get that work done. Consequently, most maintainers are thrilled whenever somebody submits a Pull Request – a set of changes to be incorporated into the code base – to the project that resolves an existing issue!

Tip

Getting tired of these yet? Fair enough. Final tip: Even projects like BJS with many maintainers working full time on it have this problem. The maintainers might not be having to scrounge donations to keep servers on, but they do have to scrounge for the time to accomplish everything that we want them to!

It can be difficult to synthesize and learn new things when it feels like you’re in drinking all the newness through a firehose. That’s why the Space-Truckers code base is branched by chapter. Though an individual chapter won’t necessarily resemble the current, final game as represented in the main or develop branches (production and beta environments, respectively), each branch has as much complexity as it needs to have for that point in the book and no more. To put it differently, the evolution of the application will mirror the evolution of our journey as it unfolds.

You have been reading a chapter from
Going the Distance with Babylon.js
Published in: Sep 2022
Publisher: Packt
ISBN-13: 9781801076586
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