Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Perhaps it was an error on my side; then I need your help with the code.

I've added this line in the beginning of draw event in every wall or block:

triangles_break_batch((image_xscale + image_yscale + image_xscale*image_yscale)*2)

And this line in the beginning of draw event in every floor and ramp:

triangles_break_batch(image_xscale*image_yscale*2)

Then, I've created a script (still uisng gms 1.4) named "triangles_break_batch" containing this code:

global.triangles_so_far += 2*argument0
       if(global.triangles_so_far >= 1000)
            {
              global.triangles_so_far -= 1000 
              d3d_transform_set_identity();       
            }

Finally, I've added this to the create event of CONTROL object:

global.triangles_so_far = 0

Weird, everything looks like it should... does draw_flush exist in your version of GM? If it exists you should call that alongside d3d_transform_set_identity in triangles_break_batch (and maybe in draw_self_enemy as well) just to make sure the draw pipeline gets flushed.

my version does not have draw_flush. is there anything else I could do, or should I try to get the greater version of GMS?

I would recommend looking into it if it's an option, GMS1 hasn't had official support in years and it's only a matter of time before its old graphics APIs will stop working entirely... :(

Currently the free license lets you export games to desktop platforms if the game's not sold, so there's basically nothing to lose just trying it out. (And I'd recommend getting GMS2 from the official download page since it's literally free)

updated gml to the 1.4.9999999, where draw_flush() exists. didn't fix the error

The issue might just be that GMS1 uses a too old graphics API, it's not had official support in years... not much I can do about that :(