• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Random Graphical Glitches - Clearing Cache Does Nothing

A

AgentD

Guest
Hi there,

I've been experiencing some graphical glitches in my game with sprites drawing at complete random. Clearing the cache doesn't change anything. Here's a video to show one example of what I mean:

https://drive.google.com/file/d/0B7Uw15XguKhHdUpoS0VsUDZacFk/view?usp=sharing

Here's the code that governs that textbox, it's a texture drawn over a primitive with an alarm controlling the texture's scrolling. I assumed it had something to do with the UV value of my primitive's texture being larger than 1, but according to the manual, as long as my texture_set_repeat is true, it should work correctly:

Code:
scrollx = alarm[1]/60;
scrolly = alarm[1]/60;
texture_set_repeat(true);
if attribute[line, 1] = 1
    {
    //draw shape behind animation
    draw_primitive_begin(pr_trianglestrip)
    draw_vertex(0, 148);
    draw_vertex(0, 340);
    draw_vertex(434, 148);
    draw_vertex(434, 340);
    draw_vertex(542, 148);
    draw_primitive_end();
    //draw animation
    draw_set_alpha(1);
    draw_set_colour(c_white);
    draw_primitive_begin_texture(pr_trianglestrip, sprite_get_texture(dialogueanimation_spr, -1));
    draw_vertex_texture(0, 148, scrollx, 0);
    draw_vertex_texture(0, 340, scrollx, 1);
    draw_vertex_texture(217, 148, scrollx+1, 0);
    draw_vertex_texture(217, 340, scrollx+1, 1);
    draw_primitive_end()
    draw_primitive_begin_texture(pr_trianglestrip, sprite_get_texture(dialogueanimation_spr, -1));
    draw_vertex_texture(217, 148, scrollx, 0);
    draw_vertex_texture(217, 340, scrollx, 1);
    draw_vertex_texture(434, 148, scrollx+1, 0);
    draw_vertex_texture(434, 340, scrollx+1, 1);
    draw_primitive_end()
    draw_primitive_begin_texture(pr_trianglestrip, sprite_get_texture(dialogueanimation_spr, -1));
    draw_vertex_texture(434, 148, scrollx, 0);
    draw_vertex_texture(434, 340, scrollx, 1);
    draw_vertex_texture(542, 148, scrollx+.5, 0);
    draw_primitive_end()
    }
Does anyone have any ideas about what might cause this and how I can fix it?

Thanks!
 
Top