Completed first level

dev
Shariq Shah 5 years ago
parent a53f735155
commit f2066acbbc
  1. 25
      assets/entities/pickup_key_blue.symtres
  2. 24
      assets/entities/pickup_key_green.symtres
  3. 24
      assets/entities/pickup_key_red.symtres
  4. BIN
      assets/models/floor_tile.symbres
  5. 338
      assets/scenes/scene_1.symtres
  6. 2
      build/genie.lua
  7. 42135
      include/common/nuklear.h
  8. 4
      src/common/version.h
  9. 2
      src/game/gui_game.c
  10. 1
      src/game/renderer.c
  11. 2
      src/game/scene.c

@ -8,7 +8,7 @@ Entity
position : -39.000 2.000 -56.000 position : -39.000 2.000 -56.000
flags : 1 flags : 1
pickup_type : 0 pickup_type : 0
name : Pickup_Key_Green name : Pickup_Key_Blue
bounding_box_min : -0.500 -0.500 -0.500 bounding_box_min : -0.500 -0.500 -0.500
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
@ -63,3 +63,26 @@ Entity
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
Entity
{
type : 5
scale : 1.000 1.000 1.000
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
rotation : 0.000 0.000 0.000 1.000
cast_shadow : false
intensity : 1.8500
color : 0.470 0.670 0.890
radius : 19.0000
position : 0.000 0.000 0.000
flags : 1
outer_angle : 41.0000
name : Pickup_Blue_Light
bounding_box_min : -0.500 -0.500 -0.500
pcf_enabled : false
valid : true
bounding_box_max : 0.500 0.500 0.500
}

@ -63,3 +63,27 @@ Entity
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
Entity
{
type : 5
scale : 1.000 1.000 1.000
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
rotation : 0.000 0.000 0.000 1.000
cast_shadow : false
intensity : 1.8500
color : 0.530 0.670 0.280
radius : 19.0000
position : 0.000 0.000 0.000
flags : 1
outer_angle : 41.0000
name : Pickup_Green_Light
archetype : Spot
bounding_box_min : -0.500 -0.500 -0.500
pcf_enabled : false
valid : true
bounding_box_max : 0.500 0.500 0.500
}

@ -63,3 +63,27 @@ Entity
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
Entity
{
type : 5
scale : 1.000 1.000 1.000
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
rotation : 0.000 0.000 0.000 1.000
cast_shadow : false
intensity : 1.8500
color : 0.929 0.067 0.067
radius : 19.0000
position : 0.000 0.000 0.000
flags : 1
outer_angle : 41.0000
name : Pickup_Red_Light
archetype : Spot
bounding_box_min : -0.500 -0.500 -0.500
pcf_enabled : false
valid : true
bounding_box_max : 0.500 0.500 0.500
}

Binary file not shown.

@ -21,9 +21,9 @@ Player
{ {
type : 2 type : 2
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 -0.012 0.000 1.000 rotation : 0.000 -0.727 0.000 -0.687
player_key_mask : 0 player_key_mask : 0
position : 21.339 2.208 13.573 position : 57.000 1.625 8.000
flags : 1 flags : 1
player_health : 100 player_health : 100
name : Player name : Player
@ -69,30 +69,6 @@ Entity
bounding_box_max : 0.500 0.500 0.500 bounding_box_max : 0.500 0.500 0.500
} }
Entity
{
type : 5
scale : 1.000 1.000 1.000
inner_angle : 20.0000
falloff : 1.5000
light_type : 2
depth_bias : 0.0005
rotation : 0.000 0.000 0.000 1.000
cast_shadow : false
intensity : 1.8500
color : 0.929 0.067 0.067
radius : 19.0000
position : 20.000 6.000 -18.000
flags : 1
outer_angle : 41.0000
name : Test_Light
archetype : Spot
bounding_box_min : -0.500 -0.500 -0.500
pcf_enabled : false
valid : true
bounding_box_max : 0.500 0.500 0.500
}
Entity Entity
{ {
type : 5 type : 5
@ -128,7 +104,7 @@ Entity
specular : 0.4000 specular : 0.4000
diffuse_texture : white.tga diffuse_texture : white.tga
diffuse : 1.0000 diffuse : 1.0000
position : -2.000 0.000 10.000 position : 2.000 0.000 10.000
flags : 1 flags : 1
specular_strength : 62.0000 specular_strength : 62.0000
name : Floor_Tile name : Floor_Tile
@ -177,20 +153,20 @@ Entity
Entity Entity
{ {
type : 6 type : 6
scale : 51.000 11.000 0.750 scale : 3.000 3.000 1.000
material : 0 material : 0
rotation : 0.000 -0.707 0.000 0.707 rotation : 0.000 0.000 0.000 1.000
diffuse_color : 1.000 1.000 1.000 1.000 diffuse_color : 1.000 1.000 1.000 1.000
geometry : cube.symbres geometry : wall_tile.symbres
specular : 1.0000 specular : 0.4000
diffuse_texture : default.tga diffuse_texture : white.tga
diffuse : 1.0000 diffuse : 1.0000
position : 18.000 6.000 -55.000 position : 0.000 6.000 -6.000
flags : 1 flags : 1
specular_strength : 1.0000 specular_strength : 62.0000
name : Cube name : Wall_Tile
archetype : cube_uv archetype : wall_tile
uv_scale : 4.600 16.400 uv_scale : 0.300 0.200
} }
Entity Entity
@ -215,7 +191,7 @@ Entity
Entity Entity
{ {
type : 6 type : 6
scale : 33.000 3.000 1.000 scale : 4.000 3.000 1.000
material : 0 material : 0
rotation : 0.000 -0.707 0.000 0.707 rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000 diffuse_color : 1.000 1.000 1.000 1.000
@ -223,7 +199,7 @@ Entity
specular : 0.4000 specular : 0.4000
diffuse_texture : white.tga diffuse_texture : white.tga
diffuse : 1.0000 diffuse : 1.0000
position : 62.000 6.000 7.000 position : 62.000 6.000 8.000
flags : 1 flags : 1
specular_strength : 62.0000 specular_strength : 62.0000
name : Wall_Tile name : Wall_Tile
@ -329,7 +305,7 @@ Entity
Entity Entity
{ {
type : 6 type : 6
scale : 3.000 3.000 1.000 scale : 10.000 3.000 1.000
material : 0 material : 0
rotation : 0.000 -0.707 0.000 0.707 rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000 diffuse_color : 1.000 1.000 1.000 1.000
@ -337,7 +313,7 @@ Entity
specular : 0.4000 specular : 0.4000
diffuse_texture : white.tga diffuse_texture : white.tga
diffuse : 1.0000 diffuse : 1.0000
position : 6.000 6.000 -0.000 position : 6.000 6.000 -13.000
flags : 1 flags : 1
specular_strength : 62.0000 specular_strength : 62.0000
name : Wall_Tile name : Wall_Tile
@ -364,6 +340,44 @@ Entity
uv_scale : 0.300 0.200 uv_scale : 0.300 0.200
} }
Entity
{
type : 6
scale : 3.000 3.000 1.000
material : 0
rotation : 0.000 0.000 0.000 1.000
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : 0.000 6.000 -34.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 11.500 3.000 1.000
material : 0
rotation : 0.000 0.000 0.000 1.000
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -35.000 6.000 -34.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity Entity
{ {
type : 6 type : 6
@ -375,7 +389,7 @@ Entity
specular : 0.4000 specular : 0.4000
diffuse_texture : white.tga diffuse_texture : white.tga
diffuse : 1.0000 diffuse : 1.0000
position : 6.000 6.000 -17.000 position : 6.000 6.000 36.000
flags : 1 flags : 1
specular_strength : 62.0000 specular_strength : 62.0000
name : Wall_Tile name : Wall_Tile
@ -383,58 +397,203 @@ Entity
uv_scale : 0.300 0.200 uv_scale : 0.300 0.200
} }
Scene_Entity_Entry Entity
{ {
scale : 1.000 1.000 1.000 type : 6
rotation : 0.000 0.001 0.000 1.001 scale : 10.000 3.000 1.000
position : 0.000 3.000 0.000 material : 0
filename : turret rotation : 0.000 0.000 0.000 1.000
name : Turret diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -32.000 6.000 -6.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
} }
Scene_Entity_Entry Entity
{ {
scale : 1.000 1.000 1.000 type : 6
rotation : 0.000 0.001 0.000 1.000 scale : 3.000 3.000 1.000
position : -13.000 3.000 4.000 material : 0
filename : turret rotation : 0.000 0.000 0.000 1.000
name : Turret diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -0.000 6.000 24.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
} }
Scene_Entity_Entry Entity
{ {
scale : 1.000 1.000 1.000 type : 6
rotation : 0.000 -0.002 0.000 1.000 scale : 3.000 3.000 1.000
position : -33.000 3.000 8.000 material : 0
filename : turret rotation : 0.000 0.000 0.000 1.000
name : Turret diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -17.000 6.000 24.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
} }
Scene_Entity_Entry Entity
{ {
scale : 1.000 1.000 1.000 type : 6
rotation : 0.000 -0.001 0.000 1.000 scale : 8.000 3.000 1.000
position : -7.000 3.000 2.000 material : 0
filename : turret rotation : 0.000 0.000 0.000 1.000
name : Turret diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -9.000 6.000 48.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
} }
Scene_Entity_Entry Entity
{ {
scale : 1.000 1.000 1.000 type : 6
rotation : 0.000 -0.000 0.000 1.000 scale : 16.000 3.000 1.000
position : 5.000 3.000 6.000 material : 0
filename : turret rotation : 0.000 -0.707 0.000 0.707
name : Turret diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -23.000 6.000 16.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 3.000 3.000 1.000
material : 0
rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -23.000 6.000 -28.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 7.500 3.000 1.000
material : 0
rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -51.500 6.000 -19.500
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 11.000 3.000 1.000
material : 0
rotation : 0.000 0.000 0.000 1.000
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -8.000 6.000 -50.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 5.000 3.000 1.000
material : 0
rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : 6.000 6.000 -43.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
}
Entity
{
type : 6
scale : 5.000 3.000 1.000
material : 0
rotation : 0.000 -0.707 0.000 0.707
diffuse_color : 1.000 1.000 1.000 1.000
geometry : wall_tile.symbres
specular : 0.4000
diffuse_texture : white.tga
diffuse : 1.0000
position : -23.000 6.000 -43.000
flags : 1
specular_strength : 62.0000
name : Wall_Tile
archetype : wall_tile
uv_scale : 0.300 0.200
} }
Entity Entity
{ {
type : 9 type : 9
scale : 30.500 11.000 55.000 scale : 23.100 8.300 15.400
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
trigger_mask : 1 trigger_mask : 1
position : 34.000 6.000 -59.000 position : -9.000 6.000 -43.000
flags : 1 flags : 1
trigger_type : 0 trigger_type : 0
name : Scene_End_Trigger name : Scene_End_Trigger
@ -447,17 +606,8 @@ Scene_Entity_Entry
{ {
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
position : -18.500 1.000 -30.000 position : -9.000 1.000 -6.000
filename : door filename : door_red_green
name : Door
}
Scene_Entity_Entry
{
scale : 1.000 1.000 1.000
rotation : 0.000 -0.707 0.000 0.707
position : 18.000 1.000 -83.000
filename : door_rgb
name : Door name : Door
} }
@ -483,25 +633,25 @@ Scene_Entity_Entry
{ {
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
position : 20.000 4.000 -17.000 position : -9.000 1.000 -34.000
filename : pickup_key_red filename : door_rgb
name : Pickup_Key_Red name : Door
} }
Scene_Entity_Entry Scene_Entity_Entry
{ {
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
position : -39.000 2.000 -56.000 position : -36.500 3.000 -19.500
filename : pickup_key_blue filename : pickup_key_blue
name : Pickup_Key_Green name : Pickup_Key_Blue
} }
Scene_Entity_Entry Scene_Entity_Entry
{ {
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
position : -9.000 2.000 -68.000 position : -8.000 3.000 39.000
filename : pickup_key_green filename : pickup_key_green
name : Pickup_Key_Green name : Pickup_Key_Green
} }
@ -510,8 +660,8 @@ Scene_Entity_Entry
{ {
scale : 1.000 1.000 1.000 scale : 1.000 1.000 1.000
rotation : 0.000 0.000 0.000 1.000 rotation : 0.000 0.000 0.000 1.000
position : -40.000 3.000 -14.000 position : 20.000 3.000 -16.000
filename : pickup_health filename : pickup_key_red
name : Pickup_Health name : Pickup_Key_Red
} }

@ -60,7 +60,7 @@ solution "Symmetry"
description = "Generate version.h from git revision number", description = "Generate version.h from git revision number",
execute = function() execute = function()
local major_version = 0 local major_version = 0
local minor_version = 2 local minor_version = 3
local revision_number = os.outputof("git rev-list --count HEAD") local revision_number = os.outputof("git rev-list --count HEAD")
local branch = os.outputof("git rev-parse --abbrev-ref HEAD") local branch = os.outputof("git rev-parse --abbrev-ref HEAD")

File diff suppressed because it is too large Load Diff

@ -3,8 +3,8 @@
/* Auto generated version file. DO NOT MODIFY */ /* Auto generated version file. DO NOT MODIFY */
#define SYMMETRY_VERSION_MAJOR 0 #define SYMMETRY_VERSION_MAJOR 0
#define SYMMETRY_VERSION_MINOR 2 #define SYMMETRY_VERSION_MINOR 3
#define SYMMETRY_VERSION_REVISION 371 #define SYMMETRY_VERSION_REVISION 372
#define SYMMETRY_VERSION_BRANCH "dev" #define SYMMETRY_VERSION_BRANCH "dev"
#endif #endif

@ -278,7 +278,7 @@ static void gui_game_next_level_dialog(struct nk_context* context)
{ {
context->style.window.fixed_background = game_gui->skin.menu_background; context->style.window.fixed_background = game_gui->skin.menu_background;
nk_window_set_focus(context, "Scene Cleared"); nk_window_set_focus(context, "Scene Cleared");
if(nk_popup_begin(context, NK_POPUP_DYNAMIC, "Scene Cleared!", popup_flags, nk_recti(popup_x, popup_y, popup_width, popup_height))) if(nk_popup_begin(context, NK_POPUP_DYNAMIC, "Level Cleared!", popup_flags, nk_recti(popup_x, popup_y, popup_width, popup_height)))
{ {
nk_layout_row_dynamic(context, row_height, 1); nk_layout_row_dynamic(context, row_height, 1);
if(nk_button_label(context, "Restart Level")) if(nk_button_label(context, "Restart Level"))

@ -93,6 +93,7 @@ void renderer_render(struct Renderer* renderer, struct Scene* scene)
active_camera->clear_color.z, active_camera->clear_color.z,
active_camera->clear_color.w); active_camera->clear_color.w);
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
glEnable(GL_DITHER);
glCullFace(GL_BACK); glCullFace(GL_BACK);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

@ -115,7 +115,7 @@ void scene_init(struct Scene* scene)
editor_camera_init(game_state->editor, game_state->cvars); editor_camera_init(game_state->editor, game_state->cvars);
editor_init_entities(game_state->editor); editor_init_entities(game_state->editor);
scene->background_music_volume = 0.1f; scene->background_music_volume = 0.01f;
scene_background_music_set(scene, "sounds/scene_background_music_default.ogg"); scene_background_music_set(scene, "sounds/scene_background_music_default.ogg");
if(game_state->game_mode == GAME_MODE_PAUSE) if(game_state->game_mode == GAME_MODE_PAUSE)

Loading…
Cancel
Save