Group Selection, and OOO Monday

Hey Folks! I managed to solve the duplicate object bug, and worked on group selection today.

The duplicate object bug turned out to be a fairly simple fix. Before my shallow ship loading code, the ship would just load everything it needed right away, using the provided data file. But the shallow loading code deferred that until later. Unfortunately, it was using the wrong name for the data file. It used the generic ship template name, instead of the one from save data. And so, when it loaded, it was generating new objects as if it was based on a template, and the ones the game already loaded were left hanging there.

The fix was just saving the correct name, and making sure that data file was accessible later when needed.

Moving on, I started refactoring the selection system. I want to be able to select an area or group of items so I can designate it as a resource gathering zone, or a zone that trading uses to list items, or security no-go zones, etc. It also lays the groundwork for group commands.

The current system only allows selecting one item, and there's a single bracket object that floats around following whatever is selected. The new system gives each object its own selection bracket, and keeps them hidden/inactive until they're needed. It also uses Unity's 9-slice sprite type so they can expand/contract without smearing the edges.

I have most of this in place now, except I'm running into some coordinate system issues. I'm not entirely sure the viewport coords I'm getting for both camera bounds and item position make sense. I may end up switching it to world space, but we'll see.

Once this is working, I think I'll need some sort of UI I can use to tag the current selection with flags like "tradeable" or "gather" or "blank." These tags might just be conditions on the objects themselves, or on the tiles. Plus some sort of way to make an AI pick up or drop an item in these zones, at a bare minimum. (They can already pickup and use items, so this could just be a command added to their list.)

And then, some UI I can load when one AI is bartering with another, that ties into these zones when searching for items to list on each side. Add and remove funds accordingly.

And then, I think we'll have a crude way for players to earn money. Assuming they can find things by docking, walk to an object, pick it up, drop in the barter zone, then find an NPC to barter with.

As I said, it's crude. But it's the beginnings of a game loop. And something from which I can start spiraling out into more connected systems.

Also, just as a heads-up, I'm OOO Monday due to the holiday. I'll be back on Tuesday, though. Have a good weekend, all!

Comments

Malacodor's picture
Malacodor

Rectangles? How boring. Can we have circles and triangles please? ;-)

Also, I miss the "stay logged in" checkbox on the website.

Ran around with a clown mask before it was cool

dcfedor's picture
dcfedor

Yeah, and arbitrary polygons, too! ;)

I kinda miss that feature as well. I suspect it's a cookie timeout setting, but the place where this is supposed to be defined isn't there. I spent about a half hour poking around, but I'll have to look again later.

Dan Fedor - Founder, Blue Bottle Games

Rovlad's picture
Rovlad

Could we also please get notifications for comments/replies, or at least the number of them underneath the news items?

dcfedor's picture
dcfedor

I think the notification system works for comments, but you have to post in the thread to activate it per-thread. (E.g. "Notify me when new comments are posted" above the submit button) Is it not working for you?

I agree about the missing post count below each news item, though. I think I've figured out how to expose that info on the homepage now, though I got the position wrong on my first attempt. It should settle-in just below the "Read More" links after the cache expires.

Dan Fedor - Founder, Blue Bottle Games

Rovlad's picture
Rovlad

>"Notify me when new comments are posted" above the submit button
I'm not seeing anything like this, here's a screenshot:
https://imgur.com/a/TOFccTI

dcfedor's picture
dcfedor

Hm. Looks like it might've been a permissions issue. Can you try again and tell me if you see the notification opt-in now?

Dan Fedor - Founder, Blue Bottle Games

Rovlad's picture
Rovlad

Yep, seems to be working now, thanks.

dcfedor's picture
dcfedor

Excellent! And thanks for the heads-up.

Dan Fedor - Founder, Blue Bottle Games