Log In  
Follow
KoboldKing

A dumb kid who loves old games and really wants to get PICO-8.

[ :: Read More :: ]

Okay, so I've been working on a cart as of late, and it's been really fun! However, I've hit a roadblock and I'm not sure how to overcome it, could I have some help?
So the game I'm making is a little factory game, and I'm currently trying to get conveyor belts working, specifically getting objects to stop when they run into each other.
I have two tables for co-ordinates; one for x-values of objects, and one for y-values. There are some subtables for certain objects, but that's not important.
Basically, my collision function checks those tables, sees if there's anything in the way, and if there isn't, it moves the object forward. However, whenever it checks the tables, it checks the entire X table, and then the entire Y table. So if there's an object that's in the obstruction area in the Y table and a separate object in the X table, the code thinks there's something in the way, and it stops the object.
So the million-dollar question is: Is there a way to have for functions stepped through one at a time, so as to keep the X and Y co-ordinates in sync? Or is there a better way? Let me know if ya'll need clarification or code examples.

P#135276 2023-10-02 14:11

[ :: Read More :: ]

Okay, when viewing code for a bunch of games, there seems to be variables that are put into the parentheses after a function's name. What are the purpose of these?
My guess is that they're local variables, but I have no idea.

P#111299 2022-05-04 21:06

[ :: Read More :: ]

I have a Raspberry Pi 4, and I'm not sure if Voxatron works on it. Does anyone have any experience with trying to make Voxatron work on one?

P#85701 2020-12-22 23:12

Follow Lexaloffle:          
Generated 2024-04-18 16:35:53 | 0.070s | Q:7