aliens

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

wcho035

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

wcho035

  • Guest
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #46 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: 1108
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #47 on: October 15, 2019, 11:22:36 pm »
You can code it..  I have faith in you.
Oh stop spoiling me  ;D

wcho035

  • Guest
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #48 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #49 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: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #50 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

  • Global Moderator
  • Commander
  • *****
  • Posts: 3346
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #51 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).

Offline Dogbarian

  • Captain
  • ***
  • Posts: 93
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #52 on: January 25, 2021, 05:35:35 pm »
Any movement ever occur on this (preferably something that works with OXC)?

I'd love to just resize the sprites and have the 2x2 hangar support 2 craft, nothing more.   Will OXC support that?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #53 on: January 25, 2021, 06:51:45 pm »
Any movement ever occur on this (preferably something that works with OXC)?

I'd love to just resize the sprites and have the 2x2 hangar support 2 craft, nothing more.   Will OXC support that?

Yes, this already works in OXC for many years.

The hangars can already accommodate any number of craft... 1, 2 or even a 100.

It is also possible to "resize the sprites", if you mean making a smaller hangar... 1x1 hangars are indeed supported.

Offline Dogbarian

  • Captain
  • ***
  • Posts: 93
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #54 on: January 25, 2021, 11:09:07 pm »
Ah, excellent, thank you!  The way I was reading this, it wasn't clear it actually worked.

Yeah, by resizing the sprites, I meant of the aircraft to try to display 2 of them in a standard 2x2 hangar (and there was a 2 pad hangar artwork that someone already showed off).  Sorry, should have been more clear.   And that part may not actually work, but that's less important, to me at least.

Appreciate the quick response!

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #55 on: January 29, 2021, 09:10:28 am »
My solution proposed is for each hangar to allow any number of craft types, but each craft to only be allowed into a single hangar type. As we currently only have one hangar type anyway, there would be nothing lost in implementing it this way.

An example way to implement it would be to have each hangar and each craft be assigned a hangar type. Craft can only be added to the base if their hangar type matches an available (unused) hangar type in the base.
The base would have all of its hangar types listed internally in a lookup table, for example: 0, 0, 1, 1, 1, 2
Landed craft have a lookup table for used hangar slots, example: 0, 0, 1, 2
In this situation, only a craft of type 1 can be added (two of them can be). There will be a single craft assigned to the base of type 2, one of type 1, and two craft of type 0. If the type 2 craft is sold, then the lookup table is changed to: 0, 0, 1
« Last Edit: January 29, 2021, 09:22:06 am by The Reaver of Darkness »

Offline krautbernd

  • Commander
  • *****
  • Posts: 1108
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #56 on: March 06, 2021, 01:46:03 pm »
Dredging this up again, as I would still be interested in seeing this implemented, if only supporting one hangar "size/"type" per craft.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9076
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #57 on: March 06, 2021, 02:12:39 pm »
Yes, I can confirm still is still planned.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
« Reply #58 on: March 06, 2021, 04:51:13 pm »
I was hoping it would be part of 7.0, TBH =)

Offline rkagerer

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: [Suggestion] Make more than one hangar size possible
« Reply #59 on: September 14, 2024, 01:56:29 pm »
Any word on 1x1 garage support (without the "Brutal" mod)?