aliens

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

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #15 on: July 01, 2013, 01:08:17 pm »
Quote
Why this craft has underwater "bluish" tint for shades AT terrain level?
Good catch. I used wrong palette (one of those underwater).
« Last Edit: July 01, 2013, 02:02:39 pm by AndO3131 »

Volutar

  • Guest
Re: Terror from the Deep support
« Reply #16 on: July 01, 2013, 02:34:14 pm »
I believe we could "recode" tftd sprites into ufo1 palette by closest color algorithm, and use it with xcom1 palette...
But jow did you make them together?

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #17 on: July 01, 2013, 02:55:47 pm »
Quote
I believe we could "recode" tftd sprites into ufo1 palette by closest color algorithm, and use it with xcom1 palette...
Someone could try it, but I think it would require much more work (besides, I don't know, how to do it :-[).

Initially, whole battlescape is shaded to one big surface, then drawn to screen. Instead of one big surface, I used small tile to blit shade of small map parts to it and then blit this small tile on proper place in battlescape. This way every part of map can have different palette. Remember, It's not working perfectly yet.

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Terror from the Deep support
« Reply #18 on: July 01, 2013, 04:43:13 pm »
How is your algorithm, performance-wise?

Offline xracer

  • Commander
  • *****
  • Posts: 565
  • X-COM lover, we've gone at it everywhere
    • View Profile
Re: Terror from the Deep support
« Reply #19 on: July 01, 2013, 04:51:03 pm »
those look really nice

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Terror from the Deep support
« Reply #20 on: July 02, 2013, 06:33:55 am »
If you are just blitting surfaces onto other surfaces (remember the screen is still a surface), it is likely SDL is doing all the converting for you behind the scenes. If you try to blit 8bpp surfaces with different palettes, SDL will automatically do "nearest color" matching between the palettes. If you try to blit 8bpp with 24bpp, it will automatically convert between bit-depths as appropriate. If the screen is 24bpp, you would get an apparently "flawless" result. This all has performance costs, though they might not be noticable on modern systems.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #21 on: July 02, 2013, 10:11:04 am »
I'm coding on Linux, and as @Supsuper said, I didn't notice any performance issues yet. I haven't tried to compile on Windows.
Quote
If you try to blit 8bpp surfaces with different palettes, SDL will automatically do "nearest color" matching between the palettes.
Result's of this are here.

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: Terror from the Deep support
« Reply #22 on: July 02, 2013, 10:21:20 am »
I'm coding on Linux, and as @Supsuper said, I didn't notice any performance issues yet. I haven't tried to compile on Windows.
I don't think you'll see much in the way of performance changes on Windows either. I think where you will probably see it (if anyway) are on the embedded devices, like Android devices, Cannoo, Pandora, GP32x, GCWZero etc.

Volutar

  • Guest
Re: Terror from the Deep support
« Reply #23 on: July 02, 2013, 03:24:39 pm »
SDL is making 8bpp->[palette]->RGB conversion for each pixel anyways. So at 24bit surface/display mode that wouldn't make any performance difference at all.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Terror from the Deep support
« Reply #24 on: July 02, 2013, 04:18:39 pm »
Result's of this are here.
AndO3131 this dont look like "nearest color". It more probably this use my blit function (aka simple copying palette index without bothering with different palettes) not SDL ones.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #25 on: July 03, 2013, 05:00:41 pm »
There's some new progress. Looks like battle terrain is not a problem anymore (only thing left is putting them in ruleset). Next thing will be items.
« Last Edit: July 03, 2013, 10:56:21 pm by AndO3131 »

Offline localSol

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Terror from the Deep support
« Reply #26 on: July 04, 2013, 12:31:36 am »
Fantastic Work!
 August 1999 - This just in, reports of the rumo(u)red organization called X-COM seen flying an unknown type of flying craft into the ocean! Ocean liner personnel who witnessed the incident say the craft didn't return out of the water during the few hours that they passed near. What could this mean? Bug your local representative and keep off the beaches!

Volutar

  • Guest
Re: Terror from the Deep support
« Reply #27 on: July 04, 2013, 05:07:37 am »
Technology used for bubbles trail requires for "postprocess" pixel manipulation. If this "mixed palette" concept will be used, I'm not really sure this will work. Because for working it will require pick color index of pixel, modify, put pixel index. For every bubble trail pixel, and often even number of times.
I wouldn't take this mixed mode at all.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #28 on: July 04, 2013, 06:04:12 am »
Bubbles coming from terrain do work - I think they are included in map files. This is an example ruleset entry for terrains, based on ufopaedia.org found here - bubbles are in UFOBITS section:

==========
  - name: SEABED
    mapDataSets:
      - BLANKS
      - SAND
      - ROCKS
      - WEEDS
      - DEBRIS
      - UFOBITS
    largeBlockLimit: 3
    textures: [13]
    mapBlocks:
      - name: SEABED00
        width: 10
        length: 10
        type: 1
        subType: 0
        maxCount: 3
      - name: SEABED01
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED02
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED03
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED04
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED05
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED06
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED07
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED08
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED09
        width: 10
        length: 10
        maxCount: 3
      - name: SEABED10
        width: 20
        length: 20
      - name: SEABED11
        width: 20
        length: 20
      - name: SEABED12
        width: 20
        length: 20
==========

Bubbles coming from operatives of course don't work, but I think they are hidden somewhere in terror files, just like other animation frames.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Terror from the Deep support
« Reply #29 on: July 04, 2013, 09:53:13 am »
Some more info. @Volutar, you can see bubbles in first screenshot.

Weapons and grenades work, but I don't have projectiles. How did you guys get projectiles currently in use by the game (those in Resources/BulletSprites)?