Skip to main content

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

ratratratrats

6
Posts
3
Topics
1
Followers
1
Following
A member registered Aug 29, 2021

Recent community posts

I see! It's working beatifully now, thank you!

If I'm understanding correctly, I can set the override in the create. Then in the draw I can do something like this:


So where I left the comment I would have to do my own sprite-stacking, to achieve my desired effect? This seems a little risky, I figure my own draw events wouldn't integrate too nicely into your engine. If this is the case I don't want to work against your system. What would you recommend in this situation - you mentioned setting up a custom shader for the model, could that be  a better alternative?

Hi!

I am currently aiming to add a 'flash' effect on sprites in my game when they get hurt/hit or whatever. Historically, I have achieved this effect by setting a shader, redrawing the sprite over top of the existing one with an alpha which decreases over time, and then disabling the shader.

Of course, while using fauxton a lot of the nitty-gritty control is handled within the engine. No longer can I simply drop something into the draw event.

I've gone over the nice little segment on setting up the buffers and shaders within the documentation, but I'm still at a loss as to how I could tackle this problem.

PS. If there is a solution to this problem which doesn't require shaders at all, that's just as fine with me!

Great reference! I managed to get it working after a bit of tinkering. I ended up making my own simple raycasting funcion which assumes we are looking for an intersection on the z = 0 plane.  Anyone reading this is welcome to steal it:

function simple_raycasting( dx, dy, dz, ox, oy, oz ) {
    var _t = oz/-dz;
    return [ox + dx*_t, oy + dy*_t];
}

Very basic logic to handle moving 'up' platforms - basically tracking the 'height' in the z axis of each object and adding another check before collision occurs to determine if it is short enough to step up (relative to the player's current distance off of the ground).

The platform works similarily but obviously does not register a collision on any level but it's height.

Hi! Pictured here is a small test environment I've made. I was curious how I would go about snagging the position of the mouse in the room.  I've annotated some debug text on screen here, on the left you can see the players position, and on the right my mouse (which didnt make it into the screenshot but it's a little to the left of the player)

The mouse position seems to go into wild numbers whenever the camera is rotated. On the default axis it seems to work somewhat as I would expect - like when the room is first loaded up and the camera is facing straight north the mouse_x is the expected value (mouse_y is not).

Any thoughts? The projection of the camera seems to have a huge impact on the values.