- jMonkeyEngine 3.0 Beginner’s Guide
- Ruth Kusterer
- 179字
- 2021-08-13 17:02:10
Chapter 3. Interacting with the User
The main loop is your game's Dungeon Master, referee, and director: it listens for user input, updates the game state, and renders the output. In a game of Blockout, the loop drops blocks and clears finished layers. In a car racer, the loop calculates friction and acceleration. In a first-person shooter, the loop respawns enemies. The loop is where you make sure everyone sticks to the rules, and where you determine whether the player has won or lost.
In the previous chapter, we learnt how to initialize a 3D scene using the simpleInitApp()
method from the SimpleApplication
class. You can translate, scale, and rotate objects into their start positions, and navigate the scene using the mouse and W, A, S, and D keys. But the scene is still static—we need some interaction!
In this chapter you will learn:
- How to respond to user input
- How to determine the target of a user action
- How to trigger game actions
- How to steer game characters
Let's make the application come alive.
- Python數(shù)據(jù)分析入門與實戰(zhàn)
- C語言程序設(shè)計習(xí)題解析與上機指導(dǎo)(第4版)
- C語言從入門到精通(第4版)
- 基于Swift語言的iOS App 商業(yè)實戰(zhàn)教程
- 精通Python設(shè)計模式(第2版)
- Python完全自學(xué)教程
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- Multithreading in C# 5.0 Cookbook
- Instant PHP Web Scraping
- Hands-On Kubernetes on Windows
- Raspberry Pi Robotic Projects(Third Edition)
- GitHub入門與實踐
- Maker基地嘉年華:玩轉(zhuǎn)樂動魔盒學(xué)Scratch
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應(yīng)用
- Oracle Data Guard 11gR2 Administration Beginner's Guide