Changeset 177:88a78fb9fa82


Ignore:
Timestamp:
04/06/11 17:33:04 (12 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Message:

Tweak some constants to make player motion more comfortable.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r172 r177  
    1919    mobile = True # whether the velocity may be non-zero
    2020    gravitates = True # whether gravity applies to the sprite
    21     terminal_velocity = (450.0, 450.0) # maximum horizontal and vertial speeds (pixels / s)
     21    terminal_velocity = (450.0, 500.0) # maximum horizontal and vertial speeds (pixels / s)
    2222    bounce_factor = (0.95, 0.95) # bounce factor
    2323    mass = 1.0 # used for shared collisions and applying forces
     
    167167class World(object):
    168168
    169     GRAVITY = 0.0, 9.8 * 20.0 # pixels / s^2
     169    GRAVITY = 0.0, 9.8 * 80.0 # pixels / s^2
    170170
    171171    def __init__(self):
  • skaapsteker/sprites/player.py

    r176 r177  
    7070        if int(self._animation_frame) - int(old_frame) > 0:
    7171            # Check time diff
    72             if time_diff < 0.07:
     72            if time_diff < 0.10:
    7373                # Delay animation frame jump
    7474                self._animation_frame -= abs(v_x) / 300
    7575            else:
    7676                self._last_time = time.time()
    77         elif time_diff > 0.15:
     77        elif time_diff > 0.20:
    7878            # Force animation frame jump
    7979            self._animation_frame = old_frame + 1
     
    103103            self.facing = 'left'
    104104            self.set_image()
    105         self.deltav((-300.0, 0.0))
     105        self.deltav((-450.0, 0.0))
    106106
    107107    def action_right(self):
     
    109109            self.facing = 'right'
    110110            self.set_image()
    111         self.deltav((300.0, 0.0))
     111        self.deltav((450.0, 0.0))
    112112
    113113    def action_up(self):
    114114        if self.on_solid:
    115             self.deltav((0.0, -350.0))
     115            self.deltav((0.0, -self.terminal_velocity[1]))
    116116            self.on_solid = False
    117117
Note: See TracChangeset for help on using the changeset viewer.