Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

No poll?

That's right
That is right

Pages: 1 ... 41 42 [43] 44 45 ... 379

Author Topic: Stonesense - Old Official thread - Now locked  (Read 1696530 times)

winner

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #630 on: November 07, 2009, 11:24:17 pm »

pixel sprites are easy, you just define the platonic image that you are looking for and then make a genetic algorithm that keeps changing pixels until it looks like what you want.
« Last Edit: November 08, 2009, 12:07:31 am by winner »
Logged
The great game of Warlocks!

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #631 on: November 08, 2009, 12:50:36 am »

Quote from: Mike Mayday
If there's one thing I'd want added to Stonesense- that's it.
Ladies, gentlemen, and others: The Cavalier Crusader!

I can't say I didn't think the exact same thing, but still... be nice.  It's not like it would be bad for Stonesense to have that capability, all other things being equal.
Now now, I'm generally nice. I 'ust wanted to share my amusement with the world. I'm not trying to knock down his suggestion or insult him.

To prove this I shall determine what changes needed to implement his tileset, at the least. (True custom shapes would be much harder, custom tilesize should be easy, swapping a global variable read on start from the files for the current TILEWIDTH #define)

*ponders briefly what needs changing* Draw order, location, tilesize are really it from the back end. . . I don't like how the blocks draw themselves and determine all about it.
Quote
draws all tiles sorted by z, then x, then y.
if you had stated that more clearly...ah
Quote from: worldsegment.cpp
    for(int32_t vsz=viewedSegment->z; vsz < vszmax; vsz++){
      for(int32_t vsx=viewedSegment->x; vsx < vsxmax; vsx++){
          for(int32_t vsy=viewedSegment->y; vsy < vsymax; vsy++){
That would need a swapping for cavalier if Mayday's to get his wide graphics. It shouldn't otherwise matter which way, as it's symmetric in the current angle.

Spoiler: coderant (click to show/hide)
Changes needed:
  • Split TILEWIDTH to TILEWIDTH and TILEHEIGHT. well, for frontwise cavalier, also seems to be a TILEHEIGHT already..
  • Add CAVALIER/TILESHAPE:CAVALIER option flag somehow to init
  • Add the ability to pick your spritesheet filenames(init easiest)
  • Also the ability to pick the xml files indicating what's what (Want to be easy to switch, not a matter of swapping out all the config files.)
  • Change the anti-Escher line bits to not trigger on Cavalier
  • *optional* add top-edge anti-escher linedraw for Cavalier
  • add a cavalier-style pointToScreen/surrounding code in Block.cpp
  • Casual inspection doesn't suggest it's necessary, but check all those drawx/drawy to see what else may be dependant on the projection angle.
...hmm. Okay, something's screwed up here to me.Your pointToScreen is going by apparently halves, which would support Mayday's proposed tiles, except going up a Z is HALF a tile.

When I wrote my script to convert basically spritesheets to isometric projections (working with Sol's tileset initially) the y got turned into TILESIZE*((x+y)/4). Here it's being assigned /2.  where's the other /2? ??? I can't find it, but I know it's gotta be somewhere...or things would NOT be displaying right. Dev-guys, please?

Time to go do some noncode for a while.
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

Dante

  • Bay Watcher
  • Dante likes cats for their corrupt intentions.
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #632 on: November 08, 2009, 01:59:22 am »

I tried resizing the existing camels so they were at least bigger than the cat, but failed, so I did some from scratch.

   

Is 32 pixels the right size?

1138

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #633 on: November 08, 2009, 02:03:18 am »

^^Ooh, nice camels.

I've been making some sprites for myself. My creatures.png looks like this now.

Some of these still need a lot of work.
Logged

Dante

  • Bay Watcher
  • Dante likes cats for their corrupt intentions.
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #634 on: November 08, 2009, 02:15:46 am »

Oh, I was just about to try my hand at grizzly bears. Now I don't have to inflict that on the world  :D

My current fortress is full of tame alligators, which show up as beautiful flurries of purple question marks everywhere, so I added this as a better placeholder



Also cows

         

kaypy

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #635 on: November 08, 2009, 02:39:28 am »

I tried resizing the existing camels so they were at least bigger than the cat, but failed, so I did some from scratch.

   

Is 32 pixels the right size?
I've added a size template to the wiki at http://code.google.com/p/stonesense/wiki/Sprites
Logged

Innominate

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #636 on: November 08, 2009, 03:17:35 am »

For an isometric view the draw order should be back-to-front distance-wise, from the bottom floor upwards.
Something like:
Code: [Select]
  1 
 2 3
4 5 6
 7 8
  9

Assuming (4, 2, 1) is x=0, (7, 5, 3) is x=1, (4, 7, 9) is y=0, (2, 5, 8 ) is y=1, etc.
Then this is rough pseudocode for a diagonal iteration:
Code: [Select]
for(int z=0 -> zRange){
    //first half - in diagram, only (1), (2,3), and (4,5,6) rows
    for(int row=0 -> yRange){
        for(int col=0 -> min(xRange,row)){
            drawCell(col,(yRange-row)+col,z);
        }
    }
    //second half - in diagram, only (7,8), and (9) rows
    for(int row=1 -> xRange){
        for(int col=0 -> min(yRange,xRange-row)){
            drawCell(row+col,col,z);
        }
    }
}
Note that <axis>Range is equivalent to the difference in indices between the bounds on that axis.
Logged

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #637 on: November 08, 2009, 03:24:52 am »

This is true, but not entirely necessary, if the sprites all fit in the cube right.
If they do, then Painter's Algorithm only need to have each one drawn after the ones behind it, and aside from that weak ordering, anything works, which is why presently it's
Code: [Select]
  1
 4 2
7 5 3
 8 6
  9
and things work.
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #638 on: November 08, 2009, 03:33:43 am »

With a little modification you can use that same code to draw from each of the four compass points which would be a great enhancement.
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

CobaltKobold

  • Bay Watcher
  • ☼HOOD☼ ☼ROBE☼ ☼DAGGER☼ [TAIL]
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #639 on: November 08, 2009, 03:38:10 am »

If you're using simple things yes. Unfortunately directional crap means a few more changes necessary, but still pretty easy.

...hmm...I think I see a problem. Do ramps render incorrectly if they're at the edge of your viewed segment, because they 'forget' about the stuff out of view?
Logged
Neither whole, nor broken. Interpreting this post is left as an exercise for the reader.
OCEANCLIFF seeding, high z-var(40d)
Tilesets

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #640 on: November 08, 2009, 08:05:27 am »

Hey people! I'm trying my forces in isometric pixelart



How do you like it? It's actually done for my rpgmaker project, but when I'll do more then I guess they could be usable in stonesense cause they're compatible.
Logged

Mike Mayday

  • Bay Watcher
  • gfx whr
    • View Profile
    • Goblinart
Re: Stonesense - The isometric visualizer, official thread
« Reply #641 on: November 08, 2009, 08:55:12 am »

Quote from: Mike Mayday
If there's one thing I'd want added to Stonesense- that's it.
Ladies, gentlemen, and others: The Cavalier Crusader!
I can't say I didn't think the exact same thing, but still... be nice.

It's ok, I LedOL :P

The blue rectangle (and the automatically calculated way the tile "rectangles" overlap) is actually all that the visualizer should care about for a single layer view- and it should be customizable.
You messed up there- your mockup has the top edges of tiles obscured.
Ah yes, of course. This is what I actually meant.
So Stonsense places the rectangles (32x16 in this case), and it's up to the creator to fill them with properly shaped sprites.

I like it! And guys, see how the grass crawls "out" of the tile? This is one of the reasons why I propose getting rid of the shape constraint. Nice job, Kogucie :)
« Last Edit: November 08, 2009, 08:58:29 am by Mike Mayday »
Logged
<3

kaypy

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #642 on: November 08, 2009, 09:16:32 am »

The blue rectangle (and the automatically calculated way the tile "rectangles" overlap) is actually all that the visualizer should care about for a single layer view- and it should be customizable.
You messed up there- your mockup has the top edges of tiles obscured.
Ah yes, of course. This is what I actually meant.

Isn't that exactly the same as the old one?
Logged

Mike Mayday

  • Bay Watcher
  • gfx whr
    • View Profile
    • Goblinart
Re: Stonesense - The isometric visualizer, official thread
« Reply #643 on: November 08, 2009, 09:31:35 am »

Isn't that exactly the same as the old one?
Nope. The rectangle is 32x16 in the latter.
Logged
<3

kaypy

  • Bay Watcher
    • View Profile
Re: Stonesense - The isometric visualizer, official thread
« Reply #644 on: November 08, 2009, 09:35:49 am »

Nope. The rectangle is 32x16 in the latter.
Ah, I see. The gap is included in the box
Logged
Pages: 1 ... 41 42 [43] 44 45 ... 379