More stable solar system, gyro by default

main
Cameron Murphy Reikes 2 years ago
parent 34f5c03f38
commit 41192181f6

@ -18,7 +18,8 @@
#define DEBUG_RENDERING #define DEBUG_RENDERING
// #define DEBUG_WORLD // #define DEBUG_WORLD
// #define UNLOCK_ALL // #define UNLOCK_ALL
// #define INFINITE_RESOURCES #define INFINITE_RESOURCES
#define FAT_THRUSTERS
// #define NO_GRAVITY // #define NO_GRAVITY
// #define NO_SUNS // #define NO_SUNS

@ -522,6 +522,7 @@ void create_player(Player *player)
unlock_box(player, BoxThruster); unlock_box(player, BoxThruster);
unlock_box(player, BoxBattery); unlock_box(player, BoxBattery);
unlock_box(player, BoxCockpit); unlock_box(player, BoxCockpit);
unlock_box(player, BoxGyroscope);
unlock_box(player, BoxMedbay); unlock_box(player, BoxMedbay);
unlock_box(player, BoxSolarPanel); unlock_box(player, BoxSolarPanel);
unlock_box(player, BoxScanner); unlock_box(player, BoxScanner);
@ -2179,19 +2180,24 @@ void create_hard_shell_station(GameState *gs, cpVect pos, enum BoxType platonic_
void create_initial_world(GameState *gs) void create_initial_world(GameState *gs)
{ {
EntityID suns[] = { EntityID suns[] = {
create_sun(gs, new_entity(gs), ((cpVect){100.0, 0.0}), ((cpVect){0.0, 0.0}), 100000.0, 20.0), create_sun(gs, new_entity(gs), ((cpVect){800.0, 0.0}), ((cpVect){0.0, 0.0}), 1000000.0, 30.0),
create_sun(gs, new_entity(gs), ((cpVect){100.0, 50.0}), ((cpVect){10.0, 0.0}), 10000.0, 10.0), create_sun(gs, new_entity(gs), ((cpVect){800.0, 50.0}), ((cpVect){50.0, 0.0}), 10000.0, 20.0),
create_sun(gs, new_entity(gs), ((cpVect){100.0, -50.0}), ((cpVect){-10.0, 0.0}), 10000.0, 10.0), create_sun(gs, new_entity(gs), ((cpVect){800.0, -50.0}), ((cpVect){-50.0, 0.0}), 10000.0, 20.0),
create_sun(gs, new_entity(gs), ((cpVect){50.0, 200.0}), ((cpVect){5.0, 0.0}), 400000.0, 30.0), create_sun(gs, new_entity(gs), ((cpVect){-2500.0, -50.0}), ((cpVect){0.0, 0.0}), 100000.0, 20.0),
create_sun(gs, new_entity(gs), ((cpVect){-200.0, 200.0}), ((cpVect){-15.0, 0.0}), 900000.0, 60.0),
}; };
for (int i = 0; i < ARRLEN(suns); i++) for (int i = 0; i < ARRLEN(suns); i++)
{ {
gs->suns[i] = suns[i]; gs->suns[i] = suns[i];
} }
#ifndef DEBUG_WORLD
#ifdef DEBUG_WORLD Log("Creating release world\n");
create_bomb_station(gs, (cpVect){800.0, 800.0}, BoxExplosive);
// create_hard_shell_station(gs, (cpVect){800.0, 400.0}, BoxGyroscope);
create_bomb_station(gs, (cpVect){800.0, -800.0}, BoxCloaking);
create_bomb_station(gs, (cpVect){1600.0, 800.0}, BoxMissileLauncher);
create_hard_shell_station(gs, (cpVect){-2500.0, 200.0}, BoxMerge);
#else
Log("Creating debug world\n"); Log("Creating debug world\n");
// pos, mass, radius // pos, mass, radius
create_bomb_station(gs, (cpVect){-5.0, 0.0}, BoxExplosive); create_bomb_station(gs, (cpVect){-5.0, 0.0}, BoxExplosive);
@ -2206,7 +2212,6 @@ void create_initial_world(GameState *gs)
enum CompassRotation rot = Right; enum CompassRotation rot = Right;
{ {
Entity *grid = new_entity(gs); Entity *grid = new_entity(gs);
grid_create(gs, grid); grid_create(gs, grid);
entity_set_pos(grid, cpvadd(from, cpvspin((cpVect){.x = -BOX_SIZE * 9.0}, theta))); entity_set_pos(grid, cpvadd(from, cpvspin((cpVect){.x = -BOX_SIZE * 9.0}, theta)));
@ -2232,13 +2237,6 @@ void create_initial_world(GameState *gs)
cpBodySetVelocity(grid->body, (cpvspin((cpVect){-0.4, 0.0}, theta))); cpBodySetVelocity(grid->body, (cpvspin((cpVect){-0.4, 0.0}, theta)));
entity_ensure_in_orbit(gs, grid); entity_ensure_in_orbit(gs, grid);
} }
#else
create_bomb_station(gs, (cpVect){-200.0, 0.0}, BoxExplosive);
create_hard_shell_station(gs, (cpVect){0.0, 400.0}, BoxGyroscope);
create_bomb_station(gs, (cpVect){0.0, -150.0}, BoxCloaking);
create_bomb_station(gs, (cpVect){300.0, 300.0}, BoxMissileLauncher);
create_hard_shell_station(gs, (cpVect){50.0, 100.0}, BoxMerge);
#endif #endif
} }

@ -12,7 +12,11 @@
#define MERGE_MAX_DIST (BOX_SIZE / 2.0f + 0.01f) #define MERGE_MAX_DIST (BOX_SIZE / 2.0f + 0.01f)
#define PLAYER_SIZE ((cpVect){.x = BOX_SIZE, .y = BOX_SIZE}) #define PLAYER_SIZE ((cpVect){.x = BOX_SIZE, .y = BOX_SIZE})
#define PLAYER_MASS 0.5f #define PLAYER_MASS 0.5f
#ifdef FAT_THRUSTERS
#define PLAYER_JETPACK_FORCE 200.0f
#else
#define PLAYER_JETPACK_FORCE 2.0f #define PLAYER_JETPACK_FORCE 2.0f
#endif
#define PLAYER_JETPACK_TORQUE 0.05f #define PLAYER_JETPACK_TORQUE 0.05f
#define MISSILE_RANGE 4.0f #define MISSILE_RANGE 4.0f
#define MISSILE_BURN_TIME 1.5f #define MISSILE_BURN_TIME 1.5f

Loading…
Cancel
Save