Topic:   SC2D ;)   (Read 17457 times)


0 Members and 2 Guests are viewing this topic.

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
SC2D ;)
« on: October 30, 2010, 10:04:43 PM »
I've been working a bit on my engine for the upcoming GMG contest, I made a video showing off two of its most exciting features: super fast procedural map loading and dynamic lighting.

Video: http://www.screencast.com/users/WarHampster/folders/Jing/media/d555529d-0e4c-4fa7-b4d1-fbf76653c615

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: SC2D ;)
« Reply #1 on: October 31, 2010, 08:58:20 AM »
The lighting is really cool, but it would look even better if the light got lessened in the tiles farther from the character gradually.

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: SC2D ;)
« Reply #2 on: October 31, 2010, 10:07:47 AM »
 i think expanding the field of vision (even to full screen) would take better advantage of that feature cause right now it only blocks 1 square of vision. but nice feature, i wouldnt know where to begin programing something like that
« Last Edit: October 31, 2010, 10:16:13 AM by EqwanoX »

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: SC2D ;)
« Reply #3 on: October 31, 2010, 04:15:39 PM »
Cool idea and good implementation.  I agree with Eq, allowing the player to view an unlimited distance in any unobstructed direction would be nice.  It might slow things down though.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: SC2D ;)
« Reply #4 on: October 31, 2010, 05:50:25 PM »
Wow! VERY impressive! I've often wanted to sit down and attempt one of those. Is each tile darkened individually?
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: SC2D ;)
« Reply #5 on: October 31, 2010, 08:28:38 PM »
Thanks for the feedback, I'll see if expanding the field of vision makes things slow.

@ Silver - The entire map is darkened when the game loads, and then I shoot rays from the player to the outer positions on his field of vision, cutting the ray short if it hits an obstacle. Then I light all of the tiles that were hit by the rays.

Teruri


  • GMG-er

  • **


  • Posts: 167

  • This personal text couldn\'t be worse
Re: SC2D ;)
« Reply #6 on: November 01, 2010, 05:55:51 AM »
Very impressive indeed.
Max 500; characters remaining: 466

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: SC2D ;)
« Reply #7 on: November 01, 2010, 03:41:03 PM »
Awesome work!
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: SC2D ;)
« Reply #8 on: December 04, 2010, 06:26:44 PM »
FOV algorithm expanded to check entire map!



BTW, what do you guys think of the background graphic and tiles? They are all by me.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: SC2D ;)
« Reply #9 on: December 05, 2010, 01:21:15 AM »
They're among the most awesome tiles I've ever seen! :D Especially the dry, crackly one; it'd make a great wasteland floor.
I survived the spammage of 2007

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: SC2D ;)
« Reply #10 on: December 05, 2010, 09:20:06 AM »
Can you make the sprites less light up as they become farther away from the main sprite? Like check their subtract the two sprites x and y distances find the absolute value of them then average them and depending on what the average is, that is how much light that tile receives?

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: SC2D ;)
« Reply #11 on: December 05, 2010, 10:13:42 AM »
I might be able to make that work but it I think it would be pretty slow.

The algorithm loops through every tile on the edge of the player's field of vision (in this case the edges of the map) and shoots rays at all of those tiles. In the ray casting algorithm, all the tiles that the ray traverses are added to an array. When all the rays have been cast, I loop through the array and light all the tiles in it.

Therefore, when I am lighting a tile I don't implicitly know the distance from the tile and the player, and would need to do additional calculations per tile to figure that out which would slow down the lighting.

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: SC2D ;)
« Reply #12 on: December 05, 2010, 10:19:49 AM »
Okay then. Have you decided what your going to make for the contest? Is it going to show off this lighting tool? Or SC3D?

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: SC2D ;)
« Reply #13 on: December 05, 2010, 11:07:53 AM »
I don't even know :P

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: SC2D ;)
« Reply #14 on: December 05, 2010, 12:42:26 PM »
 the sand looks real nice. im still confused about how its done, would you ever do a tutorial of the code? just a quick glance
« Last Edit: December 05, 2010, 12:42:45 PM by EqwanoX »