Compare commits
34 Commits
b4438c1510
...
looping
| Author | SHA1 | Date | |
|---|---|---|---|
| 96aca58f4e | |||
| f3036c639d | |||
| 7b6d55102c | |||
| 03920e311c | |||
| ee95cefdff | |||
| 4d1fffcc02 | |||
| 8663f1b73c | |||
| 00986fa6a1 | |||
| 13d356cbfd | |||
| 5ac952eb83 | |||
| 04b4f61810 | |||
| 5868fc96df | |||
| bca013bf05 | |||
| 801b9051c9 | |||
| f176d66058 | |||
| 20d7b7763b | |||
| 05788cc726 | |||
| 88d996af87 | |||
| f8890f0be2 | |||
| 50d6271413 | |||
| 93e5302c60 | |||
| b03c6c3e56 | |||
| 074ba436cb | |||
| 2d685fcdb9 | |||
| ebc969603d | |||
| d0b3ce1bd0 | |||
| 97a83b20f6 | |||
| 9ad3754829 | |||
| 0522e842c4 | |||
| 9ba6071f9b | |||
| 131323fbea | |||
| e77c85b004 | |||
| 11d5f34522 | |||
| 285cc9b5ad |
@@ -1,5 +1,6 @@
|
||||
Build/
|
||||
Nocheckin/
|
||||
feely_pona_build.exe
|
||||
feely_pona_build
|
||||
feely_pona_version.txt
|
||||
Tools/emsdk
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
+1
-1
Submodule External/tely updated: d82244653e...e7fa8ce6f9
@@ -1,25 +1,5 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set script_dir_backslash=%~dp0
|
||||
set script_dir=%script_dir_backslash:~0,-1%
|
||||
set build_dir=%script_dir%\Build
|
||||
set code_dir=%script_dir%
|
||||
call build_all.bat %* || exit /b 1
|
||||
|
||||
REM Bootstrap a version
|
||||
git show -s --date=format:%%Y-%%m-%%d --format=%%cd HEAD> feely_pona_version.txt
|
||||
git rev-parse --short=8 HEAD>> feely_pona_version.txt
|
||||
git rev-list --count HEAD>> feely_pona_version.txt
|
||||
|
||||
REM Bootstrap the build program
|
||||
mkdir %build_dir% 2>nul
|
||||
pushd %build_dir%
|
||||
cl /nologo /Z7 /W4 %code_dir%\feely_pona_build.cpp || exit /B 1
|
||||
copy feely_pona_build.exe %code_dir% 1>nul
|
||||
popd
|
||||
|
||||
REM Run the build program
|
||||
%code_dir%\feely_pona_build.exe %* || exit /B 1
|
||||
|
||||
popd
|
||||
exit /B 1
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
build_dir=${script_dir}/Build
|
||||
code_dir=${script_dir}
|
||||
|
||||
# Bootstrap a version
|
||||
git show -s --date=format:%Y-%m-%d --format=%cd HEAD> feely_pona_version.txt
|
||||
git rev-parse --short=8 HEAD>> feely_pona_version.txt
|
||||
git rev-list --count HEAD>> feely_pona_version.txt
|
||||
|
||||
# Bootstrap the build program
|
||||
mkdir --parents ${build_dir}
|
||||
pushd ${build_dir}
|
||||
g++ -g -Wall -o feely_pona_build ${code_dir}/feely_pona_build.cpp -lm -lpthread
|
||||
cp --force feely_pona_build ${code_dir}
|
||||
popd
|
||||
|
||||
# Run the build program
|
||||
${code_dir}/feely_pona_build $@
|
||||
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set script_dir_backslash=%~dp0
|
||||
set script_dir=%script_dir_backslash:~0,-1%
|
||||
set build_dir=%script_dir%\Build
|
||||
set code_dir=%script_dir%
|
||||
|
||||
REM Bootstrap a version
|
||||
git show -s --date=format:%%Y-%%m-%%d --format=%%cd HEAD> feely_pona_version.txt
|
||||
git rev-parse --short=8 HEAD>> feely_pona_version.txt
|
||||
git rev-list --count HEAD>> feely_pona_version.txt
|
||||
|
||||
REM Bootstrap the build program
|
||||
mkdir %build_dir% 2>nul
|
||||
pushd %build_dir%
|
||||
cl /nologo /Z7 /W4 %code_dir%\feely_pona_build.cpp || exit /B 1
|
||||
copy feely_pona_build.exe %code_dir% 1>nul
|
||||
popd
|
||||
|
||||
REM Run the build program
|
||||
%code_dir%\feely_pona_build.exe %* || exit /B 1
|
||||
|
||||
popd
|
||||
exit /B 1
|
||||
+4
-4
@@ -5,7 +5,7 @@ set script_dir_backslash=%~dp0
|
||||
set script_dir=%script_dir_backslash:~0,-1%
|
||||
set build_dir=%script_dir%\Build
|
||||
|
||||
scp -P 8110 %build_dir%\Terry_Cherry_Emscripten\Terry_Cherry.html doylet@doylet.dev:/selfhost/TerryCherry/index.html
|
||||
scp -P 8110 %build_dir%\Terry_Cherry_Emscripten\Terry_Cherry.data doylet@doylet.dev:/selfhost/TerryCherry/Terry_Cherry.data
|
||||
scp -P 8110 %build_dir%\Terry_Cherry_Emscripten\Terry_Cherry.js doylet@doylet.dev:/selfhost/TerryCherry/Terry_Cherry.js
|
||||
scp -P 8110 %build_dir%\Terry_Cherry_Emscripten\Terry_Cherry.wasm doylet@doylet.dev:/selfhost/TerryCherry/Terry_Cherry.wasm
|
||||
scp -P 8110 %build_dir%\Terry_Cherry\Terry_Cherry.html doylet@doylet.dev:/selfhost/Terry_Cherry/index.html
|
||||
scp -P 8110 %build_dir%\Terry_Cherry\Terry_Cherry.data doylet@doylet.dev:/selfhost/Terry_Cherry/Terry_Cherry.data
|
||||
scp -P 8110 %build_dir%\Terry_Cherry\Terry_Cherry.js doylet@doylet.dev:/selfhost/Terry_Cherry/Terry_Cherry.js
|
||||
scp -P 8110 %build_dir%\Terry_Cherry\Terry_Cherry.wasm doylet@doylet.dev:/selfhost/Terry_Cherry/Terry_Cherry.wasm
|
||||
|
||||
+435
-205
File diff suppressed because it is too large
Load Diff
@@ -165,6 +165,12 @@ struct FP_ParticleDescriptor
|
||||
Dqn_usize duration_ms;
|
||||
};
|
||||
|
||||
struct FP_ListenForNewPlayerResult
|
||||
{
|
||||
bool yes;
|
||||
bool tutorial_requested;
|
||||
};
|
||||
|
||||
#if defined(DQN_PLATFORM_EMSCRIPTEN)
|
||||
#define FP_DEVELOPER_MODE 0
|
||||
#else
|
||||
|
||||
+541
-545
File diff suppressed because it is too large
Load Diff
@@ -185,6 +185,7 @@ static FP_GameEntityHandle FP_Entity_CreateTerryInternal(FP_Game *game, Dqn_V2 p
|
||||
entity->local_hit_box_size = FP_Game_MetersToPixelsNx2(game->play, 0.5f, entity->sprite_height.meters * .6f);
|
||||
entity->hp_cap = FP_DEFAULT_DAMAGE * 3;
|
||||
entity->hp = entity->hp_cap;
|
||||
entity->coins = 10;
|
||||
FP_Entity_AddDebugEditorFlags(game, result);
|
||||
entity->flags |= FP_GameEntityFlag_NonTraversable;
|
||||
entity->flags |= FP_GameEntityFlag_Attackable;
|
||||
|
||||
+7
-31
@@ -3,24 +3,24 @@
|
||||
#include "feely_pona_unity.h"
|
||||
#endif
|
||||
|
||||
static bool FP_Game_KeyBindIsPressed(TELY_OSInput const *input, FP_GameControls const *controls, FP_GameKeyBind key_bind)
|
||||
static bool FP_Game_KeyBindIsPressed(TELY_Input const *input, FP_GameControls const *controls, FP_GameKeyBind key_bind)
|
||||
{
|
||||
bool result = false;
|
||||
if (controls->mode == FP_GameControlMode_Keyboard) {
|
||||
result = TELY_OSInput_ScanKeyIsPressed(input, key_bind.scan_key);
|
||||
result = TELY_Input_ScanKeyIsPressed(input, key_bind.scan_key);
|
||||
} else {
|
||||
result = TELY_OSInput_GamepadKeyIsPressed(input, controls->gamepad_index, key_bind.gamepad_key);
|
||||
result = TELY_Input_GamepadKeyIsPressed(input, controls->gamepad_index, key_bind.gamepad_key);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool FP_Game_KeyBindIsDown(TELY_OSInput const *input, FP_GameControls const *controls, FP_GameKeyBind key_bind)
|
||||
static bool FP_Game_KeyBindIsDown(TELY_Input const *input, FP_GameControls const *controls, FP_GameKeyBind key_bind)
|
||||
{
|
||||
bool result = false;
|
||||
if (controls->mode == FP_GameControlMode_Keyboard) {
|
||||
result = TELY_OSInput_ScanKeyIsDown(input, key_bind.scan_key);
|
||||
result = TELY_Input_ScanKeyIsDown(input, key_bind.scan_key);
|
||||
} else {
|
||||
result = TELY_OSInput_GamepadKeyIsDown(input, controls->gamepad_index, key_bind.gamepad_key);
|
||||
result = TELY_Input_GamepadKeyIsDown(input, controls->gamepad_index, key_bind.gamepad_key);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -250,6 +250,7 @@ static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_ATTRIB
|
||||
result->buildings_visited = FP_SentinelList_Init<FP_GameEntityHandle>(game->play.chunk_pool);
|
||||
result->action.sprite_alpha = 1.f;
|
||||
result->stamina_cap = 93;
|
||||
result->stamina = result->stamina_cap;
|
||||
|
||||
result->hp_cap = DQN_CAST(uint32_t)(FP_DEFAULT_DAMAGE * .8f);
|
||||
result->hp = result->hp_cap;
|
||||
@@ -291,19 +292,6 @@ static FP_GameEntity *FP_Game_MakeEntityPointerF(FP_Game *game, DQN_FMT_ATTRIB c
|
||||
return result;
|
||||
}
|
||||
|
||||
static FP_GameEntityHandle FP_Game_MakeEntityF(FP_Game *game, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
FP_GameEntity *entity = FP_Game_MakeEntityPointerF(game, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
FP_GameEntityHandle result = {};
|
||||
if (entity)
|
||||
result = entity->handle;
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool FP_Game_IsNilEntity(FP_GameEntity *entity)
|
||||
{
|
||||
bool result = entity ? ((entity->handle.id & FP_GAME_ENTITY_HANDLE_INDEX_MASK) == 0) : true;
|
||||
@@ -536,18 +524,6 @@ static void FP_Game_EntityActionReset(FP_Game *game, FP_GameEntityHandle entity_
|
||||
entity->action.end_at_clock_ms = DQN_MAX(duration_ms, game->play.clock_ms + duration_ms);
|
||||
}
|
||||
|
||||
static Dqn_V2I FP_Game_WorldPosToTilePos(FP_Game *game, Dqn_V2 world_pos)
|
||||
{
|
||||
Dqn_V2I result = Dqn_V2I_InitNx2(world_pos.x / game->play.tile_size, world_pos.y / game->play.tile_size);
|
||||
return result;
|
||||
}
|
||||
|
||||
static Dqn_V2 FP_Game_TilePosToWorldPos(FP_Game *game, Dqn_V2I tile_pos)
|
||||
{
|
||||
Dqn_V2 result = Dqn_V2_InitNx2(tile_pos.x * game->play.tile_size, tile_pos.y * game->play.tile_size);
|
||||
return result;
|
||||
}
|
||||
|
||||
static Dqn_V2 FP_Game_CalcWaypointWorldPos(FP_Game *game, FP_GameEntityHandle entity_handle, FP_GameWaypoint const *waypoint)
|
||||
{
|
||||
Dqn_V2 result = {};
|
||||
|
||||
+63
-12
@@ -168,8 +168,8 @@ enum FP_GameInGameMenu
|
||||
|
||||
struct FP_GameKeyBind
|
||||
{
|
||||
TELY_OSInputScanKey scan_key;
|
||||
TELY_OSInputGamepadKey gamepad_key;
|
||||
TELY_InputScanKey scan_key;
|
||||
TELY_InputGamepadKey gamepad_key;
|
||||
};
|
||||
|
||||
enum FP_GameControlMode
|
||||
@@ -334,12 +334,25 @@ enum FP_GameAudio
|
||||
FP_GameAudio_Message,
|
||||
FP_GameAudio_Monkey,
|
||||
FP_GameAudio_PortalDestroy,
|
||||
FP_GameAudio_GameStart,
|
||||
FP_GameAudio_PerryStart,
|
||||
FP_GameAudio_Ambience1,
|
||||
FP_GameAudio_Ambience2,
|
||||
FP_GameAudio_Music1,
|
||||
FP_GameAudio_Music2,
|
||||
FP_GameAudio_RelaxMusic,
|
||||
FP_GameAudio_StressMusic,
|
||||
FP_GameAudio_Relax01Music,
|
||||
FP_GameAudio_Stress01Music,
|
||||
FP_GameAudio_Relax02Music,
|
||||
FP_GameAudio_Stress03Music,
|
||||
FP_GameAudio_Count,
|
||||
};
|
||||
|
||||
enum FP_GameState
|
||||
{
|
||||
FP_GameState_IntroScreen,
|
||||
FP_GameState_Tutorial,
|
||||
FP_GameState_Play,
|
||||
FP_GameState_Pause,
|
||||
FP_GameState_WinGame,
|
||||
@@ -365,6 +378,35 @@ struct FP_Particle
|
||||
Dqn_usize end_ms;
|
||||
};
|
||||
|
||||
enum FP_GameStateTutorial
|
||||
{
|
||||
FP_GameStateTutorial_ShowPlayer,
|
||||
FP_GameStateTutorial_ShowPlayerWait,
|
||||
FP_GameStateTutorial_ShowPortalOne,
|
||||
FP_GameStateTutorial_ShowPortalOneWait,
|
||||
FP_GameStateTutorial_ShowPortalTwo,
|
||||
FP_GameStateTutorial_ShowPortalTwoWait,
|
||||
FP_GameStateTutorial_ShowPortalThree,
|
||||
FP_GameStateTutorial_ShowPortalThreeWait,
|
||||
FP_GameStateTutorial_ShowBillboardBuild,
|
||||
FP_GameStateTutorial_ShowBillboardBuildWait,
|
||||
FP_GameStateTutorial_Count,
|
||||
};
|
||||
|
||||
Dqn_V2 const FP_MONKEY_SPAWN_LOCATIONS[] =
|
||||
{
|
||||
Dqn_V2_InitNx2(-592, 538),
|
||||
Dqn_V2_InitNx2(-1503, -568),
|
||||
Dqn_V2_InitNx2(1890, 1150),
|
||||
Dqn_V2_InitNx2(1815, -1192),
|
||||
Dqn_V2_InitNx2(520, 1230),
|
||||
Dqn_V2_InitNx2(-934, -238),
|
||||
Dqn_V2_InitNx2(1915, 15),
|
||||
Dqn_V2_InitNx2(247, 560),
|
||||
Dqn_V2_InitNx2(-290, -1120),
|
||||
Dqn_V2_InitNx2(1126, -646),
|
||||
};
|
||||
|
||||
struct FP_GamePlay
|
||||
{
|
||||
TELY_ChunkPool *chunk_pool;
|
||||
@@ -388,6 +430,7 @@ struct FP_GamePlay
|
||||
FP_GameEntityHandle merchant_graveyard;
|
||||
FP_GameEntityHandle merchant_gym;
|
||||
FP_GameEntityHandle merchant_phone_company;
|
||||
FP_GameEntityHandle billboard_build;
|
||||
|
||||
FP_GameEntityHandle clicked_entity;
|
||||
FP_GameEntityHandle hot_entity;
|
||||
@@ -429,6 +472,12 @@ struct FP_GamePlay
|
||||
|
||||
FP_Particle particles[256];
|
||||
uint32_t particle_next_index;
|
||||
|
||||
FP_GameStateTutorial tutorial_state;
|
||||
uint64_t tutorial_wait_end_time_ms;
|
||||
|
||||
uint8_t monkey_spawn_shuffled_list[DQN_ARRAY_UCOUNT(FP_MONKEY_SPAWN_LOCATIONS)];
|
||||
uint8_t monkey_spawn_count;
|
||||
};
|
||||
|
||||
struct FP_Game
|
||||
@@ -438,15 +487,17 @@ struct FP_Game
|
||||
TELY_AssetFontHandle jetbrains_mono_font;
|
||||
TELY_AssetFontHandle talkco_font;
|
||||
|
||||
TELY_AssetAudioHandle audio[FP_GameAudio_Count];
|
||||
TELY_AssetSpriteSheet atlas_sprite_sheet;
|
||||
TELY_RFui rfui;
|
||||
FP_GamePlay play;
|
||||
Dqn_Arena *frame_arena;
|
||||
uint16_t font_size;
|
||||
uint16_t large_font_size;
|
||||
uint16_t large_talkco_font_size;
|
||||
uint16_t xlarge_talkco_font_size;
|
||||
TELY_AssetAudioHandle audio[FP_GameAudio_Count];
|
||||
TELY_AudioPlaybackHandle bg_music1;
|
||||
TELY_AudioPlaybackHandle bg_music2;
|
||||
TELY_AssetSpriteSheet atlas_sprite_sheet;
|
||||
TELY_RFui rfui;
|
||||
FP_GamePlay play;
|
||||
Dqn_Arena *frame_arena;
|
||||
uint16_t font_size;
|
||||
uint16_t large_font_size;
|
||||
uint16_t large_talkco_font_size;
|
||||
uint16_t xlarge_talkco_font_size;
|
||||
};
|
||||
|
||||
struct FP_GameAStarNode
|
||||
@@ -475,7 +526,7 @@ FP_GamePlaceableBuilding const PLACEABLE_BUILDINGS[] = {
|
||||
{FP_EntityType_AirportTerry, FP_EntityAirportTerryState_Idle},
|
||||
{FP_EntityType_ChurchTerry, FP_EntityChurchTerryState_Idle},
|
||||
{FP_EntityType_ClubTerry, FP_EntityClubTerryState_Idle},
|
||||
{FP_EntityType_KennelTerry, FP_EntityKennelTerryState_Idle},
|
||||
// {FP_EntityType_KennelTerry, FP_EntityKennelTerryState_Idle},
|
||||
};
|
||||
|
||||
struct FP_GameCanMoveToPositionResult
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#define DQN_ONLY_DSMAP
|
||||
#define DQN_ONLY_LIST
|
||||
#define DQN_ONLY_FS
|
||||
#define DQN_ONLY_SEMAPHORE
|
||||
#define DQN_ONLY_THREAD
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define DQN_IMPLEMENTATION
|
||||
#include "External/tely/External/dqn/dqn.h"
|
||||
@@ -15,13 +17,13 @@
|
||||
DQN_MSVC_WARNING_PUSH
|
||||
DQN_MSVC_WARNING_DISABLE(4244) // warning C4244: 'argument': conversion from 'int' to 'short', possible loss of data
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "External/tely/external/stb/stb_rect_pack.h"
|
||||
#include "External/tely/External/stb/stb_rect_pack.h"
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "External/tely/external/stb/stb_image_write.h"
|
||||
#include "External/tely/External/stb/stb_image_write.h"
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "External/tely/external/stb/stb_image.h"
|
||||
#include "External/tely/External/stb/stb_image.h"
|
||||
DQN_MSVC_WARNING_POP
|
||||
|
||||
DQN_MSVC_WARNING_PUSH
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Unity build header to compile the entire application as a single translation unit
|
||||
|
||||
#define TELY_PLATFORM_DLL_FILE_NAME "terry_cherry_dev_dll"
|
||||
#include "External/tely/tely_os_raylib_unity.h"
|
||||
#include "External/tely/tely_backend_raylib_unity.h"
|
||||
|
||||
// NOTE: feely_pona ================================================================================
|
||||
#if defined(_CLANGD) || defined(FEELY_PONA_IMPLEMENTATION)
|
||||
|
||||
Binary file not shown.
@@ -25,7 +25,7 @@ forwards them to the command line).
|
||||
You must ensure you have MSVC's `cl.exe` on your path to build. This game was
|
||||
tested on MSVC 2023 (v14.34.31933).
|
||||
|
||||
For most intents and purposes you may simply execute `build.bat` on Windows
|
||||
For most intents and purposes you may simply execute `build_all.bat` on Windows
|
||||
which bootstraps the build program and automatically calls the meta-build
|
||||
program. With fast computers nowadays our default is to build all targets by
|
||||
default (except web due to extra toolchain requirements).
|
||||
@@ -57,7 +57,7 @@ then be done by
|
||||
Tools\emsdk\emsdk.bat activate latest
|
||||
|
||||
# Build the game
|
||||
build --web
|
||||
build_all --web
|
||||
```
|
||||
|
||||
This will produce at `Build\Terry_Cherry_Emscripten` a HTML and WASM file ready
|
||||
|
||||
Reference in New Issue
Block a user