Massive art import of forest scene, pallete shifted farmer

main
parent 12191a426f
commit 00c3ff09f1

BIN
art/BezierCurve.013_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.164_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.164_color2.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.167_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.295_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.296_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.297_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.297_color.png.002.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.314_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cube.314_color.png.002.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.126_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.126_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.130_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.130_color.png.002.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.131_color.png.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Cylinder.131_color.png.002.png (Stored with Git LFS)

Binary file not shown.

BIN
art/EGround.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/EGround3.png (Stored with Git LFS)

Binary file not shown.

@ -122,6 +122,9 @@ def ensure_tex_saved_and_get_name(o) -> str:
return image_filename
def object_in_level(o):
return o.users_collection[0].name == "Level" or (o.users_collection[0] in D.collections["Level"].children_recursive)
# meshes can either be Meshes, or Armatures. Armatures contain all mesh data to draw it, and any anims it has
for o in D.objects:
@ -131,7 +134,7 @@ for o in D.objects:
mesh_object = o
o = o.parent
object_transform_info = (mesh_name, mapping @ o.location, o.rotation_euler, o.scale)
if o.users_collection[0].name == 'Level':
if object_in_level(o):
assert False, "Cannot put armatures in the level. The level is for static placed meshes. For dynamic entities, you put them outside of the level collection, their entity kind is encoded, and the game code decides how to draw them"
else:
pass
@ -281,13 +284,12 @@ for o in D.objects:
else: # if the parent type isn't an armature, i.e just a bog standard mesh
mesh_name = o.to_mesh().name # use this over o.name so instanced objects which refer to the same mesh, both use the same serialized mesh.
object_transform_info = (mesh_name, mapping @ o.location, o.rotation_euler, o.scale)
if o.users_collection[0].name == 'Level' and mesh_name == "CollisionCube":
if object_in_level(o) and mesh_name == "CollisionCube":
collision_cubes.append((o.location, o.dimensions))
else:
if o.users_collection[0].name == 'Level':
if object_in_level(o):
print(f"Object {o.name} has mesh name {o.to_mesh().name}")
assert(o.rotation_euler.order == 'XYZ')
level_object_data.append(object_transform_info)
@ -297,6 +299,7 @@ for o in D.objects:
if mesh_name in saved_meshes:
continue
saved_meshes.add(mesh_name)
print(f"Mesh name {mesh_name} in level {object_in_level(o)} collections {o.users_collection}")
image_filename = ensure_tex_saved_and_get_name(o)
assert(mesh_name != LEVEL_EXPORT_NAME)

BIN
art/FencePost.001.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Plane.029_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/Plane.033_color.png.png (Stored with Git LFS)

Binary file not shown.

BIN
art/TreeLayer2.png.png (Stored with Git LFS)

Binary file not shown.

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf55748e756b3a00b771c5df4955fa3ae387efa6c2d8365688fc64b736d23cae
size 25493916
oid sha256:44a79326726295efd4403137a0a8406ec349ce1e22374dea6e43a6401946e34e
size 30742332

@ -1,3 +1,7 @@
@image shifted_farmer:
{
filepath: "shifted_farmer.png",
}
@image dialog_bubble:
{
filepath: "dialog_bubble.png",

BIN
assets/shifted_farmer.png (Stored with Git LFS)

Binary file not shown.

@ -129,6 +129,12 @@ CharacterGen characters[] = {
.enum_name = "Farmer",
.prompt = "The farmer wakes up, does his chores, and sleeps in the farmhouse all on his lonesome. He's tinkering with something fishy in the barn, but's mighty secretive about it. He used to have a wife, and suddenly she disappeared. The farmer gets MIGHTY angry if you question him about what's in his barn under the tarp, or what happened to his wife and family, but is otherwise a kind hearted soul.",
},
{
.name = "Shiftede Farmer",
.enum_name = "ShiftedFarmer",
.prompt = "The farmer wakes up, does his chores, and sleeps in the farmhouse all on his lonesome. He's tinkering with something fishy in the barn, but's mighty secretive about it. He used to have a wife, and suddenly she disappeared. The farmer gets MIGHTY angry if you question him about what's in his barn under the tarp, or what happened to his wife and family, but is otherwise a kind hearted soul.",
},
};
typedef struct

@ -646,7 +646,7 @@ Vec2 entity_aabb_size(Entity *e)
}
else if (e->is_npc)
{
if(e->npc_kind == NPC_Farmer)
if(e->npc_kind == NPC_Farmer || e->npc_kind == NPC_ShiftedFarmer)
{
return V2(1,1);
}
@ -3057,11 +3057,13 @@ void do_float_encoding_tests()
Armature player_armature = {0};
Armature farmer_armature = {0};
Armature shifted_farmer_armature = {0};
// armatureanimations are processed once every visual frame from this list
Armature *armatures[] = {
&player_armature,
&farmer_armature,
&shifted_farmer_armature,
};
Mesh mesh_player = {0};
@ -3100,6 +3102,7 @@ void init(void)
Log("Size of %d gs.entities: %zu kb\n", (int)ARRLEN(gs.entities), sizeof(gs.entities) / 1024);
sg_setup(&(sg_desc) {
.context = sapp_sgcontext(),
.buffer_pool_size = 512,
});
stm_setup();
saudio_setup(&(saudio_desc) {
@ -3126,7 +3129,8 @@ void init(void)
binary_file = MD_LoadEntireFile(frame_arena, MD_S8Lit("assets/exported_3d/Farmer.bin"));
farmer_armature = load_armature(persistent_arena, binary_file, MD_S8Lit("Farmer.bin"));
shifted_farmer_armature = load_armature(persistent_arena, binary_file, MD_S8Lit("Farmer.bin"));
shifted_farmer_armature.image = image_shifted_farmer;
MD_ArenaClear(frame_arena);
@ -5570,6 +5574,8 @@ void frame(void)
Armature *to_use = 0;
if(it->npc_kind == NPC_Farmer)
to_use = &farmer_armature;
else if(it->npc_kind == NPC_ShiftedFarmer)
to_use = &shifted_farmer_armature;
else
assert(false);

@ -279,6 +279,7 @@ typedef struct Entity
// npcs
bool being_hovered;
bool perceptions_dirty;
float dialog_fade;
TextChunk *errorlist_first;
TextChunk *errorlist_last;
#ifdef DESKTOP

@ -103,7 +103,7 @@ uniform vs_params {
};
void main() {
vec3 transformed_pos = vec3(pos_in.x, pos_in.y + sin(pos_in.x * 14.0 + pos_in.y * 20.0 + time*1.9)*0.009, pos_in.z);
vec3 transformed_pos = vec3(pos_in.x, pos_in.y + sin(pos_in.x * 14.0 + pos_in.y * 20.0 + time*1.9)*0.000, pos_in.z);
pos = transformed_pos;
uv = uv_in;

@ -13,7 +13,7 @@
#define DIALOG_INTERACT_SIZE 5.0f // length of the centered AABB (not halfsize) around the player of who they're interacting with
#define CAM_DISTANCE 15.0f
#define CAM_VERTICAL_TO_HORIZONTAL_RATIO 0.8f
#define CAM_VERTICAL_TO_HORIZONTAL_RATIO 0.95f
#define ARENA_SIZE (1024*1024*10)
#define BIG_ARENA_SIZE (ARENA_SIZE * 8)

Loading…
Cancel
Save