Show
Ignore:
Timestamp:
01/10/07 02:42:04 (5 years ago)
Author:
mg
Message:

Change some options to make it fit the Nokia 770 more: default keybindings,
disable expensive effects, set screen size.

I still get only 2-3 fps on the actual device. Too slow. Lack of a FPU
shows itself. Maybe the N880 will be faster, if I ever get one.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/lightweight/src/pyspacewar/ui.py

    r258 r259  
    3737    'P1_BACKWARD': K_DOWN, 
    3838    'P1_BRAKE': K_RALT, 
    39     'P1_FIRE': K_RCTRL, 
     39    'P1_FIRE': [K_RETURN, K_RCTRL], 
    4040    # Player 2 
    4141    'P2_TOGGLE_AI': K_2, 
     
    18301830    fullscreen = False              # Start in windowed mode 
    18311831    fullscreen_mode = None          # Desired video mode (w, h) 
    1832     show_missile_trails = True      # Show missile trails by default 
     1832    show_missile_trails = False     # Show missile trails by default 
    18331833    show_background = False         # Show background image 
    18341834    music = True                    # Do we have background music? 
     
    18391839    desired_zoom_level = 1.0        # The desired zoom level 
    18401840 
    1841     min_fps = 10                    # Minimum FPS 
     1841    min_fps = 10                    # Minimum FPS (don't drop frames below this) 
    18421842 
    18431843    ship_colors = [ 
     
    18681868        self.rev_controls = {} 
    18691869        for action, key in DEFAULT_CONTROLS.items(): 
    1870             self.set_control(action, key) 
     1870            if isinstance(key, (list, tuple)): 
     1871                for key in key: 
     1872                    self.set_control(action, key) 
     1873            else: 
     1874                self.set_control(action, key) 
    18711875 
    18721876    def load_settings(self, filename=None): 
    18731877        """Load settings from a configuration file.""" 
    18741878        if not filename: 
    1875             filename = os.path.expanduser('~/.pyspacewarrc') 
     1879            filename = os.path.expanduser('~/.pyspacewarliterc') 
    18761880        config = self.get_config_parser() 
    18771881        config.read([filename]) 
     
    19851989        # Sadly, my laptop is not fast enough to sustain 20 fps at 1024x768 
    19861990        # when there are too many missiles around. 
    1987         return (800, 600) 
     1991        # The Nokia 770 has a 800x480 screen. 
     1992        return (800, 480) 
    19881993 
    19891994    def _set_display_mode(self):