- SFML Game Development By Example
- Raimondas Pupius
- 181字
- 2021-07-23 14:55:05
Chapter 2. Give It Some Structure – Building the Game Framework
Working on a project with poor structure is much like building a house with no foundation: it's difficult to maintain, extremely unstable, and will probably cause you to abandon it shortly. While the code we worked on in Chapter 1, It's Alive! It's Alive! – Setup and First Program, is functional and can be managed on a very small scale, expanding it without first building a solid framework would most likely result in tons of spaghetti code (not to be confused with ravioli code or lasagna code) being present. Although it sounds delicious, this pejorative term describes the pain of a new feature being exponentially more difficult to implement within the source code that is unstructured and executes in a "tangled" manner, which is something we'll be focusing on avoiding.
In this chapter we will cover:
- Designing a window class, along with a main game class
- Code restructuring and proper architecture
- The importance of proper time management in applications
- Using
sf::Clock
andsf::Time
classes - Fixed and variable time-steps
- JavaScript前端開發(fā)模塊化教程
- Drupal 8 Blueprints
- iOS 9 Game Development Essentials
- 程序員面試筆試寶典
- ASP.NET Core Essentials
- The React Workshop
- HTML5游戲開發(fā)案例教程
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- VMware虛擬化技術(shù)
- 前端HTML+CSS修煉之道(視頻同步+直播)
- 21天學(xué)通C++(第5版)
- ActionScript 3.0從入門到精通(視頻實戰(zhàn)版)
- 寫給青少年的人工智能(Python版·微課視頻版)