Author Topic: Terror from the Deep support  (Read 62307 times)

Volutar

  • Guest
Re: Terror from the Deep support
« Reply #30 on: July 04, 2013, 10:03:32 am »
I mean bubble trails after projectiles. They won't work in this "hybrid palette" mode.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Terror from the Deep support
« Reply #31 on: July 04, 2013, 10:24:45 am »
the bullet sprites have been around on various forums for a while, we used to have them stored in byte arrays, as did the original.
tftd will have them hard-coded as well. it's just a matter of finding the appropriate data within the executable and interpreting it using a battlescape palette.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #32 on: July 04, 2013, 11:27:33 am »
Quote
I mean bubble trails after projectiles.
We won't know until we try. Does anyone know where can we find them inside data files? Or maybe that's a hardcoded feature? If so, we would need some equivalent.

Quote
They won't work in this "hybrid palette" mode.
I'm not sure what do you mean. I already wrote that every surface in battlescape can have it's own palette. As you can see on screenshots around this thread, all soldiers use Ufo:Enemy Unknown palette, map uses Terror from the Deep palette, bubble trails can have it's own, that's not a problem. However, I'm not sure if current code has enough features to get trails working as expected. If so, someone would have to write apropriate code, but that's not colliding with "hybrid palette" concept.

Offline 54x

  • Colonel
  • ****
  • Posts: 208
    • View Profile
Re: Terror from the Deep support
« Reply #33 on: July 04, 2013, 12:00:50 pm »
We won't know until we try. Does anyone know where can we find them inside data files? Or maybe that's a hardcoded feature? If so, we would need some equivalent.
I'm not sure what do you mean. I already wrote that every surface in battlescape can have it's own palette. As you can see on screenshots around this thread, all soldiers use Ufo:Enemy Unknown palette, map uses Terror from the Deep palette, bubble trails can have it's own, that's not a problem. However, I'm not sure if current code has enough features to get trails working as expected. If so, someone would have to write apropriate code, but that's not colliding with "hybrid palette" concept.

What might cause difficulty is trying to palette shift things if you're running two palettes at once- even if you code it perfectly, XCOM sprites won't work if mixed with TFTD sprites using any of the underwater palettes, which (mostly) shift blue as they get darker, wheras XCOM sprites EITHER shift slightly red, or just take funky, uneven steps down in brightness that look pretty cool.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Terror from the Deep support
« Reply #34 on: July 04, 2013, 12:08:39 pm »
AndO3131 can you release your experimental branch? Its hard to say what is possible or not without seeing implementation.
Right now I dont see any shading in your screen shots, you didnt made it work?

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Terror from the Deep support
« Reply #35 on: July 04, 2013, 01:08:44 pm »
AndO3131 can you release your experimental branch? Its hard to say what is possible or not without seeing implementation.

https://github.com/AndO3131/OpenXcom/tree/TFTD_Support

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #36 on: July 05, 2013, 11:01:21 pm »
I tried to get these images work, but I've stumbled in two problems I need some help with.

1 problem: I couldn't get right colors to appear on screen. In Gimp I tried paletted image, gave one of Terror palettes and it looks good. When I load this image in game - colors are different. I've attached image in rgb palette (I think it will be enough for projectiles, contains one ground and one underwater set) and four battlescape palettes I got from 'lbm' files - they are in Gimp palette format (gpl), but i couldn't load that extension. There has to be somebody around here who can fix this projectile image ;).

2 problem: @Warboy1982, I tried loading additional projectiles file with extrasprites, but I seem to have acces only to first row of the file (first projectile). Can extrasprites combine larger files? I also have problem with 'bulletSprite' option in rulesets - how does it work?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Terror from the Deep support
« Reply #37 on: July 05, 2013, 11:33:05 pm »
load it with extraSprites, but make sure you define the height, width and subdivision x and y.

setting the subX and subY tells the loader to split the image into a set of x*y images.

the way the bulletSprite works in the ruleset is this:

number * 35 = index in projectile set. by default, all projectiles are 35 particles long, some of them are simply "blank"
-1 = no bullet sprite.

you may have to make an adjustment to RuleItem.cpp line 118 for modability's sake.
« Last Edit: July 05, 2013, 11:50:26 pm by Warboy1982 »

Offline Phezzan

  • Sergeant
  • **
  • Posts: 37
  • Twilight
    • View Profile
Re: Terror from the Deep support
« Reply #38 on: July 06, 2013, 05:35:12 am »
I was trying to get a second set of bulletSprites working this morning.

I did succeed eventually - I think I used something like (from memory):

extraSprites:
  - Projectiles
   sizeX: 105     (whatever the value is in Xcom1Ruleset)
   sizeY: 18       (I had 6 new projectiles... 6 x 3 )
   subX: 3
   subY: 3
   385: Resources/MOD/BulletSprites.png

That lined up with bulletSprite: 11 - 16   (as in bulletSprite: 11 was my first new bullet, bulletSprite: 16 was my last)
It took me a while to figure out it wanted a completely different number.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #39 on: July 06, 2013, 03:30:21 pm »
@Warboy1982 It turns out I did nothing wrong in making the projectile file, the problem is in 'modindex' variable. Weapons can access projectile, if I define it in the same ruleset file, but they won't shoot it, if it's defined in different ruleset. Is it correct behaviour, or did I mess something up while merging the code?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Terror from the Deep support
« Reply #40 on: July 06, 2013, 07:21:18 pm »
if you define it in xcom1Ruleset.rul, it won't get indexed

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #41 on: July 07, 2013, 03:10:27 pm »
Ok. Projectile loading solved (no trails, tho). Turns out new surfaces also don't get indexed. Some progres has been made regardless.

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Terror from the Deep support
« Reply #42 on: July 08, 2013, 09:53:37 am »
TFTD. Yummy!

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Terror from the Deep support
« Reply #43 on: July 08, 2013, 08:50:38 pm »
AndO3131 Im working on my ShaderDraw to allow bliting to 32bit surfaces. You will able revert most of changes in `Map` and TTFD will still working.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #44 on: July 09, 2013, 12:08:37 am »
Ok. I'm waiting for it, but I think I got the hold of current shader. It works fine with multiple palettes - hasn't let me down yet. Learning new one scares me :o.

In the meantime, some new things.