"Triangle" - Ludum Dare Project Flash Rewrite
Moderator: PC Supremacists
- flsfr
- ES Beta Backer
- Posts: 3
- Joined: Wed Jul 10, 2013 6:40 pm
- Favorite Gaming Platforms: GBA, PC, NES
- Programming Language of Choice: C++
- Location: Victoria BC, Canada
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
The creator of the game Monaco: What's Yours is Mine, Andy Schatz, posted some Facebook notes back in 2010 on how his game did lighting. Personally, I found them to be an interesting read back then. I'm sure Falco has some edjukation resources that he could share on how he does lighting in the Elysian Shadows' engine.
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
That's really cool to see the similarities in our approaches. I never knew Monaco used a vector lighting method. I don't think Falco's lighting could be applied here though, as Flash doesn't play nice with buffers and shaders.flsfr wrote:The creator of the game Monaco: What's Yours is Mine, Andy Schatz, posted some Facebook notes back in 2010 on how his game did lighting. Personally, I found them to be an interesting read back then. I'm sure Falco has some edjukation resources that he could share on how he does lighting in the Elysian Shadows' engine.
- ph0sph0ruz
- Chaos Rift Newbie
- Posts: 32
- Joined: Sat Mar 22, 2014 3:52 am
- Favorite Gaming Platforms: PC,Xbox,Dreamcast
- Programming Language of Choice: C,C++
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
A game I saw today that looks similar to how you're doing the lighting.
https://back.nothingtohide.cc/
https://back.nothingtohide.cc/
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
I added some levers n doors n shit
And a new enemy type
As well as health bars!
And a new enemy type
As well as health bars!
- ph0sph0ruz
- Chaos Rift Newbie
- Posts: 32
- Joined: Sat Mar 22, 2014 3:52 am
- Favorite Gaming Platforms: PC,Xbox,Dreamcast
- Programming Language of Choice: C,C++
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
A swarm! Nice. I'm digging this game.
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Decided to try plugging my controller in
Been busy adding lots of stuff to the game, added some more prompts and made the game look better, and made a (maybe temporary) soundtrack.
Might put a video up soon
Been busy adding lots of stuff to the game, added some more prompts and made the game look better, and made a (maybe temporary) soundtrack.
Might put a video up soon
- ph0sph0ruz
- Chaos Rift Newbie
- Posts: 32
- Joined: Sat Mar 22, 2014 3:52 am
- Favorite Gaming Platforms: PC,Xbox,Dreamcast
- Programming Language of Choice: C,C++
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
That first video looks like you are playing far away, an optical illusion with the lighting. :D
How many levels have you built so far?
How many levels have you built so far?
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
I've only got the one test level in there at the moment, but the level editor is in so I've been slowly adding to it when I'm boredph0sph0ruz wrote:That first video looks like you are playing far away, an optical illusion with the lighting. :D
How many levels have you built so far?
Got a lot more stuff I want to get done before I get onto making levels, such as adding triggers/systems for enclosed battles and boss battles, more enemies, gun collecting/switching, more powerups and some traps and stuff maybe. The tools for it are all there though. I'm having shitloads of fun with this thing.
I really need to think of a better name than Triangle!
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Haha, you're right. The shadows make the black squares look like really tall pillars. It's actually kind of awesome.ph0sph0ruz wrote:That first video looks like you are playing far away, an optical illusion with the lighting. :D
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Haha, I noticed that before, too. Some people I've sent the game to actually thought it was intended to be like tall 3d walls. I guess what the shadow is essentially doing is a 1 point perspective drawing, after alldandymcgee wrote:Haha, you're right. The shadows make the black squares look like really tall pillars. It's actually kind of awesome.ph0sph0ruz wrote:That first video looks like you are playing far away, an optical illusion with the lighting. :D
Surprising how long it takes to do some things. Spent over 2 hours implementing this control settings menu.
- ph0sph0ruz
- Chaos Rift Newbie
- Posts: 32
- Joined: Sat Mar 22, 2014 3:52 am
- Favorite Gaming Platforms: PC,Xbox,Dreamcast
- Programming Language of Choice: C,C++
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Yeah coding issues can sometimes be a black hole, just getting started sucks even more because it's not very sexy looking at just code. Everyone just wants to see the graphics and gameplay. It's not all fun and games but when it works out then the effort is rewarding.RyanPridgeon wrote: Haha, I noticed that before, too. Some people I've sent the game to actually thought it was intended to be like tall 3d walls. I guess what the shadow is essentially doing is a 1 point perspective drawing, after all
Surprising how long it takes to do some things. Spent over 2 hours implementing this control settings menu.
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Very true, a lot of the time when showing this game I can't really display what I've been working on because a lot of it is in the engine / back end.ph0sph0ruz wrote: Yeah coding issues can sometimes be a black hole, just getting started sucks even more because it's not very sexy looking at just code. Everyone just wants to see the graphics and gameplay. It's not all fun and games but when it works out then the effort is rewarding.
However, here's something I can show. Working on a little minimap kind of thing that uncovers parts of the map you've explored. Still gotta work on it quite a bit to make it look right.
Click here to see the hidden message (It might contain spoilers)
Edit: Minimap update!
Last edited by RyanPridgeon on Wed Apr 16, 2014 7:20 pm, edited 1 time in total.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Amazing how fast this is progressing, looking awesome Ryan.
Keep in mind, this is a programming forum. Just because we like pictures doesn't mean we don't like code too. If you ever come up with a new way to solve a problem in code, and you're dying to share it with someone, feel free to post it here so we can all revel in your greatness.RyanPridgeon wrote: Very true, a lot of the time when showing this game I can't really display what I've been working on because a lot of it is in the engine / back end.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- YourNerdyJoe
- Chaos Rift Cool Newbie
- Posts: 79
- Joined: Sun Oct 02, 2011 3:28 pm
- Current Project: Top secret (not really) Top-Down Shooter for GBA
- Favorite Gaming Platforms: GBA, Gamecube, PC, 3DS
- Programming Language of Choice: C/C++
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
This looks like one of the few flash games I would actually be willing to pay for if it came to that.
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Good point, and I doubt anyone will be revelling in greatness, but I've just updated the minimap to only draw walls that you can see, on the side that you see them. This will be cool since anything not explored will be completely hidden in the map with no bleed into the next room.dandymcgee wrote:Amazing how fast this is progressing, looking awesome Ryan.
Keep in mind, this is a programming forum. Just because we like pictures doesn't mean we don't like code too. If you ever come up with a new way to solve a problem in code, and you're dying to share it with someone, feel free to post it here so we can all revel in your greatness.RyanPridgeon wrote: Very true, a lot of the time when showing this game I can't really display what I've been working on because a lot of it is in the engine / back end.
I basically did it by first iterating through the grid of collidable tiles in the map in a window around the player's position, and checking if they are in sight of the player by checking n points between that tile and the player's position and checking if there's another wall in the way. If a collidable tile is in sight, it's flagged as "uncovered" in the minimap.
Code: Select all
// calculate N points to check along line of sight
var iterations:int = Math.sqrt(Math.pow(c - playerC, 2) + Math.pow(r - playerR, 2)) * 1.5;
// the current iteration's point position, start at the current checked tile
var ix:Number = c;
var iy:Number = r;
// start at the right or bottom of the tile if the player is on that side
if (playerC > c) ix += 1;
if (playerR > r) iy += 1;
// Calculate the step vector to iterate with
var stepX:Number = (pos.x / 32 - ix) / iterations;
var stepY:Number = (pos.y / 32 - iy) / iterations;
// if set to true, there was a collision
var collide:Boolean = false;
// Start away from the wall
ix += stepX;
iy += stepY;
// While haven't reached the player tile yet
while (!(Math.floor(ix) == playerC && Math.floor(iy) == playerR))
{
// If this isn't the start tile, and there's a wall in the way
if (!(Math.floor(ix) == c && Math.floor(iy) == r) && _map.getCol(ix, iy) == 1)
{
// Collision in line of sight
collide = true;
break;
}
// Move the current point to the next point along the line of sight
ix += stepX;
iy += stepY;
}
if (collide == false)
{
// If no collisions, this tile has been uncovered
setUncovered(c, r);
}
Code: Select all
for (c = topleftC; c < topleftC + WINDOW_SIZE; c++)
{
for (r = topleftR; r < topleftR + WINDOW_SIZE; r++)
{
if (isUncovered(c, r))
{
// left
if ((getDrawn(c, r) & 1) == 0 && isUncovered(c - 1, r))
{
addDrawn(c, r, 1);
_lines.graphics.moveTo(c * UNIT_SIZE, r * UNIT_SIZE);
_lines.graphics.lineTo(c * UNIT_SIZE - HALF_UNIT_SIZE, r * UNIT_SIZE);
}
// right
if ((getDrawn(c, r) & 2) == 0 && isUncovered(c + 1, r))
{
addDrawn(c, r, 2);
_lines.graphics.moveTo(c * UNIT_SIZE, r * UNIT_SIZE);
_lines.graphics.lineTo(c * UNIT_SIZE + HALF_UNIT_SIZE, r * UNIT_SIZE);
}
// up
if ((getDrawn(c, r) & 4) == 0 && isUncovered(c, r - 1))
{
addDrawn(c, r, 4);
_lines.graphics.moveTo(c * UNIT_SIZE, r * UNIT_SIZE);
_lines.graphics.lineTo(c * UNIT_SIZE, r * UNIT_SIZE - HALF_UNIT_SIZE);
}
// down
if ((getDrawn(c, r) & 8) == 0 && isUncovered(c, r + 1))
{
addDrawn(c, r, 8);
_lines.graphics.moveTo(c * UNIT_SIZE, r * UNIT_SIZE);
_lines.graphics.lineTo(c * UNIT_SIZE, r * UNIT_SIZE + HALF_UNIT_SIZE);
}
}
}
}
Wow, thanks! That means a lot. Luckily for your wallet it'll be released as free to playYourNerdyJoe wrote:This looks like one of the few flash games I would actually be willing to pay for if it came to that.