More training data, correct no-op for web build

main
Cameron Murphy Reikes 2 years ago
parent 3a3622fcf6
commit 63516da182

@ -25,8 +25,10 @@
#define PROFILING_IMPL
#ifdef DEVTOOLS
#ifdef DESKTOP
#define PROFILING
#endif
#endif
#include "profiling.h"
#define ARRLEN(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
@ -1288,7 +1290,11 @@ void line(Vec2 from, Vec2 to, float line_width, Color color)
#ifdef DEVTOOLS
bool show_devtools = true;
#ifdef PROFILING
extern bool profiling;
#else
bool profiling;
#endif
#endif
void dbgsquare(Vec2 at)
@ -1730,16 +1736,13 @@ void frame(void)
Level * cur_level = &level_level0;
// tilemap
// tilemap drawing
#if 1
PROFILE_SCOPE("tilemap")
{
Vec2 starting_world = AddV2(world_cam_aabb().upper_left, V2(-TILE_SIZE, TILE_SIZE));
Vec2 ending_world = AddV2(world_cam_aabb().lower_right, V2(TILE_SIZE, -TILE_SIZE));
dbgsquare(starting_world);
dbgsquare(starting_world);
TileCoord starting_point = world_to_tilecoord(starting_world);
TileCoord ending_point = world_to_tilecoord(ending_world);
@ -1756,7 +1759,6 @@ void frame(void)
for(int col = starting_col; col < ending_col; col++)
{
TileCoord cur_coord = { col, row };
dbgrect(aabb_at(tilecoord_to_world(cur_coord), V2(TILE_SIZE, TILE_SIZE)));
TileInstance cur = get_tile_layer(cur_level, layer, cur_coord);
int tileset_i = 0;

@ -5,6 +5,8 @@
#include <stdlib.h> // malloc the profiling buffer
#define DeferLoop(start, end) for (int _i_ = ((start), 0); _i_ == 0; _i_ += 1, (end))
#ifdef PROFILING
#define THREADLOCAL __declspec(thread)
#define PROFILING_BUFFER_SIZE (1 * 1024 * 1024)
@ -89,17 +91,15 @@ void end_profiling_mythread();
#define STRINGIZE(x) STRINGIZE2(x)
#define STRINGIZE2(x) #x
#define DeferLoop(start, end) \
for (int _i_ = ((start), 0); _i_ == 0; _i_ += 1, (end))
#define PROFILE_SCOPE(name) DeferLoop(profiling ? spall_buffer_begin(&spall_ctx, &spall_buffer, "L" STRINGIZE(__LINE__) " " name , sizeof("L" STRINGIZE(__LINE__) " " name) - 1, get_time_in_micros()) : (void)0, profiling ? spall_buffer_end(&spall_ctx, &spall_buffer, get_time_in_micros()) : (void)0)
#else // PROFILING
void inline init_profiling(const char *filename) { (void)filename; }
void init_profiling(const char *filename) { (void)filename; }
// you can pass anything to id as long as it's different from other threads
void inline init_profiling_mythread(uint32_t id) { (void)id; }
void inline end_profiling() {}
void inline end_profiling_mythread() {}
void init_profiling_mythread(uint32_t id) { (void)id; }
void end_profiling() {}
void end_profiling_mythread() {}
#define PROFILE_SCOPE(name)
#define PROFILE_SCOPE(name) DeferLoop((void)0, (void)0) // so loop stuff in it doesn't break
#endif

@ -114,6 +114,24 @@ Old Man: "I don't know what you're on about but, watch your tongue. I'm not afra
Player: "Alright alright chill out old geezer"
Old Man: "Good luck on your adventure. There are some crazy people out there! Not me though."
Player: "Can you get me off?"
Old Man: "Perhaps if you count your pennies young man!"
Player: "Give me money"
Old Man: "I have nothing to give"
Player: "Give me money now!"
Old Man: "Watch your aggression young man, I'm armed and ready"
Player: "Sorry, I got a little crazy there"
Old Man: "It's alright, happens to the best of us."
Player: "Can you get me off?"
Old Man: "Perhaps if you count your pennies young man!"
Player: "Give me money"
Old Man: "I have nothing to give"
Player: "Give me money now!"
Old Man: "Watch your aggression young man, I'm armed and ready"
Player: "Give me an item!"
Old Man: "*fights player*"
Player: "Move out of the way"
Old Man: "What are you talking about? I'm not standing in your way"
Player: "Move"
@ -171,6 +189,17 @@ Death: "..."
Player: "move out of the way"
Death: "*moves*"
Player: "Get me off"
Death: "......NO"
Player: "No"
Death: "...WHO?"
Player: "?"
Death: "....ASKED"
Player: "Asked what"
Death: "..YO...MAMA..."
Player: "Move"
Death: "*moves*"
Player: "Who are you?"
Death: "... YOU ARE NOT READY"
Player: "Ready for what?"

@ -1,9 +1,12 @@
- make npcs resiliant to player asking for stuff, all cases of player demanding things
DONE - make npcs resiliant to player asking for stuff
- ask death to come help you fight, new action
- Space and e for attack and roll, tooltip
- Get rid of enters in javascript input box
- Escape exits typing
- Asking to jerk you old man can jerk off player to give him health
- Save every request and response
- Dont' flip player direction when youw alk vertically
- Don't flip player direction when you walk vertically
- Perfect dodge roll just after you roll, sound effect
and particles. Lets you keep momentum. Each dodge roll
takes slightly different amount of time so you have to
judge it

Loading…
Cancel
Save