Browse Source

Continue gamebuino

merge-requests/2/head
Miloslav Číž 2 years ago
parent
commit
071ca8ec69
  1. 21
      constants.h
  2. 7
      main_gbmeta.ino
  3. 5
      settings.h

21
constants.h

@ -16,11 +16,6 @@ @@ -16,11 +16,6 @@
#ifndef _SFG_CONSTANTS_H
#define _SFG_CONSTANTS_H
/**
How quickly player turns left/right, in degrees per second.
*/
#define SFG_PLAYER_TURN_SPEED 210
/**
How quickly player moves, in squares per second.
*/
@ -556,17 +551,29 @@ SFG_PROGRAM_MEMORY uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] = @@ -556,17 +551,29 @@ SFG_PROGRAM_MEMORY uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] =
fff: half speed in game squares per second
lllll: eigth of frames to live
*/
#define LOW_FPS (SFG_FPS < 20) ///< low FPS needs low speeds, because collisions
SFG_PROGRAM_MEMORY uint8_t SFG_projectileAttributeTable[SFG_PROJECTILES_TOTAL] =
{
/* explosion */ SFG_PROJECTILE_ATTRIBUTE(0,400),
/* fireball */ SFG_PROJECTILE_ATTRIBUTE(10,1000),
#if LOW_FPS
/* plasma */ SFG_PROJECTILE_ATTRIBUTE(17,500),
#else
/* plasma */ SFG_PROJECTILE_ATTRIBUTE(18,500),
#endif
/* dust */ SFG_PROJECTILE_ATTRIBUTE(0,450),
#if SFG_FPS < 20
/* bullet */ SFG_PROJECTILE_ATTRIBUTE(20,1000) // high speed could miss things
#if LOW_FPS
/* bullet */ SFG_PROJECTILE_ATTRIBUTE(17,1000)
#else
/* bullet */ SFG_PROJECTILE_ATTRIBUTE(28,1000)
#endif
};
#undef LOW_FPS
#endif // guard

7
main_gbmeta.ino

@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
#include <Gamebuino-Meta.h>
#define SFG_IMMORTAL 1
#define SFG_INFINITE_AMMO 1
#define SFG_ARDUINO 1
#define SFG_CAN_EXIT 0
#define SFG_FPS 17
@ -25,6 +28,7 @@ @@ -25,6 +28,7 @@
#define SFG_RAYCASTING_SUBSAMPLE 3
#define SFG_DIMINISH_SPRITES 0
#define SFG_DITHERED_SHADOW 0
#define SFG_PLAYER_TURN_SPEED 150
#include "game.h"
@ -155,6 +159,9 @@ void loop() @@ -155,6 +159,9 @@ void loop()
SFG_mainLoopBody();
#if 0
// debuggin performance
gb.display.setCursor(1,1);
gb.display.print(gb.getCpuLoad());
#endif
}

5
settings.h

@ -66,6 +66,11 @@ @@ -66,6 +66,11 @@
#define SFG_SCREEN_RESOLUTION_Y 600
#endif
/**
How quickly player turns left/right, in degrees per second.
*/
#define SFG_PLAYER_TURN_SPEED 210
/**
Distance, in RCL_Units, to which textures will be drawn. Textures behind this
distance will be replaced by an average constant color, which can help

Loading…
Cancel
Save