Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411273 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 03:17:01 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsValchion - 3D GBC-Styled Zelda-like - Win / Mac / Linux Demo #2
Pages: 1 ... 24 25 [26] 27 28
Print
Author Topic: Valchion - 3D GBC-Styled Zelda-like - Win / Mac / Linux Demo #2  (Read 94052 times)
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #500 on: August 13, 2013, 05:51:02 PM »

^ Sure, but it'll have to wait a bit. My computer suffered a mysterious disk corruption problem, and I ended up having to reinstall Windows. I made backups of my songs and Sustain and Valchion, but the most recent version of Valchion had a week of work or so on it that I'll have to do over. I'm pretty sure I lost at least one song for Valchion, too, among a couple of other normal songs I lost. Oh, well. I'll just have to keep pushin' I guess.

EDIT: In the mean-time, I'll share the GLSL shader. Here you go:

Code:
def Pixellate(cellw = 4.0, cellh = 4.0):

        """
        Pixelation filter.
        
        Author: SolarLune
        Date Updated: 6/6/11
        
        Why a function? Because this way, users can easily customize the filter
        to return a custom-made script. Note that this only works when calling the script (so don't call it
        every frame as that will kill your FPS. It's better to copy the script you want and pass a uniform variable
        if you want to alter parameters while running the filter)
        
        cellx = cell-size on the X-Axis
        celly = cell-size on the Y-Axis
        
        Higher numbers equals a blockier picture
        """
        winsize = [render.getWindowWidth(), render.getWindowHeight()]  
        
        return ("""
        // Name: Pixellate
        // Author: SolarLune
        // Date: 6/6/11
        //
        // Notes: Pixellates the screen using blocks consisting of cellx size on the
        // X-axis and celly size on the Y-axis.
        
        uniform sampler2D bgl_RenderedTexture;

        float Round(float value){       // Rounds off the specified number
        
                if (ceil(value) - value < 0.5)
                        return ceil(value);
                else
                        return floor(value);
        
        }
        
        void main(void)
        {
                vec2 uv = gl_TexCoord[0].xy;
                        
                        float dx = """ + str(float(cellw)) + """ * (1.0 / """ + str(float(winsize[0])) +  """);
                        float dy = """ + str(float(cellh)) + """ * (1.0 / """ + str(float(winsize[1])) +  """);
                        
                        vec2 coord = vec2(dx * Round(uv.x / dx), dy * Round(uv.y / dy));
                        
                        coord.x = min(max(0.0, coord.x), 1.0);
                        coord.y = min(max(0.0, coord.y), 1.0);
                        
                        gl_FragColor = vec4(texture2D(bgl_RenderedTexture, coord));
        }
        """)


This was written in Python and returns a string consisting of the GLSL shader with a few modifications as you see fit before-hand (i.e. alter a property of a shader before you use it). It needs to be cleaned up a bit, but the idea is there.

P.S. There's a whole range of screen filters I've compiled / found / made in my library SFL. You can find it on my Google Code page here.
« Last Edit: August 13, 2013, 05:57:46 PM by SolarLune » Logged

SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #501 on: August 19, 2013, 07:03:41 AM »

So I got Valchion back up and running, but unfortunately, Sustain also got messed up. I got a backup, but I'm not sure how much work I lost yet (could be just a few days, or more). Sad



Anyway, here's a screenshot showing that pixellation filter in action. I'm kinda running out of steam on this, obviously, so I'm not sure what'll happen with it. It's a plot-based game, so I can't just leave the plot out while you're playing - it has to be driving, kinda.

However, even though I've worked on it for such a long time, and I like the way it looks and plays, I know I have a pretty long way to go with the number of maps, bosses, and cinemas to make to make it just acceptable, which is kinda discouraging. I mean, I think everything I've done so far only amounts to around 45 minutes of play max. Maybe this is just too big of a game for me to finish right now. Sad
Logged

lean
Level 0
**



View Profile WWW
« Reply #502 on: August 19, 2013, 11:02:26 AM »

I don't know. I think that about an hour-long gameplay is pretty acceptable. How long were you planning it to last?
Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #503 on: August 19, 2013, 12:33:20 PM »

I like everything in this game - the gameplay, character design, colors, places for game saves, crates with items, tiles and how it is perceived in 3D. Especially I like the track sounding in first level. Very enjoyable game, reminded me of several favorites from NES.
I don't like smoothed light (with the exception of light around the campfire inside buildings). I would have made just like that, if it were possible:



And I lack of global map as in classical metroidvania games.
« Last Edit: August 19, 2013, 12:56:33 PM by 08--n7.r6-79.84 » Logged

SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #504 on: October 08, 2013, 12:42:15 AM »

Hey, it's been awhile.

So, the game's dead.


















































Just kidding, perhaps surprisingly so.

I believe I'm getting back into this, under the guise of "do whatever to make stuff that's fun" more-so than worrying about the story and world so much. I mentioned on my Twitter that I see how much work went into this when comparing it to other games that have already been finished. I see the facets of the game that would go forever unnoticed if it were never released (like every screen pretty much looking and feeling unique, which is pretty cool, I think). So, I'm going to try to continue.

After playing some Zelda, I implemented a type of block that only rises when all enemies on the map are defeated. I either did that really early this morning, I think. Anyway, I'll see about adding more stuff just a little bit per day.

I remember making it so that you can now control yourself while you dodge, which makes it kind of over-powered, especially since you can dodge indefinitely. So, a "stamina" bar could be cool. I'm also (attempting to) think of more "Zelda-ish" enemies that require more than a single weapon, or use of different weapons, to defeat.

@lean - I'm not sure - long enough to make save states useful. An hour long is kinda short.
@08 - Thanks a ton. The dithered light effect you drew there is very interesting. I might end up doing that effect. And the global map is kind of tough to do due to the way that I designed the game. :S

If I were to make the game again, or a sequel, then the map could probably be a bit better.
Logged

rundown
Level 5
*****



View Profile WWW
« Reply #505 on: October 08, 2013, 02:55:32 AM »

pwew you got me.

Glad you find the strength to start working on it again.
Logged

08--n7.r6-79.84
Level 8
***


You can call me 08.


View Profile WWW
« Reply #506 on: October 08, 2013, 08:56:10 AM »

Then waiting for the news! You can't throw this miracle, man.
Logged

Quarry
Level 10
*****


View Profile
« Reply #507 on: October 08, 2013, 10:49:02 AM »

Doesn't GLSL already have a round function?
Logged
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #508 on: October 08, 2013, 01:16:24 PM »

Doesn't GLSL already have a round function?
Only in v1.3.

Good to see you back here Solar.
Logged

SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #509 on: October 09, 2013, 12:17:25 AM »

Thanks you guys.

In good news today, I figured out why that pixellation shader looked so junky. It was testing the spaces in-between pixels because of using fractions. Adding a half a pixel distance to the sample position made it nice and crisp. In the first pic, the un-filtered one is on the right.





Compare that with the junky scaling from before in my second-to-last post or so.

Also I think I'm going to move to GLSL for nice lighting and cool shadows in-game. That'll mean no more of my own lighting, but that's nothing too bad since my lighting was pretty stinky. The built-in lighting has built-in shadows too, even on 2D animated sprites, which is cool. Hopefully I can still have the same lighting set-ups that I used to have, as well as have it look cool.



P.S. Here's the shader. You can also find it on my Google Code page.

Code:

def Pixellate(pixel_w = 4.0, pixel_h = 4.0):

"""
Pixelation filter, adapted from a script from Geexlab / Geeks3D.com.

Author: SolarLune
Date Updated: 6/6/11

Why a function? Because this way, users can easily customize the filter
to return a custom-made script. Note that this only works when calling the script (so don't call it
every frame as that will kill your FPS. It's better to copy the script you want and pass a uniform variable
if you want to alter parameters while running the filter)

pixel_w = pixel-size on the X-Axis
pixel_h = pixel-size on the Y-Axis

Higher numbers equals a blockier picture
"""
#winsize = [render.getWindowWidth(), render.getWindowHeight()]

return ("""
// Name: Pixellate
// Author: SolarLune
// Date: 6/6/11
//
// Notes: Pixellates the screen using blocks consisting of cellx size on the
// X-axis and celly size on the Y-axis.

uniform sampler2D bgl_RenderedTexture;
uniform float bgl_RenderedTextureWidth;
uniform float bgl_RenderedTextureHeight;

void main(void)
{
vec2 uv = gl_TexCoord[0].xy;
vec2 pixel = vec2(1.0 / bgl_RenderedTextureWidth, 1.0 / bgl_RenderedTextureHeight);

float dx = """ + str(pixel_w) + """ * pixel.x;
float dy = """ + str(pixel_h) + """ * pixel.y;

vec2 coord = vec2(dx * floor(uv.x / dx), dy * floor(uv.y / dy));
coord += pixel * 0.5; // Add half a pixel distance so that it doesn't pull from the pixel's edges,
// allowing for a nice, crisp pixellation effect

coord.x = min(max(0.001, coord.x), 1.0);
coord.y = min(max(0.001, coord.y), 1.0);

gl_FragColor = texture2D(bgl_RenderedTexture, coord);
}
""")


Welp, see ya.
« Last Edit: October 09, 2013, 06:35:50 AM by SolarLune » Logged

clockwrk_routine
Guest
« Reply #510 on: October 09, 2013, 01:23:27 AM »

woah that shader really ties everything together
looking good  Hand Thumbs Up Left
Logged
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #511 on: October 16, 2013, 12:48:38 AM »



Hey, so I changed how maps are loaded in. Previously, they were loaded in several in a single "zone" (a scene in Blender). Now, they're all loaded in in a hidden scene, and added to the game as necessary. It reduces the loading time that switching to GLSL mode inflicted, which is nice, but I'm seeing some pains from the Rasterizer (drawing system), which ain't great, so I'll try to see what's going on there soon.

As you can see, I added the flashlight, which is nice and makes me feel like adding more underground / dark hallway areas to check out, but I'm not sure if it's too helpful currently. I think a lantern-like approach might be better (as has been suggested), so I might just go with a point light instead.

Anyway, I'll try to continue making stuffs!

Logged

BomberTREE
Level 9
****



View Profile
« Reply #512 on: October 17, 2013, 06:54:53 PM »


PIXELATED LIGHTING so nice.
Logged
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #513 on: October 18, 2013, 11:25:51 PM »

Haha, thanks.

Today I changed the flashlight to a lantern to serve a better, more visually useful purpose. As the BGE doesn't have point light shadows built in, for the effect, it's just a wide spotlamp overhead (the additive light overhead in this screenshot isn't part of it, haha).



Also, I figured out a restriction on and a workaround to handle dynamically spawning and deleting multiple lights.

EDIT: Another screenshot with a night-time test on an outdoor location. I'm not sure if I'll have an actual time rotation, as that could really mess with the player if he needed the lantern and didn't have it yet, but it could be something that happens through the course of the game.



EDIT 2: This screenshot doesn't look so great, haha. Not sure if I should take pictures with the pixellation shader on anymore. Oh, well.
« Last Edit: October 18, 2013, 11:48:09 PM by SolarLune » Logged

Rasse
Level 1
*



View Profile
« Reply #514 on: October 19, 2013, 12:58:41 AM »

This looks really cool, keep up the good work!  Beer!
Logged
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #515 on: October 24, 2013, 12:33:44 AM »

Thanks, Rasse!

I've uploaded another devlog video -

Logged

Irock
Level 5
*****


why's my avatar so big


View Profile WWW
« Reply #516 on: October 24, 2013, 12:03:03 PM »

The game's shaping up incredibly well!

I find your devlogs to be incredibly soothing for some reason, and I really enjoy watching them. Maybe the game itself is soothing.
Logged

louisdeb
Level 4
****



View Profile
« Reply #517 on: October 31, 2013, 09:38:06 AM »

This looks great, I've just discovered your stuff. Totally fell in love with Misshoni - where's that at?
Logged
ChrisD
Level 1
*


View Profile
« Reply #518 on: October 31, 2013, 03:41:05 PM »

Lookin good man
Logged
SEGVADR
Level 0
**


卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐


View Profile
« Reply #519 on: October 31, 2013, 03:43:27 PM »

dat pixel shader pretty sick i love writing shaders
Logged
Pages: 1 ... 24 25 [26] 27 28
Print
Jump to:  

Theme orange-lt created by panic