User Tools

Site Tools


2.5d_example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
2.5d_example [2024/09/20 00:34] – created appledog2.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 we used were:+The transforms we used were:
  
 * def transform_r(self, factor): * def transform_r(self, factor):
Line 66: Line 66:
  
 == Keyboard Controls == Keyboard Controls
-I went with frame by frame detection to keep things 'live' which I felt was a good choice for this demo. The key choices could probably be improved, 1, 2, 3, 4 etc, is not the best choice of keys.+I went with frame by frame detection to keep things 'live' which I felt was a good choice for this demo. The key choices could probably be improved, 1, 2, 3, 4 etc, is not the best choice of keys. You might try: 
 + 
 +* 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]].
 +
 <Code:Python> <Code:Python>
 import pygame import pygame
2.5d_example.1726792443.txt.gz · Last modified: 2024/09/20 00:34 by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki