Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kaotiklabs

Ok, I will try it, if not will look for camtasia.
Hi guys,
recently I wanted to record a gameplay video of my LD entry with fraps but Im having several isues with the audio sync.
I remeber that I expercienced this type of problems before :(

How do you record them?
Still not gameplay video, problems syncing the audio with fraps.

Eitherway, you can download it here!
Yes, really useful!
Looking for giving it a good use!
Beziers are used in the artist program, I dont have this data, so I´m looking for something more generic.
I´m trying to do it on the fly with a barely good performance, if is not possible, I will look for precalculation, but directly from the texture, loading the image in memory and checking the rgbs.
I have something now, but must be optimized.
well, is the same.


this shaders are aplied to the texture images.
Oh yes Kitty, great for storyboarding with the mates. You can also share a drawboard from google docs, but this is better.
Ive been playing a bit with shaders and 2D tints and managed to compile 2 of them.

I post it here in case it could be useful for anyone or even me in the future.

for sepia tint just use this

Code (glbasic) Select
uniform sampler2D image;

void main() {
vec3 texel = texture2D(image, gl_TexCoord[0].xy).rgb;
gl_FragColor = vec4(texel.x,texel.y,texel.z, 1.0);

gl_FragColor.r = dot(texel, vec3(.393, .769, .189));
gl_FragColor.g = dot(texel, vec3(.349, .686, .168));
gl_FragColor.b = dot(texel, vec3(.272, .534, .131));   

For a Black & white filter this one

Code (glbasic) Select
uniform sampler2D image;

void main() {
vec3 texel = texture2D(image, gl_TexCoord[0].xy).rgb;
gl_FragColor = vec4(texel.x,texel.y,texel.z, 1.0);

gl_FragColor = max(texel.r,max(texel.g,texel.b));
I really enjoyed it!

Looking for the next (second) one :P
Wampus, your idea is fine, I have used it many times in the past, but in this case terrain is beeing randomly generated and is really curved (beziers) so I must find a way to do it on the fly.
Eitherway I dont discard to try it also.
I will test some of the methods comented here and lets see the performance results.
I need a good method to follow the terrain (collision sprite) contour, so I must find the upper Y pixel of my collider.
Using SPRCOLL with a single pixel helps, but the problem still is wich method to use.

Maybe I could check for SPRCOLL from the bottom of the collision sprite to the coordinate Y where it stops colliding in order to find the top point. Dont know if this would be very CPU intensive thought.
Oh sorry, I mistyped SETPIXEL, wanted to write GETPIXEL.

I just need to know the upper pixel of a terrain/collider in a given X.
is possible?

now I have something like that (horrible coded)

Code (glbasic) Select
if sprcoll(character, terrain)
DEC Character.y, 1
INC Chracter.y, 1

That obviously flickers and is ugly xD

During the last LD I found a problem that coudnt solve properly.

I had a 2D terrain with a collision mask and just wanted to implement a sprite walking over it.
I just needed to use one point calculation (medium bottom) for the checks.

I thought about using setpixel but discarted for beeing slow.
I finally did it by adjusting up/down all the times the Y, but that obviously ends with a bit of flickering and another related things like an "elevator motion" when you move fast and the character goe trough the terrain. Im still thinking about a good solution without having to precalcullate the terrain heights.

Some sort of raycast collision calculation is possible in 2D?
Wich is the best way?


Here is finally Tiny Ranger`s postmortem.

A lot of things learned from it for the next time.