From 1a1ff2e35147332f24ee6d7ed8fb5c9db36dba75 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Fri, 24 Jul 2020 17:30:13 +1200 Subject: [PATCH] CommitLog | --- Spaceinator.project.gmx | 1 - objects/obj_chunk.object.gmx | 2 +- objects/obj_controller.object.gmx | 2 ++ objects/obj_controller_world_gen.object.gmx | 4 +++- sprites/images/spr_chunk_0.png | Bin 76 -> 2276 bytes sprites/spr_chunk.sprite.gmx | 8 ++++---- 6 files changed, 10 insertions(+), 7 deletions(-) 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 a5bbd77fd79eb10941cbc6a35090b0f599a9d77e..a552261ef863ddd3729248f7b1b551e40bd4c987 100644 GIT binary patch literal 2276 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&zE~)R&4YzZe)eR(rZQhE&XXdu<~x6C)4H z!S!wbtXt$b&MlZbQE$tWg89$C*3F(dGcxBn|BRV4Z`RSCx-ZMfVDHMn;4p!Kp+SL> zfx!{z=q45h1{O}BbA=cf1XLIp6g);1jE2K#dKk?YqvgYBIXPM#42f!S7E8m-nKS=> lKPPWsY`pm|snk!qrt6Pf4346LYhE&W+P6+t@f4+vzstNnJ Z7`IKiCRnDb9S)Rc@O1TaS?83{1ORr46XyT` 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