Author Topic: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible  (Read 6433 times)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5757
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #45 on: October 15, 2019, 04:08:35 pm »
Please either don't include previous post at all, or put it into proper quote tags.

This is unreadable.

Offline krautbernd

  • Commander
  • *****
  • Posts: 504
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #46 on: October 15, 2019, 10:01:40 pm »
My system above answers the problem.
Now if only you get someone to code it we're golden. It's hardly the first time this has ever been suggested. I've also told Yankes that he should simply go the exclusive route, but that's not what he has decided on. IMO not having exclusive sizes is better in the end since it offers more options down the road, like being able to house multiple small craft in one large hangar, making craft transfers easier etc.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 566
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #47 on: October 15, 2019, 11:12:28 pm »
You can code it..  I have faith in you.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 566
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #48 on: October 15, 2019, 11:20:45 pm »
Please either don't include previous post at all, or put it into proper quote tags.

This is unreadable.


Will try Meridian, thank you.

Offline krautbernd

  • Commander
  • *****
  • Posts: 504
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #49 on: October 15, 2019, 11:22:36 pm »
You can code it..  I have faith in you.
Oh stop spoiling me  ;D

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 566
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #50 on: December 20, 2019, 03:41:40 am »
Today I have a discussion with SupSuper on this topic for a design solution that allow of this feature to be possible. Here is a break down. I want to thank Supsuper for his time, generosity and kindness for this consultation. Please note this is an edited version.

Precentor AppollyonToday at 10:39 AM

Hi Supsuper, I would like to run through with you on a few questions only a developer like yourself can answer.
I understand you and warboy coded the hanger feature a long time ago for the vanilla UFO enemy unknown.
This has nothing to do with OXCE, I just want to understand OXC and by extension to OXCE, if you are to code a hanger having 1x1 and 2x2 with permission given to which specific craft can dock or use it. If the craft sprite can be edited to fit the hanger, would permission flag alone be enough to make it work?

SupSuperToday at 10:45 AM
i'm not sure what you're asking. hangars can't restrict crafts in OXC. or are you asking if such a feature would be possible?

Precentor AppollyonToday at 10:45 AM
Yes, would be possible
I mean currently, in the vanilla build, hanger can fit only 2x2 craft
If I am to have 1x1 hanger.
Currently, the problem is that craft can't fit properly in a 1x1 hanger. However, fitting a craft in a hanger is a sprite issue isn't it?
You can use a graphic editor to make the sprite to fit in a 1x1 hanger.

SupSuperToday at 10:47 AM
yes, it's just a visual bug. hangars and crafts can theoretically be any size

Precentor AppollyonToday at 10:47 AM
So could permission flag alone would make this possible.
Say a craft is given permission to dock at Hanger X and can't dock with Hanger Y
Such a feature can be coded without worrying about space allocation problem, yes?

SupSuperToday at 10:49 AM
yes, it should be possible

Precentor AppollyonToday at 10:50 AM
I though so. How complicated and hour intensive will be by your estimate? Your input will be very much appreciated.

SupSuperToday at 11:05 AM
hard for me to estimate since i already know the codebase,  but i'd say a few hours, depends if it's just a visual flag or if it actually affects purchase/manufacture

Precentor AppollyonToday at 11:05 AM
Probably won't affect Purchase or manufacture, there's already such a feature in place in OXCE. Again, thanks for the info, very much appreciated.

SupSuperToday at 11:06 AM
if it's just "don't draw this craft on this hangar" then it should be simple

Precentor AppollyonToday at 11:07 AM
Sorry, please elaborate more by what you mean "don't draw this craft on this hangar

SupSuperToday at 11:09 AM
i mean you restrict what craft sprites can be drawn on top of (dock) the hangar

Precentor AppollyonToday at 11:09 AM
Okay, thanks!
But how would that be a problem though? A graphic editor can edit the craft sprite and make it fit. It is just craft sprite to make it fit, yes?

SupSuperToday at 11:12 AM
yes, it's not a problem
Precentor AppollyonToday at 11:13 AM
Thanks
I want to sincerely tell you how much I do appreciate, of you helping me with my question.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5757
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #51 on: December 20, 2019, 10:38:34 am »
As usual, your questions are super-cryptic.

As far as I can say SupSuper is answering a completely different question than what you (tried to) ask.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 478
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #52 on: December 21, 2019, 10:31:54 am »
Like I wrote to PA earlier,

If we want multiple hangar sizes, multiple craft per hangar, multiple craft types and hangars accepting craft based on their type, then the problem of stuffing craft into hangars is NP-complete.

If we want this, code must optimally pack craft into hangars, so that we don't end up with base not having a spot for a craft depending on a phase of the moon, and do it consistently so that we have some idea on how to draw the stuff.

It is hard. Yankes' git stash from the yesteryear is definitely not there. Given the base sizes, this can be brute-forced, but I don't see how right now.

And I definitely do not think that a partial solution is worth implementing.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2191
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #53 on: December 21, 2019, 01:04:53 pm »
yup, this have some tricky aspects that need some figuring out to make it correctly.
One way I think this could be done is limit crafts and hangars to max 64. This have two very good properties, we give limit to exponential grown and we could use one 64bit operation check 64 cases at once (this could be optimized further by SSE).