The Flavortown Port banner

The Flavortown Port

5 devlogs
10h 57m 34s

Help ship projects!
Its a physics based factory game sort of like Hydroneer or MineMogul, except instead of ore and rocks, you are moving projects! Process them, and send them to the ship, so they can be shown to the world!

This project uses AI

Needed Github Copilot to help with vectors. I hate vectors, and didn’t know what I was doing, so I had to use it. There are about three lines in the conveyor belt code that I just couldn’t figure out. They are lines 40, 41, and 49 on shipping_crate.gd. Thats all the AI code in this project.

Repository

Loading README...

thirtyseven

Fixed the turn conveyors, and by fixed, i mean i absolutely made them weirder and they look ridiculous now, but they work way better so ¯_(ツ)_/¯. (also no visual stuff is final obv, unless I get lazy, in which case it might be)
Conveyors can now be turned off by calling a function, which i used to make a machine that holds a package (not done yet).
Picking up packages is still jank, and I can’t figure out why? For some reason it seems the gravity or velocity accumulates while you are holding it, despite me constantly clearing the velocity, and clearing it when you let go of a package. It might stay lol, and people will just have packages teleported to the abyss.
I also started on the splitter for conveyors, its very broken right now, and has even more z fighting than the turn belts

Its time to get back to work on this as well lol

Changelog

Attachment
Attachment
0
thirtyseven

Made some conveyor variants, just left and right. Also fought with some logic to let the player pick up packages. Apparently the conveyor direction is backwards? Telling the conveyor to move towards +X will make it move towards -X. I don’t know how this happened, but I don’t feel like fixing it right now.
Player picking up packages was a lot of trial and error because with RigidBodies there is so much acting on them, disabling all of it to let the player directly control it was hard. Sometimes when you set it down it rockets down with high velocity and I don’t know why.
I also started on the processing machines. I actually dont know where the time went lol. It shouldn’t’ve taken 2 hours to pick up crates, but here we are, with my inefficient problem solving.

1

Comments

thirtyseven
thirtyseven 24 days ago

oh im looking back through this and wow the music is in that video. oops lol

thirtyseven

Finally actually finished the conveyors. Apparently they still didn’t work properly as of my last devlog. The solution was the reversal of one multiplication statement. When trying to rotate vectors in Godot, if you want to rotate in all axes, you need to multiply by global_transform.basis, but apparently THE ORDER THAT YOU MULTIPLY IN MATTERS. Why? WHY? Thats not how I was taught multiplication works.
Either way, before, it was Vector3(0,0,-1) x global_transform.basis and
the fixed version is global_transform.basis x Vector3(0,0,-1)
I think im mostly done with awful vector math. Well, I still have to make more belts and make machines, but I don’t have to figure out the math as much.

0
thirtyseven

Three hours to make a conveyor belt. I swear im not inflating. This was really hard. I tried so many things. I eventually came around to the realization that the only way to do this was to get the total direction of conveyors acting on a package, and apply speed based on that. Before I figured that out I tried so much else. I tried checking when an object leaves and enters a conveyor, but that doesn’t work because objects enter a new conveyor before leaving the last one. I then tried applying the motion directly, while it was on the belt, but that didn’t work either.
I tried so many other things that I can’t even remember now, and came across some wild issues. I’ll attach some videos of me accidentally sending boxes to NAN. (you can still see them because Godot panics and just keeps showing them where they were)

Also I had to use a bit of AI to figure out how to apply the motion properly, because you need to maintain physics, while applying motion. Sorry, but at least theres only like 3 lines of AI code.

Also I love 4.6. Only wish is for editor level plugins or git support. Apparently the Forward+ renderer compiles to web as well now? Didn’t know, but it let me.

1

Comments

thirtyseven
thirtyseven about 2 months ago

I attached the wrong vid for the first one lol
sorry, click to the second video

thirtyseven

Conveyor belts are hard. Really hard.
Thats all i’ve been doing this whole time (aside from basic project setup)
The problem is that I basically need a moving platform under the conveyors, but that doesn’t work because a platform ends. So I first tried using gravity, as seen in the video below. That meant that it constantly accelerated to really high speeds while on the conveyor. Next I tried using force applications because I am using rigid bodies for the packages. That didn’t work either. I’m out of ideas so I’m posting this devlog.
I also got some basic player movement done, and setup a testing level.

0