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

Author Topic: Spooker - Open Source Game Framework  (Read 26845 times)

0 Members and 3 Guests are viewing this topic.

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #15 on: February 21, 2014, 08:54:32 pm »
Just to be clear, I have no issue with you utilizing other libraries, or for that fact directly copying them in. My issue is when that method breaks usage with the original library due to the overuse of abstraction and boxing in the users. But as I said, do as you wish with whatever floats your ship.

Quote
ihneriting structures is not possible

Look at extension methods then. Also consider composition over inheritance.  ;)
Oh, I forgot about extension methods :) Thx. And yes, I am thinking about composition becouse I think I am doing inheritance in bad way :D
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #16 on: February 22, 2014, 03:40:02 pm »
Thanks again @zsbzsb for your tips, replacing inheritance with composition on GameWindow class worked, now I am not getting any more stack overflow errors. Also, removed that misleading information from website, now it should be correct. And, I tried using extension methods, but I cannot define new constructors and add operators with them, so I will probably stick with my modifications of Vector2f and IntRect. Here is detailed commit on GitHub: https://github.com/sfgl-dev/SFGL/commit/d35bb4538d3c1b9298445280e7942605fa14c911
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #17 on: February 25, 2014, 10:30:23 am »
So I sucesfully finished TileMap renderer what will render maps loaded with TiledSharp. I will probably post new commit today or tomorrow. Also, started working on Camera class, but I think changing renderwindow view will break GUI, so I must think about some other ways.
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #18 on: February 27, 2014, 05:02:28 pm »
New SFGL 1.2 Release!


In this release I finished most parts of library. I also finished Camera class and added there options for camera smoothing. So probably, 1.3 release will be last one. Anyways, in this release I added these new features:
  • Camera
  • Networking
  • Particles
  • Vertex Batch

And overhauled these:
  • GameComponent
  • GameWindow

Also, some screenies of testing game, what I will push to repository maybe along with 1.3 release:



Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #19 on: March 02, 2014, 06:10:27 pm »
Again I updated SFGL a bit. I removed unoptimized spritebatch and added new simple spritebatch what is drawing Sprites. Also, I scrapped my own particle system, becouse I totally suck at maths, and converted particles from XNA samples to SFML. I can say that I am happy with results. I even made it to load custom particle types from XML files. Also, I created AnimatedSprite class what inherits from Sprite and added some new things to camera class. And, overhauled GameTime class to be more like XNA GameTime.

GitHub commit: https://github.com/sfgl-dev/SFGL/commit/f4530680439bff507fdce8b40d937a76051120d6
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #20 on: March 06, 2014, 06:24:19 pm »
New SFGL 1.3 Release!


In this update I fixed many bugs what I found and also overhauled some parts of game (mainly GameWindow, ContentManager and State/StateUI).

Also, uploaded example game as I promised along with 1.3 release: https://github.com/sfgl-dev/Examples-Game
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #21 on: March 14, 2014, 03:06:36 pm »
In upcoming 1.4 update I did major improvements to lib. At first, I stopped using Drawable and created IDrawable what is SpriteBatch using for drawing things, so now I can call spriteBatch.Draw(...something as IDrawable). Also, created my own Sprite implementation and overhauled Rectangle and Vector2 classes (used ones from MonoGame). And I also finally finished loading of Tiled collision polys, polylines and rectangles to human readable format :D. Everything is working smooth and fast right now. I will post more info maybe tomorrow and probably also new release. And I am also working on new site design for SFGL site and new logo. Oh, I almost forgot, I added option to GameSettings class for changing GameWindow icon. And, I made GameWindow class abstract, so it will work as XNA Game class (in really similar way, and I love how it simplified way to load additional components to GameWindow).

I would love some feedback on above, becouse this thread is a bit quiet [one-man army thread (only I am posting here :D) lol].
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: [.NET] SFGL - Simple and fast game library
« Reply #22 on: March 26, 2014, 08:54:56 am »
I have v 1.4 almost ready. Some new features:
  • New Sprite and Texture class (I implemented my own versions of SFML sprite and image classes to increase performance of SpriteBatch)
  • New Color class (it have same format as HTML colors, so you can use for example #FFFFFF for white etc)
  • Working on lights system and thunderbolt effects for particle system
  • Finished physics and new objects (Line, Polygon and Circle)
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: Spooker - Open Source Game Framework
« Reply #23 on: March 29, 2014, 01:09:11 pm »
Big update


Okay, I decided to rename this engine to Spooker Framework, becouse yes, you guys was right, SFGL is not very original. Currently updating and renaming all repositories and site. I created new site design for Spooker site (what I am committing right now). Also, I fixed Gwen.NET SFML binding, becouse I had many problems with loading custom fonts for GUI, so I simply decided to fix it. I also uploaded fixed version on GitHub here: https://github.com/eatenbrain/Gwen.SFML. Then, I again looked to my sprite and texture classes, modified some bits here and there and I sucesfully increased performance of library around 2 times. It is great, becouse on my development notebook I have Intel Atom processor and integrated graphic card, so it is running pretty slow :D. On my other notebook, I do not even noticed this big performance increase lol.

Anyways, here is new GitHub link for Spooker: https://github.com/spooker-dev/Spooker

EDIT:
I updated all repositories finally, so site is updated and also Spooker repo. Here is commit of new release: https://github.com/spooker-dev/Spooker/commit/79cfa6acb890686748fd3f9ccf2924db66620c19
« Last Edit: March 29, 2014, 01:59:30 pm by Deathbeam »
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Spooker - Open Source Game Framework
« Reply #24 on: March 30, 2014, 11:26:04 am »
Cool name :)

I saw that you provided an example game, do you also have a few code snippets that show the separate features on their own? Or maybe this will be part of the tutorials ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: Spooker - Open Source Game Framework
« Reply #25 on: March 30, 2014, 02:02:40 pm »
Cool name :)

I saw that you provided an example game, do you also have a few code snippets that show the separate features on their own? Or maybe this will be part of the tutorials ;)

Thanks :)

Yes, for most of features I will make tutorials on site, and for more complex things I will make example projects on GitHub.
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: Spooker - Open Source Game Framework
« Reply #26 on: March 31, 2014, 06:13:19 pm »
Light engine

So I was tinkering with many methods of light engines, and becouse I do not know shaders at all, I decided to implement method using RenderTexture, additive and multiply blending. It is looking pretty solid and it also have good enought performance even with many light sources.

Example how to use light system:
Code: [Select]
lights = new LightEngine (GraphicsDevice, "lightmask.png");
mouseLight = new Light (Vector2.Zero, 1f);
mouseLight.Color = Color.Red;
lights.Lights.Add (mouseLight);

var light = new Light (new Vector2 (100, 100), 0.5f);
lights.Lights.Add (light);

light = new Light (new Vector2 (300, 300), 2f);
lights.Lights.Add (light);

Image:


And, I again made new site design (with this one I finally satisfied my web developer appetites ;) ) http://spooker-dev.github.io

I also made new input system using actions. Example of using actions:
Code: [Select]
var cameraDownA = new InputAction ("CameraDown", GameInput);
cameraDownA.Type = ActionType.Pressed;
cameraDownA.SetKey (Keyboard.Key.S);
cameraDownA.OnTrigger += () => {
mapCamera.Position.Y += 20;
mapCamera.Apply ();
};

var cameraUpA = new InputAction ("CameraUp", GameInput);
cameraUpA.Type = ActionType.Released;
cameraUpA.SetKey (Keyboard.Key.W);
cameraUpA.OnTrigger += () => {
Console.WriteLine("Pressed W button");
mapCamera.Position.Y -= 20;
mapCamera.Apply ();
};

var cameraLeftA = new InputAction ("CameraLeft", GameInput);
cameraLeftA.Type = ActionType.Pressed;
cameraLeftA.SetKey (Keyboard.Key.A);
cameraLeftA.OnTrigger += () => {
mapCamera.Position.X -= 20;
mapCamera.Apply ();
};

var cameraRightA = new InputAction ("CameraRight", GameInput);
cameraRightA.Type = ActionType.Pressed;
cameraRightA.SetKey (Keyboard.Key.D);
cameraRightA.OnTrigger += () => {
mapCamera.Position.X += 20;
mapCamera.Apply ();
};
« Last Edit: March 31, 2014, 06:21:22 pm by Deathbeam »
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Spooker - Open Source Game Framework
« Reply #27 on: March 31, 2014, 09:57:22 pm »
Wouldn't it be a better idea using a simple fragment shader to render the lights into a texture? This way you avoid loading a image asset for such a simply task, also you have the ability to define how the light should look with some parameters. But if you still going with the lightmask in a image asset, well .. what if I use a zip archive for all my assets and I need to load it in by memory?

Btw. good choice changing the name. And even better that you have choosen a cool name :D

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: Spooker - Open Source Game Framework
« Reply #28 on: March 31, 2014, 10:22:34 pm »
Wouldn't it be a better idea using a simple fragment shader to render the lights into a texture? This way you avoid loading a image asset for such a simply task, also you have the ability to define how the light should look with some parameters. But if you still going with the lightmask in a image asset, well .. what if I use a zip archive for all my assets and I need to load it in by memory?

Btw. good choice changing the name. And even better that you have choosen a cool name :D

So I was tinkering with many methods of light engines, and becouse I do not know shaders at all, I decided to implement method using RenderTexture, additive and multiply blending. It is looking pretty solid and it also have good enought performance even with many light sources.

xD I do not really know anything about shaders, never worked with them before. And hmm yes I should add constructor to load it from stream. And I am glad that you like name, I actually spent some hours using Google Translate and translating random words from random languages to english to find good name :D
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Spooker - Open Source Game Framework
« Reply #29 on: March 31, 2014, 10:32:13 pm »
Oh my bad. Didn't really read what you wrote. Just looked at your code  :-[
But I think you should really dig into shaders and you will find out that you can make alot of cool things for your game engine! And dont worry - shaders is actually pretty easy when you first know the basics of them, especially when it's only 2D  :)