Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Clip Test - Asking for opinions please.

Author
Message
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 14th Dec 2019 10:37 Edited at: 14th Dec 2019 14:54
I am writing a psuedo 3D maze game. It's all 2D sprites but pseudo 3D because the characters can go behind walls.
Initially, my plan was just for the character sprites to be clipped when they passed behind walls but there are some short characters (like the mouse in the screenshot) that would disappear completely.
So instead I came up with three possible alternatives which I've captured in the screenshot below.

1) Alpha transparency
2) Show outline only
3) X-ray style clipping

My personal favourite is the X-ray style but there will be levels that use skeleton characters and I don't think that would look too good. That means that I'm leaning more towards the outline mode but my girlfriend thinks alpha transparency is better because t shows more detail of what is behind the walls.
So I'm opening up the opinion think-tank. Which method looks better?

Or do you have any suggestions that I haven't thought of?

Attachments

Login to view attachments
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 14th Dec 2019 17:07 Edited at: 14th Dec 2019 17:11
You have another option, solid color, not online outline.
But I like the mouse most and also interested, how you did these effects.
Also how you solve the collison "problem". I am stuck at the moment at a simular styled game, it would be a "Bomberman"-Clone.

Also saw your Animation Station, your GUI looks great.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Dec 2019 17:46
The bottom two I prefer perhaps without the outline unless the complete sprite has an outline

That's pretty clever btw scraggle
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 14th Dec 2019 18:08
of the 3, i prefer the Outline though i might like it better if sprites were designed or placed where enough of their tops stayed visible, with no effect at all, instead.

ie, on the mouse, i'd have no problem with seeing just the ears navigating the maze, at times, leaving the rest to imagination.

and it does appear you're placing it and the sprite to the left of it at the "bottom" of the square vs centering it?

Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 14th Dec 2019 19:08
you could also make the wall translucent
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 14th Dec 2019 19:22 Edited at: 14th Dec 2019 19:27
Thanks for the input. I'm still leaning towards outline but maybe with a solid fill.

Let's answer some of those questions:
If you look at the wall sprites you will see that a wall that faces you (and can therefore be walked behind) covers two grid spaces. Each wall is made of two sprites. The upright one has a sprite depth that puts it behind the character and the top of the wall has a depth that puts it in front of the character. That takes care of the clipping.
As for the "effect" that is a copy of the character sprite with just the effect on it and a depth to put it above all walls then sprite scissoring is used to clip it. You need some fun processing to determine which walls to scissor but its easy enough.

And Xaby, there is no "collision problem" You simply don't check for any collisions on the wall tops if they are above a facing wall.
Virtual Nomad You are correct about the positioning. That's intentional because I have some taller character sprites that would overlap the bottom of the wall top above it if positioned in the centre of the ground sprite. However, I think I might shrink those sprites so that I can position them all correctly.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 14th Dec 2019 19:37 Edited at: 14th Dec 2019 20:02
To achive this kind of effect I instantly thought about a custom 2D depth map.
You would render the sprites that make out the walls with a white to black solid color which represents the depth into a render target
and use this and to cut out pixel perfect x-ray or outline effects probably made with a little shader so you don't have to create all those extra sprite sheets.
Just a thought i couldn't hold back.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 14th Dec 2019 20:52
i agree it would look better to move the characters up a bit mainly because right now it looks like they're walking on top of the walls - especially the lower transparency one
i like the outline (mouse) the best, it keeps more of the enemy hidden but still shows the type of enemy fine
if you go for a shader approach i would consider lowering the transparency of the outline/whatever effect you choose the more hidden (i.e. the closer to the floor) the pixel is - it would be a subtle effect but that way it will look even less like it is walking on the tile in front of it.
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Dec 2019 21:49
Alpha would be my least favorite, I think it ads confusion. While the x-ray is very neat, I'd prefer the outline.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
Recently Online
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Dec 2019 23:35
Those are some lovely tiles and sprites. Awesome job.
My first choice would be to make the walls one brick shorter so only one brick overlaps the tile above.
If you want a ghost shape i would make it solid.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 15th Dec 2019 12:18 Edited at: 15th Dec 2019 12:27
In the original version of the tiles you are using they took up a square area each....so it didnt have overlap and the problem wasnt there at all.

So i guess you broken them into half tiles effectively to do the half occluded blocks = 2.5D type effect which is really nice btw!

https://www.gameart2d.com/the-dungeon---top-down-tileset.html#


Id consider making your mouse character slightly taller and placing him in the middle of the square tile so he is more visible as has been said above. You could also take the overlap down to a quarter of a tile instead and you wouldnt need ANY view of the area behind the walls. Id like to consider that first if it was me but it may lead to VERY thin looking walls I guess.

That said....I think the outline shader with filled interior but with some translucency on the interior filled area (alpha of approx 100) would look the best.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Dec 2019 13:16
Quote: "In the original version of the tiles you are using they took up a square area each....so it didnt have overlap and the problem wasnt there at all."

Actually, the problem was magnified. The original walls take up 3 tiles. Two for the face and one for the top so if you wanted your character to walk behind a wall it would be obscured by two full tiles.
That's why I edited them.

I can see that the shader thing would work but I don't see that there would be any advantage to doing that. I would need a full size depth bitmap for each level which is several screens in size. I use much less bitmap memory to have additional sprite sheets for each character.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 15th Dec 2019 13:29 Edited at: 15th Dec 2019 14:26
Quote: "Actually, the problem was magnified."


There was no over lap of tiles though....so YOU got to choose the amount of overlap and made it half a tile....

See the second row and whole centre area of blocks.....where Ive taken a block out and thats what i meant

Lower wall and about 1/3rd overlap...no need for the view behind the wall... thats all i meant




EDIT: - added side by side comparison as its hard to see what i did

The green area shows how much more of the characters you will see....ie...most of the mouse
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Dec 2019 14:07 Edited at: 15th Dec 2019 14:08
Quote: "I can see that the shader thing would work but I don't see that there would be any advantage to doing that. I would need a full size depth bitmap for each level which is several screens in size. I use much less bitmap memory to have additional sprite sheets for each character."

Nope, no prerendered/backed depth maps ...just like a real depth map rendered each frame, the advantage would be to have that precize data additionally,
so you could use it for all sorts of effects and rendering one full HD texture each frame (or each change/movement whatever) isn't that expensive really.
I think running through for loops to set sprite scissor or whatever in AppGameKit Tier 1 is much much more expensive.
To draw the depth you can make an extra shader which dosn't need a texture, you only give it a depth uniform which you set anyway for the sprites.
I don't want to persuade you, as it looks like it works fine and why changing a running system, not ?

Anyhow I like the outline the most too and did you consider making the walls fade away or something.
Just throwing in some ideas really.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 15th Dec 2019 15:55
You also could put the figures into the middle of the tile, so Anubis would be nearly as high as the tile behind him, but you would also see the mouse the best. And if you combine that with smaller walls, maybe that could work.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Dec 2019 16:18 Edited at: 15th Dec 2019 16:22
Quote: "There was no over lap of tiles though....so YOU got to choose the amount of overlap and made it half a tile...."

Sorry Bengismo, I disagree. The overlap was two whole tiles. See the screenshot below. Anubis should be able to walk through the gate and turn left, but if he did he would be completely hidden by the double height wall (as shown).
Also, the original must have been designed to be pseudo 3D (or 2.5D if you prefer) because if not, the tile that I've highlighted in red would block the passage which it certainly doesn't look like it should.


Janbo, I understand now and you are right, the shader thing does seem more efficient. But as you say, why try to fix a system which is already working?

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 08:11:19
Your offset time is: 2024-04-19 08:11:19