Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    271
  • comments
    969
  • views
    189964

Nothing

Sign in to follow this  
Sir Sapo

398 views

Hey everyone!

I've only got one screeny today, but hopefully tomorrow I'll have a video for you guys to watch!

Lasers II
A few posts back I showed you guys the Kremlin Laser that peels open and fires a laser beam. Well, I never showed the laser beam in those screens, because... well... they didn't exist at the time. Anyways, I recently coded them up, and, via the magic of mathematics, they can now cause damage to whatever they come in contact with, which is pretty neat. Here's a screeny of the Laser in action:



Here's a question for you guys, what color should the laser be? Mark thinks green, and I'm not too opinionated about it, but what do you guys think?

2D Sound
This is what I've been working on for the past couple of days now, and its finally starting to come along. Before I got this working, whenever a sound was requested to be played by an object, it was just played regularly, regardless of the camera's location relative to the sound location. This got kinda annoying sounding when a SAM site across the map would fire a missile and the sound would be heard loud and clear 20 miles away. Anyways, after much thinking, I finally decided on a solution to this problem.

Step 1: Store the information related to the sound somewhere
I realized that if I wanted 2D sound, I needed to know the location of the sound, its 'attenuation' rate, etc. I created a simple structure called Sound2D (wierd huh[grin]), which holds the location of the sound, its fade rate, and the channel it is playing on (I'm using FMod BTW). Then, whenever a call was made to Play2DSound(), these variables could be stored and recalled later. You may be thinking, "Why not just figure out the fade value when you first play the sound instead of saving it for later?". That works fine when the sound is a short clip, such as a bullet richochet-ing or an explosion, but for longer sounds(such as air-raid sirens) we wanted to have them be able to fade in and out as the player flew past.

Step 2: Fade the sound based on distance
The next step was to then update through all of the Sound2D's and adjust the volume of each one for changes in the camera position. In order to do this, I just looped through the list of Sound2D's, calculated their distance from the camera, and then applied this handy little formula I came up with to get the new volume setting (0-255).

float volume = (attenuationrange/distance)*255;

Then it is just a matter of setting that sounds channel to the calculated volume, and voila, 2DSound that fades in and out depending on the distance to the camera. I wish I could make a movie showcasing this effect, but I'm afraid I haven't the time nor the patience tonight to wrestle with Windows Movie Maker.

Little Fixes
Been doing lots of them.....

John Carmack
So today Mark and I went to the X-Prize event in Las Cruces, NM, because my dad managed to get us some VIP tickets. As some of you may know, John Carmack is a strong proponent of private space flight, and created Armadillo Aerospace to build a private spacecraft. Anyways, he was at the event, and we found out that one of my dad's friends could introduce us to him. At this point, Mark and I are pretty happy, because its fucking John Carmack. Then, my sister calls from my house (which is an hour away), and says she needs us to take her somewhere, so we have to leave before we meet Carmack because my sister couldn't be 30 minutes late for a goddamn birthday party.... So lets see, last week North Korea ruined my Saturday, and this week it was my sister, who's next?

More tomorrow hopefully, Peace Out!
Sign in to follow this  


11 Comments


Recommended Comments

Personally, I think the laser should be red. Red is the common laser color and also red...for you know...commie laser[lol]

It's a shame you weren't able to meet John Carmack. But hey, if you keep working, there's always a chance to meet him and other celebrity game developers.

Share this comment


Link to comment
I think that the laser colour should be definable in the scripts and maybe also an "ammo". *Envisions a mod where the aircraft fires a laser*

I've already modding the current demo.:P (I added the sam back and made the AAA faster)

But for this enemy, I think it should be red, even if it was just that the crystal is red, and red absorbs any non red colour, so a green laser coming from it is just weird.

Share this comment


Link to comment
@Stompy - Yeah, thats what I'm thinking now too...

@Rob Loach - Hopefully before November 31 so we can enter it in the 4E5, but we're getting pretty close to the point where all we need to do is pump out levels and dialog.

@mldaalder - Ahh, someone found out the magical A22 definition system, and by magical I mean a bunch of text files thrown together[grin]. You may have deduced that the Hardpoints are the weapons that are mounted on an object, and that in their definitons they have what they will shoot defined. Well, same goes for the laser, they are just a different type of ammo, so you should be able to figure out a way to get the airplane to fire lasers after our next demo release if you try hard enough[wink]

@Ceoddyn - I guess the French lasers could be rainbow.... j/k[grin]

@Samsonite - We're working on it, the next demo will in all probability have a new level with new stuff, a weapons select screen, etc, so look forward to that soon!

Thanks for the replys everyone!

Share this comment


Link to comment
U-V (or just violet) coloured, because unless the pilot is staring exactely at the origin of the red laser it would do f' all. But that's just from a realism point of view, might not look pretty, i'm artistically challenged :( .

Share this comment


Link to comment
U-V (or just violet) coloured, because unless the pilot is staring exactely at the origin of the red laser it would do f' all. But that's just from a realism point of view, might not look pretty, i'm artistically challenged :( .

Share this comment


Link to comment
Quote:
Original post by Sir Sapo
@mldaalder - Ahh, someone found out the magical A22 definition system, and by magical I mean a bunch of text files thrown together[grin]. You may have deduced that the Hardpoints are the weapons that are mounted on an object, and that in their definitons they have what they will shoot defined. Well, same goes for the laser, they are just a different type of ammo, so you should be able to figure out a way to get the airplane to fire lasers after our next demo release if you try hard enough[wink]

Yes, I've found it. ^_^
You can't beat "Show all hidden files".:P

I was sort of hoping that there would be actual functions in them. But just values. :(

I don't suppose you can add some Python.:P
That would really rock.
If you need examples of why it rocks, let me know, I make (and made) a lot of them (for the game: Star Trek: Bridge Commander).;)

[EDIT] Ooh... Time traveling!

Share this comment


Link to comment
I could have sworn my "Hide Folders/Subfolders" idea would have stopped such treacherous behavior[wink]

The values you are referring to are just the definitions of objects, but the scripting system actually has functions built into it that allow you to do some cool stuff like spawn certain enemies and mess with the camera. Unfortunately, the system isn't quite user friendly yet, but I'll probably write up a tutorial after the game is done, because we'll be releasing the level editor too, and it would be cool to see what stuff people can come up with!

Share this comment


Link to comment
Red.

From a game-play perspective, players are familiarized with red lasers, and will immediately know that a moving red line presents a danger to them.

Red is also commonly associated with danger, while green looks friendly or inviting and may initially confuse a player (though likely to a minimal extent).

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!