Just started working on a little Flash project today and made a trendy GIF.
Got the basic functionality of the game engine in and I've integrated the NAPE physics engine (an awesome physics engine if you're ever in the business of using Haxe or AS3)
I'm basically making a clone of this old thing I made a few years back.
Re: What projects are you currently working on?
Posted: Wed Mar 12, 2014 1:29 pm
by RyanPridgeon
Day 2... Started working on a fog / field of view sort of thing. Currently I'm just casting a bunch of rays from the player and using those to draw the black fog, but it doesn't look good enough to me. I'm coming up with a new algorithm right now that will use the corners in the nearby map geometry to draw the fog shape instead, but it's a bitch
Re: Ludum Dare Project Flash Rewrite
Posted: Wed Mar 12, 2014 6:59 pm
by dandymcgee
Hey man, that's pretty neat!
I split this from "What projects are you working on" thread since you double posted, but more so because I want to see more updates as it progresses. Feel free to rename this thread whatever you like and post a link to it in the "what are you working on" thread.
Re: What projects are you currently working on?
Posted: Thu Mar 13, 2014 5:27 am
by SomeAwesomeUsername
RyanPridgeon wrote:Day 2... Started working on a fog / field of view sort of thing. Currently I'm just casting a bunch of rays from the player and using those to draw the black fog, but it doesn't look good enough to me. I'm coming up with a new algorithm right now that will use the corners in the nearby map geometry to draw the fog shape instead, but it's a bitch
Oh wow. That's badass!
I love that fov/fog. And the shaking every time he shoots I dig too.
Re: What projects are you currently working on?
Posted: Thu Mar 13, 2014 5:35 am
by Mr. Achie
RyanPridgeon wrote:Day 2... Started working on a fog / field of view sort of thing. Currently I'm just casting a bunch of rays from the player and using those to draw the black fog, but it doesn't look good enough to me. I'm coming up with a new algorithm right now that will use the corners in the nearby map geometry to draw the fog shape instead, but it's a bitch
Veryyyyyyyyyy nice. Damn! Great concept.
Re: Ludum Dare Project Flash Rewrite
Posted: Thu Mar 13, 2014 9:52 am
by RyanPridgeon
dandymcgee wrote:Hey man, that's pretty neat!
I split this from "What projects are you working on" thread since you double posted, but more so because I want to see more updates as it progresses. Feel free to rename this thread whatever you like and post a link to it in the "what are you working on" thread.
Awesome, thanks. I was actually considering asking one of you guys to split this for me when I realised I would probably hog the thread if I carried on, so perfect
I'm working on the new algorithm for drawing the field of view. My approach is using a method where I auto generate a list of the "connections"/"corners" between the walls in the map, and use those corners to draw the fog/shadow.
So far I've got it generating the corners correctly and putting them in order of orientation from the player, so I can start to draw the shadow out of them. Each corner knows whether it's connected upward, downward, left or right, and calculates its orientation from the player, which should be enough information for me to loop round them in a clockwise motion and draw a big black shape for the shadow.
This is really fun, not gonna lie. So much vector maths is hurting my brain though. here's a quick preview where I'm just drawing the shape between EVERY corner in order of orientation. It's a start.
Thanks guys for the positive feedback! It's great motivation
Edit:
Starting to get somewhere with this! Iterating through each point, seeing if it's infront of the previous point's wall, and if it is, drawing the shape to it;
Edit 2:
So close I can almost taste it
Edit 3:
Got it! Field of view is now nice and solid. I actually ended up ditching the corners idea and generated edges instead, so I went through a list of horizontal and vertical walls/edges and drew their shadows onto the vector shadow shape.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Thu Mar 13, 2014 4:44 pm
by dandymcgee
That's a really interesting and unique approach to 2D FOV. Love the GIFs, they work excellent to illustrate your point.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Thu Mar 13, 2014 7:33 pm
by RyanPridgeon
dandymcgee wrote:That's a really interesting and unique approach to 2D FOV. Love the GIFs, they work excellent to illustrate your point.
Thanks! Here's another for ya
Click here to see the hidden message (It might contain spoilers)
Edit:
Bonus debug output;
Click here to see the hidden message (It might contain spoilers)
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Sun Mar 16, 2014 1:55 pm
by RyanPridgeon
I started working on the menus and had to write a ton of back end to set this up with a nice clean design. I also rewrote / added to the way I'm storing and reading the level/game state, to keep the state of the game world persistant as the player moves back and forth between different maps (as this will eventually be an adventure game).
I tried to replicate the DOOM transition effect as well, it's not perfect yet.
Next up is a level editor so I can actually start making some impressive levels, and adding entities more easily.
I'm reading the levels from XML, simply because Flash has built in methods for dealing with it, and it'll help me out by being nice and readable.
The entities you see there currently were just added through my sketchy method of printing the XML representation of an enemy at the player's current position into the debug output when I hit a certain key, and then adding those prints into the XML file myself. It worked nicely, but I think it's time to step it up. Now that I've got nice systems in place for managing the different screens and top level design of the game, it should be smooth sailing.
I also added some frameskipping code, so that if the graphics updating starts to lag, the game simulation should carry on at the correct pace. As well as a bunch of back end optimisations to try and make it run smoother.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Sun Mar 16, 2014 2:38 pm
by EddieRingle
Saw this on /r/gamedev and thought your name looked familiar; didn't realize you were providing updates here!
This game looks super smooth, I love it.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Wed Mar 19, 2014 5:11 pm
by RyanPridgeon
EddieRingle wrote:Saw this on /r/gamedev and thought your name looked familiar; didn't realize you were providing updates here!
This game looks super smooth, I love it.
Thanks! Glad you recognised it from the SS thread.
And now for an update. I think I'm getting somewhere with the level editor for the game now. I realised that I'd need to put something pretty good together to be able to easily add complex levels to the game so thought I might as well make it a feature of the game.
Starting a level and placing some tiles
Adding some objects and testing the level
The editor allows you to edit the tiles on both of the tile layers, as well as add objects. For each object, you can edit it in XML form. The actual states of the levels and level objects in the game is represented in class structures, but I've also added functionality for converting between XML and ByteArray as well. XML to allow readability (and stuff like being able to edit the objects in the editor using it)and ByteArray will come in handy for saving persistent data, or Base64 encoding it for people to send/load their own levels (this is what the save and load buttons do).
On a less exciting note I made myself a decent sound management engine, which should allow me to play shit tons of sounds without it cutting out important looping sounds, or say, background music in Flash's mixer.
I've also had to put a lot of work into the menu system to allow all of this to function smoothly. It's always surprising how long this stuff takes to me. Hopefully I can get back to the actual gameplay and content soon, and make it more exciting!
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Thu Mar 20, 2014 8:48 pm
by RyanPridgeon
I made a Youtube video to show off the level editor a bit, since it's quite complete now.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Sat Mar 22, 2014 8:09 pm
by ph0sph0ruz
I love the concept of Triangle and the work you put into it so far.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Sun Mar 23, 2014 11:50 am
by dandymcgee
The Base64 Save/Load is slick. It loads really fast.
Re: "Triangle" - Ludum Dare Project Flash Rewrite
Posted: Sun Mar 23, 2014 10:03 pm
by RyanPridgeon
Thanks guys :D And yeah, loading is instantaneous. We'll see how that goes when the levels get bigger, I'm sure it'll still be plenty fast though.
Click here to see the hidden message (It might contain spoilers)
Click here to see the hidden message (It might contain spoilers)