Welcome, Guest. Please login or register. Did you miss your activation email?

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.


Messages - Ztormi

Pages: 1 [2] 3 4 5
16
Graphics / Re: SFML.Net, Failed to compile Fragement Shader error(#60)
« on: August 26, 2015, 11:25:29 pm »
Reminds me of a situation at work some time ago. I had copypasted a piece of Javascript from some website and ran into a syntax error on an empty line  :o

Turned out there was a nonprintable character which Visual Studio and web debugger didn't recognize and I just wasted an hour or two wondering what the heck can be wrong with an empty line of code...

17
Graphics / Re: Overlapping "smooth" textures have slight black outlines
« on: August 24, 2015, 06:10:53 pm »
Just some of my thoughts on scaling.

If you are working with pixel art the only real way to implement zooming is to scale in factor of 1/2,1,2,3,4 and so on. You can't turn on smoothing as it will ruin the pixel art.

If you aren't using pixel art but for example pre-rendered 3d models you could draw your initial image larger than it appears in the "default" scale and have smoothing on, that way you can zoom in without losing detail.

18
SFML projects / Re: It Always Ends In Nuclear War
« on: June 07, 2015, 01:28:51 pm »
Looks great! I know it's just an alpha but I really can't wait to play this :)

19
SFML projects / Re: Screenshot Thread
« on: June 05, 2015, 07:43:59 pm »
(The transition between the two land textures could be made a bit smoother, but I assume your point was to show the coastline :))

Yeah I'll have to figure out something else for ground textures ( probably something including noise )

20
SFML projects / Re: Screenshot Thread
« on: June 04, 2015, 11:00:55 pm »
I got really tired of texture transitions in grid based games so I tried out something completely different.
I render the original hexgrid with multiple render passes, each time I'm using different shader.

1. Render hexgrid to rendertexture, each color represents it's own terrain.
2. Render with shader that combines noisemap with current rendertarget to create irregularity. Each fragment I'm trying to find nearest "coastline" from area of N pixels. This way I can control that noise isn't rendered too far from coastline. Fragments with alpha 0 are water.
3. I blur the rendertarget so I can make smooth transitions between different textures.
4. I apply the textures, each texture has it's own basecolor. To determine transitions between 2 textures I compare fragment's color to each basecolor and select two whose color is closest to the fragment's color. I mix these 2 together and finally, since alpha channel represents water I know that fragments with alpha > 0 and < 1 are coastlines.

Most of the techniques can be found online it's just the matter of combining shaders this way.

Here's a pic of the process:

21
DotNet / Re: OpenTK AccessViolationException on any OpenGL call
« on: June 02, 2015, 11:09:53 pm »
So you are saying the crash for you happens within the constructor of the dummy context? Because everyone else is saying it crashes on any GL function call.

GraphicsContext context = new GraphicsContext(new ContextHandle(IntPtr.Zero), null); // << Here?

Yeah, that's the case for me with the code OP posted. No luck with this either: http://en.sfml-dev.org/forums/index.php?topic=9693.0

(click to show/hide)

The idea here is for OpenTK to internally think it has a valid context because SFML provides the context when it is really working with an invalid context address.

Yeah, I figured that's supposed to be the case.

And would it be possible for you to upload your version of OpenTK so I can test with that? Also did you test to see if the crash also happens with the copy I uploaded?

Yes I tried yours aswell, no luck.

My build is in the attachment. Usually I just grab OpenTK from NuGet though.

To be honest I haven't troubled myself too much with this, the only use case I've got is pretty much just occasionally setting polygonmode to draw wireframe for vertex array debugging purposes.

22
DotNet / Re: OpenTK AccessViolationException on any OpenGL call
« on: June 02, 2015, 01:38:38 pm »
It crashes at OpenTK GraphicsContext constructor because Factory.Default.CreateGetCurrentGraphicsContext() (passed as getCurrent delegate) returns ContextHandle with handle 0.

https://github.com/opentk/opentk/blob/develop/Source/OpenTK/Graphics/GraphicsContext.cs#L207

Debugging reveals that default factory is OpenTK.Platform.SDL2.Sdl2Factory so ContextHandle is fetched from OpenTK.Platform.SDL2.Sdl2Factory.CreateGetCurrentGraphicsContext. Eventually the handle is got from Sdl2.GetCurrentContext which returns 0.


What is the output of the following code?

Console.WriteLine(window.Settings);

[ContextSettings] DepthBits(24) StencilBits(0) AntialiasingLevel(0) MajorVersion(4) MinorVersion(5)

23
DotNet / Re: OpenTK AccessViolationException on any OpenGL call
« on: June 01, 2015, 01:18:46 pm »
I've had problems with this aswell. The only way I've managed to use OpenTK alongside with sfml.net is not to use GraphicsContext but create OpenTK.GameWindow instead, sounds silly but it does work.

24
SFML game jam / Re: 4th SFML Game Jam Announced
« on: May 21, 2015, 10:53:14 am »
I don't think the number of entries was that bad considering the number of votes given.
Maybe have a brainstorming thread before jam starts and theme is voted where people who did vote but can't participate can share their ideas?


25
SFML game jam / Re: 4th SFML Game Jam Announced
« on: May 19, 2015, 01:08:06 pm »
I was planning on participating but couldn't figure out anything (voted minus on the winner each round I think). I might give it another shot now.

26
DotNet / Re: SFML.Net 2.2 Released
« on: May 07, 2015, 02:20:19 pm »
Which CSFML dlls I'm gonna need for this?

I'm getting AccessViolation exception on window.draw when using the extlibs of the package.

Edit: Tried on different computer and works fine, most likely a driver issue then...

27
That would create dependency for System.Drawing which is generally useless unless you are working with Winforms or WPF application.

28
General / Re: Detected collisions in SFML between Sprite and Tile map
« on: March 06, 2015, 12:16:06 pm »
By checking if bounding box of a player intersects with bounding box of nearby tile.

29
Sprite would do.

Tested the first shader myself and it seems to work nicely with slight modifications.

30
If you don't have to freely move around 3d space another approach would be to render quad with shader creating a fake 3d sphere effect.

http://www.geeks3d.com/20110316/shader-library-simple-2d-effects-sphere-and-ripple-in-glsl/
http://gamedev.stackexchange.com/questions/9346/2d-shader-to-draw-representation-of-rotating-sphere

Here's one using fractals as texture:
http://glslsandbox.com/e#23364.0

Pages: 1 [2] 3 4 5
anything