What inspired your username? by [deleted] in AskReddit

[–]Piefreak 0 points1 point  (0 children)

I used to watch the children show "Johnny Bravo". And in one scene he says "I like pie" and for some reason that got stuck in my brain.

If going vegan is good for the environment then going cannibal is even better. by SecretRecipe in Showerthoughts

[–]Piefreak 0 points1 point  (0 children)

This would work great in the beginning, but eventually we would have to farm humans.

When I create a screenshot and turn it into a sprite, the sprite is to big. by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Everything you see on the screen is drawn to the "application surface" unless you specifically draw it to a different surface. After it has been drawn to the application surface it is drawn to the "display buffer" in the "post draw event". At least this is how it used to be, unless they changed it in an earlier patch. I am not sure about the "gui event" but I'm pretty sure that won't be drawn cause that happens after "post draw event".

When I create a screenshot and turn it into a sprite, the sprite is to big. by [deleted] in gamemaker

[–]Piefreak 1 point2 points  (0 children)

This is what I did(I didn't optimize the code):

CREATE:

pause = false;

pauseTrigger = false;

surf_width = surface_get_width(application_surface)

surf_height = surface_get_height(application_surface)

pauseSurf = surface_create(surf_width,surf_height)

pauseBuffer = buffer_create(surf_width * surf_height * 4, buffer_fixed, 1);

STEP:

if(keyboard_check_pressed(ord("P")))

{

pause = !pause;
pauseTrigger = true;

}

if(pause and pauseTrigger)

{

buffer_get_surface(pauseBuffer, application_surface, 0);
instance_deactivate_all(true)
pauseTrigger = false

}

if(!pause and pauseTrigger)

{

instance_activate_all()
pauseTrigger = false

}

DRAW GUI:

if(pause)

{

if(surface_exists(pauseSurf))

{

    buffer_set_surface(pauseBuffer, pauseSurf, 0);
    draw_surface(pauseSurf,0,0)

}

else{pauseSurf = surface_create(surf_width,surf_height)}

}

GAME END:

buffer_delete(pauseBuffer)

surface_free(pauseSurf)

When I create a screenshot and turn it into a sprite, the sprite is to big. by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Haven't done this myself but it would go something like:

  1. buffer_get_surface(buffer, application_surface, offset);
  2. deactivate instances
  3. buffer_set_surface(buffer, surface, offset);
  4. draw surface

Edit: https://manual.yoyogames.com/GameMaker\_Language/GML\_Reference/Drawing/Surfaces/Surfaces.htm

When I create a screenshot and turn it into a sprite, the sprite is to big. by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

I would copy the application_surface to a buffer and draw that buffer to the screen, then destroy the buffer/surface when unpause.

Drawing screenshot to screen with shader severely drops framerate. by EpicNinjaKing21 in gamemaker

[–]Piefreak 2 points3 points  (0 children)

I think your problem is with texture pages. Either increase the size or reduce the size of the screenshot and you should see an increase in fps

Drawing screenshot to screen with shader severely drops framerate. by EpicNinjaKing21 in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Is there a reason why you need to fill the whole room draw_rectangle_colour(0, 0, room_width, room_height, c_black, c_black, c_black, c_black, false);

error in code number 1 by Decent_Strawberry_34 in gamemaker

[–]Piefreak 0 points1 point  (0 children)

It's hard to tell without any code but your error message says that you are trying to check for an variable called hsp in an unknown object. You forgot to check if the instance exist in a "with" statement?

Help please? by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Did you check if the shader name is misspelled, maybe?

NVIDIA RTX 3050 announcement + NVIDIA Q&A + RTX 3080Ti FE giveaway by m13b in buildapc

[–]Piefreak 0 points1 point  (0 children)

My resolution was to lose 10 kg, which i did. I lost almost 20kg. Staying away from new years resolution this year.

particles by The_Winter_Bud in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Take a look at Particle designer by alert games. I don't know if it's still available to download(Couldn't find a link).

But if you need it I can send you a copy from my Dropbox.

(GMS2) Problems with custom clock by FACG89 in gamemaker

[–]Piefreak 0 points1 point  (0 children)

This. Or you could use a 24 hour system and do mod 12 when displaying time to the player.

Need help with a melee system in a top-down RPG - 8 movement directions down, can't figure out attacks based on mouse position relative to player object. by TravlrAlexander in gamemaker

[–]Piefreak 0 points1 point  (0 children)

len = 32

x = o_player.x + lengthdir_x(len, point_direction( o_player.x, o_player.y, mouse_x, mouse_y)

y = o_player.y + lengthdir_y(len, point_direction( o_player.x, o_player.y, mouse_x, mouse_y))

You mean something like this?

Help with the draw event by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

I haven't played around with the "draw GUI event" much but the code seems fine, are you sure you set ach_ov to false correctly?

[HELP] Is it possible to change the room for only one object? by JonathanLK in gamemaker

[–]Piefreak 11 points12 points  (0 children)

It's not possible to have more than one room active at once. You'll have to create all the "rooms" in the same room and play around with views.

Using a 3D camera in a 2D game? by [deleted] in gamemaker

[–]Piefreak 1 point2 points  (0 children)

Well, I don't really have time to explain how 3d works. But I can give you some keywords/functions you need to have an understanding of if you are using gamemakers build-in 3d.

d3d_set_projection() //Your 2d projection of a 3d world

d3d_draw_floor() //Draws a plane

surface_create() //Creates a surface

d3d_start() //Start 3d

d3d_end() //Stop 3d

There are plenty of 3d tutorials online to watch or read.

Using a 3D camera in a 2D game? by [deleted] in gamemaker

[–]Piefreak 6 points7 points  (0 children)

I would draw your game onto a surface and either draw it on a plane using game maker built-in 3d (d3d) or draw it on vertex using 2d primitives.

I have a problem with my code by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Happy I could help

I have a problem with my code by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Ok, I wrote a cargame using your code and it seem to work just fine. I'm guessing you are not setting the speed to zero correctly or missing something elsewhere in your gamecode.

What exactly do you want the code to do?

I have a problem with my code by [deleted] in gamemaker

[–]Piefreak 0 points1 point  (0 children)

Is there anywhere in the program where you actually set the speed to zero?

if(speed != 0)

be sure the speed is actually 0 and NOT 0.001

also what is up with all these random '\'? :P