"Triangle" - Ludum Dare Project Flash Rewrite

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

"Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Tue Mar 11, 2014 8:19 pm

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)

Image

:mrgreen:

I'm basically making a clone of this old thing I made a few years back.
Last edited by RyanPridgeon on Thu Mar 13, 2014 10:46 am, edited 1 time in total.
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: What projects are you currently working on?

Postby RyanPridgeon on Wed Mar 12, 2014 2:29 pm

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

Image
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: Ludum Dare Project Flash Rewrite

Postby dandymcgee on Wed Mar 12, 2014 7:59 pm

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. ;)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: What projects are you currently working on?

Postby SomeAwesomeUsername on Thu Mar 13, 2014 6:27 am

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

Image

Oh wow. That's badass!

I love that fov/fog. And the shaking every time he shoots I dig too.
SomeAwesomeUsername
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 25
Joined: Mon Jul 16, 2012 5:32 pm

Re: What projects are you currently working on?

Postby Mr. Achie on Thu Mar 13, 2014 6:35 am

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.
User avatar
Mr. Achie
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 38
Joined: Mon Feb 16, 2009 4:23 pm
Location: The Netherlands

Re: Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Thu Mar 13, 2014 10:52 am

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 :mrgreen:

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.

Image

Thanks guys for the positive feedback! It's great motivation :mrgreen:

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;

Image

Edit 2:

So close I can almost taste it

Image

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.

Image
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby dandymcgee on Thu Mar 13, 2014 5:44 pm

That's a really interesting and unique approach to 2D FOV. Love the GIFs, they work excellent to illustrate your point.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Thu Mar 13, 2014 8:33 pm

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)
Image


Edit:

Bonus debug output;
Click here to see the hidden message (It might contain spoilers)
Image
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Sun Mar 16, 2014 2:55 pm

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.

Image

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.

:)
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby EddieRingle on Sun Mar 16, 2014 3:38 pm

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.
User avatar
EddieRingle
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
 
Posts: 76
Joined: Sun Apr 10, 2011 6:58 pm
Location: Detroit, MI

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Wed Mar 19, 2014 6:11 pm

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.

Image

Starting a level and placing some tiles

Image

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!
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Thu Mar 20, 2014 9:48 pm

I made a Youtube video to show off the level editor a bit, since it's quite complete now. :mrgreen:

Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby ph0sph0ruz on Sat Mar 22, 2014 9:09 pm

I love the concept of Triangle and the work you put into it so far.
User avatar
ph0sph0ruz
Chaos Rift Newbie
Chaos Rift Newbie
 
Posts: 39
Joined: Sat Mar 22, 2014 4:52 am

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby dandymcgee on Sun Mar 23, 2014 12:50 pm

The Base64 Save/Load is slick. It loads really fast.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: "Triangle" - Ludum Dare Project Flash Rewrite

Postby RyanPridgeon on Sun Mar 23, 2014 11:03 pm

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)
Image

Click here to see the hidden message (It might contain spoilers)
Image


:)
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
 
Posts: 451
Joined: Sun Sep 21, 2008 2:34 pm
Location: UK

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron