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.


Topics - Radnen

Pages: [1]
1
SFML projects / Sphere Game Engine SFML port
« on: August 07, 2013, 04:32:49 am »
So, there is a video game creation program called Sphere. It's been around since 1997, and is therefore old. It was billed as an RPG game creation engine, but has since been used to make really any kind of game. It has a built-in tilemap engine and handles things like windowstyles (the borders of popup windows) fonts (as bitmaps) and spritesets (images with frames, delays,  directions, and indices). It uses JS as the game scripting language - the first to do this for that purpose - and it's API is very easy to use to get started, and up and running.

Sphere-SFML is a re-implemnation of the Sphere game API using SFML as the base for video game presentation. I wanted to make sure it's old API is kept intact so games made all the way back in 2001 can still run. But I also wanted to add new modern features, such as shaders and particle systems (It has a particle system but it's very clunky).

Anyways, I'm doing this in C#. This is a departure since the original was written in C++ and was cross-platform. But with some help from Mono I think I can make it cross platform - people mainly used Sphere under Wine anyways, so at least I have that option as a fallback.

As far as development goes I'd say I'm close to 80% realization of the Sphere game engine and API. I'll post screenshots of actual working games soon. Sphere had an abstraction layer for audio and graphics, so it had both a software and hardware driver. But the hardware driver is pretty bad and under SFML I can get a 400% speedup from sphere games.

The source code:
https://github.com/Radnen/sphere-sfml

tl;dr SFML is being used to resurrect a dinosaur - how cool is that!? Hell even it's JS engine is called "Jurassic".

2
DotNet / Mono with OSX
« on: July 31, 2013, 04:17:39 am »
So I'm having trouble getting SFML to run under Mono on OSX. I added config files to the dlls, but I don't know if I did it right.

I add csfml-graphics-2.dll.config to the exe directory, and add the libsfml-graphics.2.dylib to it.
The config looks like this:
<configuration>
    <dllmap dll="csfml-window-2.dll.config" target="libsfml-graphics.2.dylib">
</configuration>
 

It should work; any ideas?

3
Feature requests / Module music formats
« on: July 29, 2013, 01:43:23 am »
I love module music files for their amazing small size to sound quality ratio.

I do propose a solution, not just a request:
I want you to upgrade the sound package of SFML to use audiere since it supports all the current (major) sound types and far, far, far more and it is known to be cross platform and mature, and is opensource/free I think if the license works out for you it would be a great start.

There are other libraries you can use but they have horrendous licensing. I'm using SFML 2.0.Net and I found the supported music/sound types lacking, I can't find any good audio libraries out there. But audiere is great, but no C-sharp bindings exist, plus you'd want to edit the C++ version before you make bindings of it, and so this is again great for that case.

4
DotNet / [solved] RenderStates causing blank images to appear
« on: July 09, 2013, 10:35:37 am »
Can someone help me with a weird issue? I'm trying to draw a transformed image. An image where the x's and y's can be whatever so it can look skewed, pinched, etc. with a texture.

The code I do that is here:
        [JSFunction(Name = "transformBlit")]
        public void TransformBlit(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
        {
            Vertex[] array = new Vertex[4];
            Color c = new Color(255, 255, 255);

            array[0] = new Vertex(new Vector2f((float)x1, (float)y1), c, new Vector2f(0, 0));
            array[1] = new Vertex(new Vector2f((float)x2, (float)y2), c, new Vector2f((float)_image.Size.X, 0));
            array[2] = new Vertex(new Vector2f((float)x3, (float)y3), c, new Vector2f((float)_image.Size.X, (float)_image.Size.Y));
            array[3] = new Vertex(new Vector2f((float)x4, (float)y4), c, new Vector2f(0, (float)_image.Size.Y));

            Program._window.Draw(array, PrimitiveType.Quads, state);
        }
 

Excuse the float conversions, I can only get doubles from the JS environment. The state object has the Texture property set to the texture I'm using. It should work! I am loading the texture before setting the state, and making sure it's not disposed in any way. Drawing the texture alone as a sprite works, but not this method. And this is AFAIK the only method where you can skew the drawn image.

You can try the code out at: https://github.com/Radnen/sphere-sfml
Just download, run in visual studio and have at it. The demo code should draw an image in the upper-left that is not a spaceship, but a face. As you can see, it's invisible even though transformBlit is being used. Removing the state will make it draw a white rectangle. So I know it's working, but just not applying the textured state.

5
DotNet / Integration with winforms
« on: August 06, 2011, 01:14:19 am »
Hi I'm making an editor for my SFML.Net game, and I was wondering how one would create a rendering environment in a winforms project?

I'd like to edit the maps in my game and see them at the same time. Presently I'm using GDI+ (paint events) to draw the map, but I feel like I'm reinventing the map drawing.

Is there any way? I didn't see a tutorial here,
Thanks.

Edit:
Basically, I get a LoaderLock issue.

If I were to set a RenderWindow's target as a blank form, it's fine. But if the target is a component, it won't work. See, I need a renderwindow to point to a blank component, why? So that I have a mad editor component nestled in with other components that build up the game editor.

I can't use the main form as the render window, it won't work with the way I've planned things.

Pages: [1]
anything