Thanks beyond thanks for the reply youll
Thanks beyond thanks for the reply - you’ll definitely get credit (or at least a big tip if i can ever finish this project and get it out there), because you’re among those I’ve learned from, and coming from a position of zero education and no modern programming knowledge, I can assure you: it’s been difficult to piece together an education in game design with an improvised curriculum, so every little bit helps. While most people who get into this come from a programming background end up needing assistance with the art and music ends, I’m coming at it from the opposite side of the spectrum: I’ve been composing, recording, and engineering music since the magnetic tape era and doing digital design/animation for just as long, so it’s just the coding I have to really apply myself to and make myself learn. I won’t lie: it’s been frustrating, trying to figure it all out by reading manuals and various youtube videos, reddit threads, and yoyo forums because while I’m able to learn the functionality of the code easily enough and there are a lot of helpful resources out there in that respect, context is everything and it can be maddening, trying to figure out how to apply what I’ve learned in useful or practical ways. For example, I’ve figured out enough to know that data structure grids can probably help me overcome my current problem with collisions (like you, I began building my 2.5d environment from that exact Matharoo video and even managed to write a pretty decent place-meeting-3d script from the ground up… until, like you, I hit my current impasse of being unable to figure out how to handle multiple collisions at once… but, unlike you, every alteration i make to my code only creates more problems), but while I understand how ds grids work, I can’t figure out the proper context in which to apply them as a solution to my collision problem. So, I’m giving up and resorting to reverse engineering - when it comes to a lot of things, I can usually figure stuff out if i can just see it working under the hood, so i hope that’s true for ds_grid collision implementation. I’m telling you this because I downloaded your suite of 3d scripts and intend to try and figure out how to implement them, working backward. I honestly don’t mean to steal all your work, as you’ve been more than generous in helping people like me by sharing it in the first place, but it’s hard to resist using it as a basis for my education because the physics of your project and your design process and ideas (like self-skinning objects) are so similar to mine. I can assure you, though: I won’t be simply copying and pasting your functions, because I have no idea how to use them or from where to run them… it’ll be trial and error (already, in trying to structure a Shaun Spaulding-style collision code (might as well start with what i know and see what works!) using your version of place_meeting_3d, I immediately encountered a “variable not defined” error in the instance-place-3d script it calls… maybe because I’m substituting noone for null, which is a variable gm doesn’t appear to recognize, or maybe not… this is gonna be fun). At any rate… thank you. Sooner or later, I’ll get past the physics and into the familiar territory of writing, drawing, and composing… but without your scripts, who knows how long that would take me! Shoulda gone to college… oh well.
You’re welcome, anytime! Gamedev is such a multidisciplinary thing that it’s a LOT to try to do all at once, whether you’re coming from a programmer position and aren’t good at art, or an artist who doesn’t know programming yet. College helps with foundational stuff, but what you’re doing (researching and learning yourself and putting it into action) is a pretty powerful method and will carry you a long way
You’re right, null is a macro I created to stand for noone. Hard to break my day job coding habits haha. It sounds like you’re somewhat familiar with the debugger, but I highly, highly recommend learning it more (especially breakpoints and such) for figuring out stuff like “variable not defined”. The GameMaker debugger can be a little misleading at times, but it’s so much easier than all the guesswork. It’s improving a lot in the latest updates too!
It’s been a while since I’ve looked at my 3D collision stuff in depth (it kind of scares me now lol), but yeah, learning how the ds_list stuff works should help. It’s basically just (if I remember correctly) grabbing a list of things the object is colliding with, and then checking whether or not they match up on the z axis. I don’t want to necessarily say “collide” because it’s not using the built-in GM functions for z-axis collisions, but it’s checking the z position, height, and seeing if either intersect.
So basically: get a list of collisions on the normal x, y coordinates as a ds_list, then loop through the list and check for intersection on the z axis. If so, there’s a 3D collision!
Gamedev is no joke, but you’ve got the right approach and you’re making great strides, keep it up!
Also posted on Tumblr.