The Daily Click ::. Forums ::. Digital Works ::. More Pseudo-3D Stuff...
 

Post Reply  Post Oekaki 
 

Posted By Message

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
2nd January, 2012 at 18:41:10 -

Fanotherpg sent me a message about my old 3d GTA engine yesterday, pointing out a few fairly major flaws - so I've been playing with it some more.

I decided to turn it into something a bit different - and more atmospheric, with (kind of) realistic lighting.
Here's what I have so far:

Image
(graphics are not by me - I just found them on google)


Download: (compiled .exe only)
https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!483&parid=B1E7EE094271BBDA!131&authkey=!

I'll probably release the source .mfa once I tidy it up a bit.


 
n/a

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
2nd January, 2012 at 19:28:56 -

Always here to help Sketchy. But thanks for sorting out those minor issues. Thanks to it your example is even more reliable and easy to use than before.

 
www.therpg.pl

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
2nd January, 2012 at 22:07:15 -

This is really impressive. Well done!

It would be nice to see the "fog of war" fade into black and possibly not be so "square"?

Image

Would it be possible to some sort of raycasting effect? Shoot a ray in every 360 direction and when it hits a wall, everything behind that would be black??

I don't mean to pick this apart. It's amazing! Keep up the good work

 
n/a

Fordom

Nordanrikets konung

Registered
  12/02/2009
Points
  190

VIP Member
2nd January, 2012 at 22:24:20 -

Just use erase blend.
Add a black layer and make the active object postitioned to the player with the ereas blend.
The darker alpha channel the more will be erased

 
This forum is full of trolls and disinfo agents.

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
2nd January, 2012 at 23:20:02 -

Not sure what you mean about fading to black - walls and floor tiles already fade to black the further away they are.
Also, it does use grid-based line of sight, so everything behind a wall is black.

Doing precise shadows on the ground with a raycaster is easy enough to code (see Andos' example), and that's actually what Fanotherpg is planning to do, I believe.
The problem is that I'm not totally convinced MMF2 is up to it - the raycasting and 3D engines are very CPU-intensive, so if you put them both together, and then add all your game content (enemies, projectiles, special effects, etc) on top of that - I think it could turn into a slideshow (but hopefully I'm wrong).

Also, I don't think it would be possible to draw precise shadows on the walls themselves, and it would look strange if the shadows on the ground don't match those on the walls.

Apart from that, and it obviously being much easier, the other reason is that if I do use this in a game, it will be in a turn-based, grid-based strategy - meaning the shadows need to be grid-based, so the player can tell which squares are visible.

 
n/a

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
3rd January, 2012 at 00:40:16 -

Yeah I've got some plans with those things but we will see how it goes. I got some similar issues to Sketchy but I've got some hopes

 
www.therpg.pl

Fordom

Nordanrikets konung

Registered
  12/02/2009
Points
  190

VIP Member
3rd January, 2012 at 00:41:20 -

What about my solution? It worked for me!. To simple,huh?

 
This forum is full of trolls and disinfo agents.

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2012 at 01:06:27 -

That'll work great for making the floor fade to black. The lightness of the walls should probably depend on the angle to the player though - although now that I think about it, my example doesn't do that yet...
Realistic shadows will require something more complicated.


This is the real problem:
Image

While it's easy to draw accurate shadows on the ground, there's no way to draw shadows on walls, and it just looks weird.

Edited by Sketchy

 
n/a

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
3rd January, 2012 at 10:57:19 -

It shou wok on two ways sketchy
1 total overlay of whole frame
1 shadow texture for walls with 3d shader.

 
www.therpg.pl

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2012 at 14:32:53 -

I don't see how.
You could have the shadows (surface object) layered on top of the walls, but it still wouldn't look right, because the angle would need to change due to the perspective difference - the edge of a shadow should always appear vertical. I guess it would be technically possible, but the maths would be pretty scary.
It would be extremely difficult to use extra objects for shadows on walls, and would mean doubling the number of wall surfaces to be drawn, which is likely to be slow.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2012 at 16:14:13 -

New and improved version:
Image

Download:
https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!484&parid=B1E7EE094271BBDA!131&authkey=!

Uses my simple (but slightly buggy) shadowcaster engine here:
https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!485&parid=B1E7EE094271BBDA!131&authkey=!

Edited by Sketchy

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
3rd January, 2012 at 18:12:55 -

How the hell do you people not have professional programming jobs?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Fanotherpg

I'm living proof

Registered
  26/06/2004
Points
  522

Game of the Week WinnerKlikCast StarHas Donated, Thank You!Second GOTW AwardVIP MemberHasslevania 2!The OutlawPokemon Ball!Evil klikerComputer
I am an April FoolI donated an open source project
3rd January, 2012 at 19:52:40 -

LOL, Del Duio and who says we don't have them? TBH I'm not so great in those blocks, and you kick my asses but still Sketchy is showing quite nice skills over here.

 
www.therpg.pl

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2012 at 21:37:27 -

Just speaking for myself, any job at all would be nice - but thanks
I think not knowing anything except MMF2 is a bit of a hindrance.

 
n/a

Fordom

Nordanrikets konung

Registered
  12/02/2009
Points
  190

VIP Member
3rd January, 2012 at 21:38:16 -

Can I have that player sprite?

 
This forum is full of trolls and disinfo agents.

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd January, 2012 at 21:57:52 -

Like I said in the first post, the graphics aren't by me:
Image

 
n/a

Fordom

Nordanrikets konung

Registered
  12/02/2009
Points
  190

VIP Member
4th January, 2012 at 00:34:54 -

Post the link to the character.

 
This forum is full of trolls and disinfo agents.

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
4th January, 2012 at 01:07:58 -

I did? It's the one with the M4.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
5th January, 2012 at 03:17:05 -

New and improved version:
http://www.create-games.com/download.asp?id=8603
(I fixed the buggy shadowcaster, made some changes to improve efficiency, and commented every line of code)

Includes source .mfa files for the engine and map editor, plus the required shaders.

 
n/a

Jacob!



Registered
  17/06/2011
Points
  153
8th January, 2012 at 22:58:56 -

Are you able to get the skew parameters of the wall? When the shadow hits it at the bottom, the remainder of the shadow will always go straight vertically up the wall. You might be able to use this to cheat a good looking effect.

 
Have you even been far as decided to use even go want to do look more like?
   

Post Reply



 



Advertisement

Worth A Click