diff --git a/Spaceinator.project.gmx b/Spaceinator.project.gmx index 88bdcfe..6fc0227 100644 --- a/Spaceinator.project.gmx +++ b/Spaceinator.project.gmx @@ -22,7 +22,6 @@ background\bg_space - objects\obj_player objects\obj_controller_world_gen diff --git a/objects/obj_chunk.object.gmx b/objects/obj_chunk.object.gmx index e67fd99..6f2ac1f 100644 --- a/objects/obj_chunk.object.gmx +++ b/objects/obj_chunk.object.gmx @@ -69,7 +69,7 @@ for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE) var chunk_total_size = CHUNK_SIZE * TILE_SIZE -if(distance_to_object(obj_player) > chunk_total_size+(TILE_SIZE*5)) +if(distance_to_object(obj_player) > 1) { event_user(0); } diff --git a/objects/obj_controller.object.gmx b/objects/obj_controller.object.gmx index afc299e..1651ec5 100644 --- a/objects/obj_controller.object.gmx +++ b/objects/obj_controller.object.gmx @@ -50,6 +50,8 @@ 1 /// Every Frame Global Code. step_counter++; +x = view_xview[0]; +y = view_yview[0]; diff --git a/objects/obj_controller_world_gen.object.gmx b/objects/obj_controller_world_gen.object.gmx index b77bcf1..742d878 100644 --- a/objects/obj_controller_world_gen.object.gmx +++ b/objects/obj_controller_world_gen.object.gmx @@ -63,6 +63,8 @@ var chunkRelY = playY % chunk_total_size; var chunkX = (obj_player.x - chunkRelX); var chunkY = (obj_player.y - chunkRelY); +// Fix annoyances where % negative = positive + if(chunkX < 0) { chunkX -= chunk_total_size; @@ -84,7 +86,7 @@ if(chunkX == 0 && (playX < 0 && playX >= chunk_total_size/ } -instance_activate_region(chunkX,chunkY,12,12,true); +instance_activate_region(chunkX,chunkY,1,1,true); var chunkat = instance_position(chunkX, chunkY,obj_chunk); if(chunkat == noone) // create diff --git a/sprites/images/spr_chunk_0.png b/sprites/images/spr_chunk_0.png index a5bbd77..a552261 100644 Binary files a/sprites/images/spr_chunk_0.png and b/sprites/images/spr_chunk_0.png differ diff --git a/sprites/spr_chunk.sprite.gmx b/sprites/spr_chunk.sprite.gmx index 5f8e075..954ddbf 100644 --- a/sprites/spr_chunk.sprite.gmx +++ b/sprites/spr_chunk.sprite.gmx @@ -8,17 +8,17 @@ 0 1 0 - 9 + 511 0 - 9 + 511 0 0 0 0 - 10 - 10 + 512 + 512 images\spr_chunk_0.png