config.rs 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // execute update code 60x per seconds
  2. pub const TARGET_FPS: u32 = 60;
  3. // execute meta code each 20 frames
  4. pub const META_EACH: u32 = 20;
  5. // execute physics code each 10 frames
  6. pub const PHYSICS_EACH: u32 = 10;
  7. // execute animate code each 30 frames
  8. pub const ANIMATE_EACH: u32 = 60;
  9. // change sprite animation tile 30 frames
  10. pub const SPRITE_EACH: u32 = 10;
  11. // max of frame_i used to calculate ticks
  12. pub const MAX_FRAME_I: u32 = 4294967295;
  13. // pixel offset by tick when player move screen display
  14. pub const DISPLAY_OFFSET_BY: f32 = 3.0;
  15. // pixel offset by tick when player move screen display with speed
  16. pub const DISPLAY_OFFSET_BY_SPEED: f32 = 10.0;
  17. // Width of sprite sheet
  18. pub const SCENE_ITEMS_SPRITE_SHEET_WIDTH: f32 = 800.0;
  19. // Height of sprite sheet
  20. pub const SCENE_ITEMS_SPRITE_SHEET_HEIGHT: f32 = 600.0;
  21. // Width of sprite sheet
  22. pub const UI_SPRITE_SHEET_WIDTH: f32 = 800.0;
  23. // Height of sprite sheet
  24. pub const UI_SPRITE_SHEET_HEIGHT: f32 = 600.0;
  25. // Width of one grid tile
  26. pub const GRID_TILE_WIDTH: f32 = 5.0;
  27. // Height of one grid tile
  28. pub const GRID_TILE_HEIGHT: f32 = 5.0;
  29. //
  30. pub const DEFAULT_SELECTED_SQUARE_SIDE: f32 = 14.0;
  31. //
  32. pub const DEFAULT_SELECTED_SQUARE_SIDE_HALF: f32 = DEFAULT_SELECTED_SQUARE_SIDE / 2.0;
  33. //
  34. pub const SCENE_ITEMS_CHANGE_ERR_MSG: &str = "scene_items content change !";
  35. //
  36. pub const DEBUG: bool = true;