aliens

Author Topic: Battlescape development  (Read 289974 times)

Offline NeFuRii

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Battlescape development
« Reply #30 on: October 27, 2010, 01:50:28 pm »
Its some kind of a mask for the half tile.
If you would draw ufo floor and then the wall, you would see that floor outside the ship.
I think it should be: first draw the grass/dirt, then draw the wall, then draw the ufo floor but only on black part of the tile
« Last Edit: October 27, 2010, 02:15:48 pm by NeFuRii »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #31 on: October 27, 2010, 02:52:08 pm »
@NeFuRii, thanks for the response.
I kinda get it. But why did they not add the half floor directly to the diagonal wall object? Because I notice that the mask is added to the diagonal wall object. And if I have a look at all the UFO models, it is always the same floor that goes with the diagonal wall. And I don't immediatly see any depth sorting issues that could occur...

I think I would fix it by changing the sprites in memory after U_EXT02.PCK is loaded, adding the half floors to the sprites 5 6 and 7.
« Last Edit: October 27, 2010, 03:02:27 pm by Daiky »

Offline NeFuRii

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Battlescape development
« Reply #32 on: October 27, 2010, 03:08:55 pm »
It has to do with damages probably. For example if you shot the floor of that 'half tile' you need to change the tile for its damaged version.If this was one connected floor-wall tile you would need to make all possible combinations of damaged/undamaged floor and wall. Even worse, if you damage a floor on the higher level you would need to factor in combinations of not having any floor if it gets destroyed.
« Last Edit: October 27, 2010, 03:48:03 pm by NeFuRii »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #33 on: October 27, 2010, 03:53:35 pm »
speaking of damages... if you shoot the inside half of the tile it should replace it with the damaged version of that tile, if you shoot the outside half of the tile it should replace it with the damaged version of that one. The damaged version is held in the MCD data, However, the game can only hold 1 MCD index for a floor tile... how can it hold the MCD indexes of both "floors"?

Offline NeFuRii

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Battlescape development
« Reply #34 on: October 27, 2010, 08:21:31 pm »
I'm not familiar with ufo's file types.  No idea how its stored.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #35 on: October 29, 2010, 12:48:15 am »
as promised a patch this week for milestone 5:
- functional: XCom Craft placement (done)
- functional: Ufo placement (done)
- functional: Battlescape starts when landing skyranger at a crash site (done)
- technical: Move MCD struct to TerrainObject class (somewhat done)
- technical: review variable names to see they all correspond the conventions (done, I hope)
 (conventions: a map origin is on the left side, X-axis runs to bottom right, Y-axis runs to upper right, Z-axis represents the layers, a distance on the X-axis is called width, a distance on the Y-axis is called length, a distance on the Z-axis is called height ) (done)
- technical: big code review so this patch can be integrated for the first time in the openxcom SVN repository (somewhat done)

there is still a little issue with diagonal ufo walls, the floor is not blitted correctly (it's not using the black mask, got to find out how to use masks with the SDL blit).

So, SupSuper, as for me this patch can go in SVN. I don't know what you think.
Anyway, I keep implementing battlescape stuff:
milestone 6:
- load waypoints/spawnpoints
- add units /soldiers


Offline bramcor

  • Captain
  • ***
  • Posts: 76
    • View Profile
Re: Battlescape development
« Reply #36 on: October 29, 2010, 01:35:52 am »
Great job with the patch Daiky! It is great to have a use for that Skyranger ;)

From what I can tell, your terrain detection is spot on. I tried out farm, forest, jungle, desert, mountains and polar. All of them corresponded to the correct globe surfaces.

Only thing that caught my eye was a few warnings during compilation. I pasted them here: https://pastebin.com/rNjy5jbK

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #37 on: October 29, 2010, 11:47:31 pm »
THE MISTERY OF THE DIAGONAL WALL / FLOOR TILE SOLVED :)
I opened up the good old map editor, and behold.... the floortile next to the diagonal wall tile has a small part attached which is a half floor tile.

The reason why it showed black is, that I was drawing all floor tiles first, and then the rest. Which is maybe not a good idea I see now.
« Last Edit: October 29, 2010, 11:49:19 pm by Daiky »

Offline NeFuRii

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Battlescape development
« Reply #38 on: October 30, 2010, 02:55:25 pm »
Interesting :).
But how does it work? There are no such tiles in the U_EXT02.PCK, so it can't be a single tile. It still seems to be some kind of graphics manipulation on the fly done by the engine. Or is it stored in some other file? I haven't seen it anywhere.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #39 on: October 30, 2010, 02:59:58 pm »
those special tiles are in U_BITS.PCK

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Battlescape development
« Reply #40 on: October 31, 2010, 03:21:00 pm »
Daiky has earned SVN access, so there's no more need for constantly creating/adding patches. Hopefully he won't go mad with power. ;)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #41 on: November 01, 2010, 12:57:29 pm »
If you just heard a loud bang, don't be afraid, it was just me committing the battlescape code into the openxcom repository :o

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Battlescape development
« Reply #42 on: November 01, 2010, 10:18:30 pm »
THE HORROR! :P

Offline liamdawe

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Battlescape development
« Reply #43 on: November 02, 2010, 01:01:34 am »
Can't wait to see the .2 release with all of this included :D

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Battlescape development
« Reply #44 on: November 02, 2010, 07:10:23 pm »
I committed a cleanup, and renamed some of the classes, so they are clearer what they do.
« Last Edit: November 02, 2010, 10:19:32 pm by Daiky »