lojemiru / loj-hadron-collider Goto Github PK
View Code? Open in Web Editor NEWA robust, pixel-perfect collision engine for GameMaker Studio 2.3.
License: MIT License
A robust, pixel-perfect collision engine for GameMaker Studio 2.3.
License: MIT License
As such, all references to it must be replaced with equivalent functionality.
This is an issue for some scenarios where instance layers are deleted before their creation events can run.
Not sure if it screws up the LHC or not, but I need to find out.
Add a binding function to feed x/y velocity variable references into the LHC for use in the builtin collision behaviors. Along with enabling more complex builtin collision behaviors in general, this should theoretically allow for an enhanced version of lhc_behavior_push
that manipulates an object's x/y velocity instead of position, allowing for pushables that stop at walls.
This would also require a semi-recursive call of lhc_move(xVel, yVel)
as follows:
function lhc_behavior_push_horizontal() {
var col = lhc_colliding();
if (lhc_collision_right()) {
variable_instance_set(col, __lhc_xVelVar, bbox_right + (col.x - col.bbox_left) + 1 + __lhc_xVel);
}
else if (lhc_collision_left()) {
variable_instance_set(col, __lhc_xVelVar, bbox_left - (col.bbox_right - col.x) - 1 + __lhc_xVel);
}
with (col) {
lhc_move(variable_instance_get(self, __lhc_xVelVar), variable_instance_get(self, __lhc_yVelVar));
}
}
title
Howdy! I've been checking out the LHC and it looks awesome. I am curious, though - does it have any way to use different collision masks for different interfaces? For instance, using one mask for collisions with terrain and a different one for collisions with enemy hitboxes. As far as I can tell by reading the wiki, it seems like this wouldn't be possible if both types of collision are being handled using lhc_add(), since everything's handled within a single lhc_move() call.
Of course, it wouldn't be a big deal if it's necessary to just make a separate obj_hurtbox that sticks to the player and other things with this behaviour, but I figured I'd ask just in case I missed something.
Forgot about accounting for static collisions in the transition to Interfaces. Whoops.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.