2.5d_example
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
2.5d_example [2024/09/20 00:34] – created appledog | 2.5d_example [2024/09/20 00:35] (current) – appledog | ||
---|---|---|---|
Line 48: | Line 48: | ||
The key to making this work is the transform functions. We are keeping track of at least six things; X, Y and Z position, and X, Y and Z rotation. Again, Z here is a form of scale or rotation but the idea is the same. | The key to making this work is the transform functions. We are keeping track of at least six things; X, Y and Z position, and X, Y and Z rotation. Again, Z here is a form of scale or rotation but the idea is the same. | ||
- | The trasforms | + | The transforms |
* def transform_r(self, | * def transform_r(self, | ||
Line 66: | Line 66: | ||
== Keyboard Controls | == Keyboard Controls | ||
- | I went with frame by frame detection to keep things ' | + | I went with frame by frame detection to keep things ' |
+ | |||
+ | * OK: wsad and UP, DOWN for movement | ||
+ | * CHANGED: Use YU, HJ, NM for axial rotation (not 12, 34, 56). | ||
+ | |||
+ | Maybe not the most important change, but could be nice. | ||
== Game.py | == Game.py | ||
+ | You can cut and paste this into [[PyGame Framework]]. | ||
+ | |||
< | < | ||
import pygame | import pygame |
2.5d_example.1726792443.txt.gz · Last modified: 2024/09/20 00:34 by appledog