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 - Canadadry

Pages: [1]
1
SFML projects / Lua Binding
« on: December 14, 2013, 12:18:50 pm »
Hi,

During a long time I was looking for a simple and fast GameEngine but I could find something as simple and light weight as SFML. So I found myself writing one, but more the time pass, less I wanted to lost time with C++. I wanted to be able to fast prototyping like it can be done with GameMaker for example.  And here I am porting SFML to Lua.

I wanted it to be simple (mirroiring SFML API) light weight (no Boost at all). It's not finished yet (no network for example). I've added some extra classes like TileMap or SceneGraph Item.

I've not reach yet my objective to fast prototyping but it's been pretty fun. I hope you will enjoy it.

The source code is avaible https://github.com/Canadadry/luaSFML
On the repo you will find some test project I've made in the demo folder. There is a Tetris, a pong, and a Minesweeper.

Here an example of script :

math.randomseed(os.time())

window = sfRenderWindow.new(sfVideoMode.new(640,480,32),"Test",sfWindowStyle.Default);
window:setFramerateLimit(30)


circle = sfeSGItem.new();
circle:move(50,50);
circle:setWidth(100);
circle:setHeight(100);

child1 = sfeSGItem.new(circle);
child1:setWidth(50);
child1:setHeight(50);


clearColor = sfColor.new(math.random(256)-1,math.random(256)-1,math.random(256)-1);

event = sfEvent.new();
while window:isOpen() do
    i = 0;
    while window:pollEvent(event) do
        if(event:type() == sfEventType.Closed) then window:close(); end
        if(event:type() == sfEventType.KeyReleased and event:key():code() == sfKey.Escape ) then window:close(); end
        if(event:type() == sfEventType.KeyReleased and event:key():code() == sfKey.Q and event:key():system() == true ) then window:close(); end
    end

        circle:rotate(1);
        child1:rotate(-2);

    window:clear(clearColor);
        window:draw(circle);
    window:display();
end
 


Thanks for reading me :)
 

2
General discussions / SFML 2 and Qt5 on Windows
« on: December 30, 2012, 12:38:45 pm »
Hi,

I was playing a little with Qt5 since the release ( 2 weeks ago ). And when I start playing with OpenGL in Qt5 I found something quite disturbing. It was impossible to use OpenGL without using QOpengl classes.

After some research I found that : How Qt5 handle OpenGL.

To summary, They don't want to fight with windows's implementation of OpenGL, drivers, version  and stuff (since they want at least OpenGL 2 or OpenGL ES 2).  They wanted to avoid those issues and look WebGL and how Browser implemented it without requiring decent drivers. Here what they found : The ANGLE project. This is an OpenGL ES 2 implementation on top of DirectX 9.0c.

So my question is : what can we do to make smlf 2 work with Qt 5 on windows?

I came with 2 answers :
  • Port SMFL 2 to ANGLE, this just required to port SFML 2 to OpenGL 2, ES 2.
  • We can let people rebuild Qt5 to use standard Opengl.


What do you think about that ? Did you have other ideas?

3
SFML wiki / A Gradient Class
« on: November 01, 2010, 07:06:33 pm »
Hello,

    I have created a class for create and draw gradient. You can find source code and example here.

Here some example of what it can do :


Pages: [1]
anything