- Procedural Content Generation for C++ Game Development
- Dale Green
- 164字
- 2021-07-16 09:37:47
Exercises
To enable you to test your knowledge of this chapter's content, here are a few exercises that you should work on. They are not imperative to the rest of the book, but working on them will help you access your strengths and weaknesses in the material covered.
- Using the
std::rand()
function with the modulo operator (%), for updatingrandom_numbers.cpp
to generate numbers that fall within the following ranges:- 0 to 1000
- 150 to 600
- 198 to 246
- Come up with a new way of generating a random seed during the runtime. There are lots of ways to do this. So be creative! In my solution, the first numbers were always similar. Find out whether you can generate a random seed that mitigates that.
- Have a look at your game collection and find out whether you can identify where procedural generation has been used.
- Which of the following are examples of procedural generation?
- Loading a song
- Ragdoll physics
- Creating unique objects during the runtime
推薦閱讀
- Flutter開發實戰詳解
- Learning PostgreSQL
- C語言程序設計(第2 版)
- 數據結構和算法基礎(Java語言實現)
- 編譯系統透視:圖解編譯原理
- Mastering Apache Maven 3
- Node.js全程實例
- WordPress 4.0 Site Blueprints(Second Edition)
- SQL基礎教程(第2版)
- PHP從入門到精通(第4版)(軟件開發視頻大講堂)
- 微信小程序全棧開發技術與實戰(微課版)
- Building Microservices with .NET Core
- Python期貨量化交易實戰
- C指針原理揭秘:基于底層實現機制
- AI自動化測試:技術原理、平臺搭建與工程實踐