Author Topic: [S.A.D.] Progress 2010  (Read 78363 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #330 on: October 29, 2010, 10:24:09 pm »
Nice. I like the camera idea :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #331 on: November 01, 2010, 04:54:44 pm »
Here's step 1 and 1.5 of the fog-of-war completed.  The first part was getting the fog to work--the fog engine, including explored areas, is complete.  The next step was to get the computations for buildings taken care of.  While the building line of sight is halfway done, I still have to work on circular line of sight--not hard, but long.

Here's the basic line-of-sight that buildings allow.  (Notice the area revealed by a watchtower)  Over the weekend I'll work on circular line of sight, as well as ship line of sight and calculating the positions for explored fog.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #332 on: November 01, 2010, 05:05:57 pm »
Ooooh... looks nice, Will areas that you have explored with units, but don't have any units buildings there, be black or simply obscured? (ie you can see the map but not any enemy units that may be hiding there)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #333 on: November 01, 2010, 05:12:05 pm »
Ooooh... looks nice, Will areas that you have explored with units, but don't have any units buildings there, be black or simply obscured? (ie you can see the map but not any enemy units that may be hiding there)

The "explored" fog of war draws tiles that are inverse colors--you could call that obscured.  You will be able to see terrain,  and buildings that you spotted.  You will not be able to see newly built structures or enemy ships.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #334 on: November 01, 2010, 05:16:11 pm »
Wow looks promising, keep up the good work! :)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #335 on: November 01, 2010, 05:16:59 pm »
Ooooh... looks nice, Will areas that you have explored with units, but don't have any units buildings there, be black or simply obscured? (ie you can see the map but not any enemy units that may be hiding there)

The "explored" fog of war draws tiles that are inverse colors--you could call that obscured.  You will be able to see terrain,  and buildings that you spotted.  You will not be able to see newly built structures or enemy ships.

Wow, nice and elegant solution. I was wondering how it could be done w/o grayscale but that's an excellent alternative

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #336 on: November 01, 2010, 05:40:06 pm »
Thats a great solution, and the screenie is looking great :D

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #337 on: November 01, 2010, 06:02:58 pm »
Oh, and by the way, here's a quick example of "explored" fog of war.  I also managed to get the game to require only 13000, maybe 14000, bytes of RAM.  Sadly, that will be the definite minimum for regular Ti-83+ users.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #338 on: November 01, 2010, 10:07:29 pm »
looks nice :D

I can't wait to see the fog of war in action while exploring with the ship :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #339 on: November 06, 2010, 04:53:49 am »
Good news for everyone, but especially with ztrumpet in mind: As buildings are being constructed, there will now be a graphical effect (screenshots to come) -- unless I made a serious planning error, in which case I apologize for getting hopes up. You will see the building slowly being constructed one pixel row at a time.

Also, the "circular" fog of war is canceled in favor of graphical and (currently under testing) partial-cover fog.  Here's what I mean: Fog will have a kind of cloudy graphic, even if only to a certain point, and the fog of war will be made to cover only part of a tile depending on a building and/or where a player's ship is.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #340 on: November 07, 2010, 01:55:30 am »
Oooh that sounds cool! It might be useful because in SC, the buildings gradually evolving, even if in 2 or 3 frames, gave us an idea of how far they were into completion without having to manually check by hovering on them or clicking on them.

As for partial cover fog, I am a bit curious what you mean. Do you mean it will no longer be tile-based? I wonder if it would take a lot of memory and render fast enough, since just the entire screen would be 768 bytes of fog.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #341 on: November 07, 2010, 11:04:02 am »
Quote
As for partial cover fog, I am a bit curious what you mean. Do you mean it will no longer be tile-based? I wonder if it would take a lot of memory and render fast enough, since just the entire screen would be 768 bytes of fog.

Partial fog means fog will sometimes cover only part of a tile.  And there's a reason I'm doing this: sometimes I want line of sight to be as big as a unit's firing range--no more and no less.  I can't do it if fog either covers an entire tile or doesn't cover it at all.  To make matters worse, it's difficult to fire at a ship when the fog just happens to cover most of your firing range because of your position on the map.

This does require 1 byte per tile, so I had to increase S.A.D. memory needs to 16000.  But thanks to ASM tricks and thanks to Jim E's marvelous tilemapper, the difference in rendering speed will be very, very small--I don't think it will be noticable.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #342 on: November 07, 2010, 01:29:03 pm »
Yeah but I am more curious about how the fog is stored. Pictures/images might be better, because I'm a visual person. I also wonder how does actual patial fog looks like?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: [S.A.D.] Progress 2010
« Reply #343 on: November 07, 2010, 05:35:15 pm »
Quote
Yeah but I am more curious about how the fog is stored. Pictures/images might be better, because I'm a visual person. I also wonder how does actual patial fog looks like?

Okay, a mock-up is attached below.  The top image is fog as S.A.D. used to handle it, and the bottom is partial fog:  Notice, for example, how the crystals are only half-covered with fog.

As for fog storing: There's already graphical data for the tiles, so fog is drawn by manipulating bits in the tile data every time a tile is drawn.  So the way to handle the fog for each tile is stored as follows:

2 Bits each tile for the following:  Can you see a tile, is it covered in fog, is it explored, or is it explored with a new building underneath that you can't see?

1 Byte each tile for the length of the fog and the direction it travels.

If that doesn't help, the rest is ASM and really can't be explained directly

Due to engine limitations, the partial fog of war only happens when a ship is being moved.  Buildings do not generate partial fog-of-war.
« Last Edit: November 07, 2010, 05:36:00 pm by Hot_Dog »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [S.A.D.] Progress 2010
« Reply #344 on: November 07, 2010, 05:41:12 pm »
Ah ok I see, so it will kinda remain a square, right?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)