@StoryFort the mouse died as it lived. reading the back of the boxes of all those sweet games. (Today)

RT @IndieOlympics: #IndieOlympics2017. What do you want to see? What should we create together? RT and reply (Yesterday)

RT @HeartMachineZ: If you or anyone you know is a topnotch GameMaker programmer and interested in helping us with a few things, hit up info… (2 days ago)

@RakurinHD It was Ibuki who I was kinda interested in checking out so maybe it was just destiny (2 days ago)

@Capy_Nathan I think I still like 4 better but that is probably just due to how much time I spent with it, and 5 doesn't have sak ;_; (2 days ago)

@Capy_Nathan hmm yeah I am having fun with mika, karin, and juri but right now the characters feel more samey than they did in SF4 maybe? (2 days ago)

@mattjbaldo It purchased it with my fight money which is the first option in the menu, so when it buffered my input it just selected that. (2 days ago)

@Capy_Nathan yes the core game is really fun and cool and great which is why I am so dang frustrated at everything else (2 days ago)

I cannot help but laugh at what a horrible mess SFV is other than the actual core game itself. It amazes me more and more every day. (2 days ago)

accidentally bought a character in street fighter v because I tried to select a locked char and it lagged and I hit A during the lag fffffff (2 days ago)

@aceriou not an otter thing. You could use some windows api methods on init to force focus I believe. (2 days ago)

@aceriou yeah sorry that's something in windows I think. When you run without debug console it should just focus the game window (2 days ago)

@TyrusPeace I hear guilty gear is pretty good. The new KoF looks... weird. I liked KoF13 a lot though. (3 days ago)

@RakurinHD Yeah they look... alright? But dang between the UI, survival mode, and the excessive DLC I'm amazed it has players (3 days ago)

I like the core system and fighting part of street fighter v but wow everything else surrounding it stinky poop garbage (3 days ago)

@aceriou There was a Flashpunk "port" to C++, and Otter is based off Flashpunk: t.co/PBf41S4KRh Hasn't been touched in awhile though (3 days ago)

@aceriou Not sure, but if you're using C++ I would look into just using SFML directly, or look into C++ built frameworks rather than Otter. (3 days ago)

@StoryFort yaye yaaaaaaye (3 days ago)

@dejobaan I'M FIRED (4 days ago)

Working solo is cool and all but it also means that when I'm in a huge funk I don't have anyone else on the project to snap me out of it x_x (4 days ago)

follow
search

2014 - 4 - 16 / 4:58 pm / general

Dev Log: Quick Lighting Test

Dev Log: Quick Lighting Test

As a quick experiment I wanted to see how Otter would be equipped to handle a simple lighting set up. The basic set up is just a big render texture that is filled with a dark color with a blend mode set to multiply. Then light is rendered to the render texture with a blend mode of additive. The result is a layer of shadow that can have light rendered to it.

Image

The code for this set up right now is pretty straight forward as well. I'm using a black and white image for the light. Just a black rectangle with a white radial gradient in the center.

Here's some sample code to show how this effect is achieved with Otter!

//set up the surface
public Surface SurfaceLighting = new Surface(Game.Instance.Width, Game.Instance.Height, new Color("379")) {
Blend = BlendMode.Multiply
};

//set up the light
public Image ImageLight = new Image(Assets.ImageLight1) {
Blend = BlendMode.Add
};

//add the surface to an entity to render it
//this happens in an object's initialization
AddGraphicGUI(SurfaceLighting);

//render light to the surface
//this happens in a Render() function
Draw.SetTarget(SurfaceLighting);
ImageLight.Color = Color.White;
Draw.Graphic(ImageLight, Input.MouseX, Input.MouseY);
ImageLight.Color = Color.Red;
Draw.Graphic(ImageLight, Input.MouseX + 500, Input.MouseY);
ImageLight.Color = Color.Blue;
Draw.Graphic(ImageLight, Input.MouseX - 500, Input.MouseY);
Draw.ResetTarget();

4 Comments
Avatar

2014 - 4 - 17 12:29 PM

TodesBrot

Did you cut parts of the code? Because it seems really odd to me that a function contains public fields.

Avatar

2014 - 4 - 17 1:30 PM

Kyle

Yes, hence the comments.

Avatar

2014 - 4 - 17 2:59 PM

TodesBrot

...goddammit I overlooked that

Avatar

2014 - 4 - 18 7:39 PM

Kyle

;D

Avatar

Post your comment!

POST COMMENT

about

About

Hi! My name's Kyle, and I make video games most of the time in Denver, Colorado. Here you will find my thoughts, games, websites, doodles, and other stuff like that. I worked on Snapshot, Offspring Fling, and a whole bunch of other games. I also created and maintain Otter, a 2d game making framework. If you want to get a hold of me use the form on the bottom of the page, leave a comment, or just tweet at me. I try to post three times a week. Thanks for stoppin' by! You're the coolest.

blog stuff

categories

tags

archives

facebook

videos

Do you want to make a Let's Play of one of my games, or a just a video featuring footage of my games? You have my full permission to do so! Even if you are monetizing your videos, you still have my full permission to use any footage from any of my games. Go for it!

contact

Your message has been sent! Thanks :)
SEND MESSAGE