1. Hey! Guest! The 34th GMC Jam will take place between August 22nd, 12:00 UTC (Thursday noon) and August 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Graphics Blood screen damage

Discussion in 'Game Design, Development And Publishing' started by jf_knight, Nov 23, 2017.

Tags:
  1. jf_knight

    jf_knight Member

    Joined:
    Dec 23, 2016
    Posts:
    86
    I'm surprised i couldn't find any tutorials, marketplace assets, or shaders on how to create the iconic red-edged screen/hud damage effect in gamemaker studio. Can anyone help?[​IMG]
     
  2. BattleRifle BR55

    BattleRifle BR55 Member

    Joined:
    Jun 24, 2016
    Posts:
    959
    The reason you don't find anything is because there are so many ways to go about an admittedly simple effect that it would be pointless to have specific tutorials and assets for it, not to mention how few people use 3D so it's even less likely that anything will exist.

    What exactly do you need help with?
     
  3. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    769
    Easiest way would be to;

    - Create a surface at GUI size
    - Draw a red rectangle over the full surface (maybe even some cool bloody shaped thingie?)
    - Draw a round gradient alpha circle over it depending on the damage
    - Draw surface over game screen (possibly under GUI, looks weird if its over GUI)
     
  4. jf_knight

    jf_knight Member

    Joined:
    Dec 23, 2016
    Posts:
    86
    I thought so. I'm not asking for help how to make it, I'm looking for help looking for a tutorial / already-made asset. Saving time over making a simple feature from scratch.
     
  5. BattleRifle BR55

    BattleRifle BR55 Member

    Joined:
    Jun 24, 2016
    Posts:
    959
    But what exactly are you looking for? Like I said, there are so many ways. You might as well be asking "give me a gun model" without specifying its class, how many polys it should have, the art style, if it's real or fictional, ammunition type, if its sights are able to be looked down, file type, etc. DukeSoft gave you an example, but it could be completely against what you're after.
     
  6. jf_knight

    jf_knight Member

    Joined:
    Dec 23, 2016
    Posts:
    86
    I'd be happy with a shader/ glsl code (if thats not too much of an overkill). I've learned how to translate shadertoy glsl into gamemaker glsl (no luck looking there either). OR perhaps a scrip that does it through an alpha gradient like DukeSoft suggests.
     
  7. DukeSoft

    DukeSoft Member

    Joined:
    Jun 20, 2016
    Posts:
    769
    That script probably contains less characters than the post you've just written :p
     
    BattleRifle BR55 and rIKmAN like this.
  8. Bingdom

    Bingdom Googledom

    Joined:
    Jul 1, 2016
    Posts:
    1,677
    Code:
    gl_FragColor = vec4( v_vColour.rgb * texture2D( gm_BaseTexture, v_vTexcoord ).rgb, distance(vec2(0.5), v_vTexcoord)*intensity );
    Intensity is a uniform float.
    Draw it to the application surface.

    If you want to make a separate surface for it, the shader could be written more efficiently (get rid of texture2D).

    The effect you're looking for is called a vignette. If the one I wrote is something you don't like, I managed to find one on shadertoy.
     
    jf_knight likes this.
  9. jf_knight

    jf_knight Member

    Joined:
    Dec 23, 2016
    Posts:
    86
    Thank you. This helps :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice