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

Pages: [1] 2
1
SFML projects / Re: Let There Be Light 2
« on: March 16, 2017, 10:48:18 am »
Nice ! I'm glad it helped you !

Do the modifications you made are open source somewhere ?

2
SFML projects / Re: Tehos : Rebirth - My Ludum Dare 37 entry
« on: December 16, 2016, 05:11:16 pm »
Thanks for testing !
I planned to add tutorials and tips in the game to explain more, but I haven't the time...
I made an engine which is full cross platform and I setup my tools to make it quite easy to cross compile. The only Real difference is on the loading part of the game.

I tried your game too and rated it on the LudumDare page :)

3
SFML projects / Tehos : Rebirth - My Ludum Dare 37 entry
« on: December 15, 2016, 01:38:10 pm »
Hi everyone !

During the last Ludum Dare, I made this game with my artist friend.

The game is available on both Windows & Android :
- Windows : https://github.com/Cmdu76/Tehos-Rebirth/releases/download/Windows/TehosRebirth.zip
- Android : https://play.google.com/store/apps/details?id=com.atmog.tehosr

It would be nice if you want to test it :)

You can also rate it on the LudumDare page here : http://ludumdare.com/compo/ludum-dare-37/?action=preview&uid=46404

Here is the link if you want to see the source : https://github.com/Cmdu76/Tehos-Rebirth/archive/Windows.zip

Tell me what you think of it :)

4
SFML projects / Re: Let There Be Light 2
« on: October 02, 2016, 03:28:48 pm »
@R23MJ

I hadn't the time to really look at it...
But you can try something like that :
sf::RectangleShape shape;
shape.setSize({ 200.f, 50.f });
shape.setPosition({ 500.f, 300.f });
shape.setFillColor(lightSystem.getAmbientColor());
lightSystem.createLightShape(shape);
And then draw your shape

@Ezhoikam

Isometric usually divide y-axis length by 2, but I suggest you to try. The effect might be good depending on the render you want.

5
SFML projects / Re: Let There Be Light 2
« on: September 29, 2016, 12:03:49 pm »
lolz123 added this functionnality but as the project wasn't documented most people doesn't noticed it.

You can use :
shape->setRenderLightOver(true); // If you use my version
shape->_renderLightOverShape = true; // If you use lolz123 version's

Edit : I tested it, and the result wasn't what I expected, I'll take look...

6
SFML projects / Re: Let There Be Light 2
« on: September 29, 2016, 12:19:41 am »
Today, I added my version of LTBL2 in my engine.

The previous version of a demo game using the main version of LTBL2 was running at 45 FPS,
The new version of this demo game using my version of LTBL2 is running at 55 FPS.

That is a small improvement but still good anyway. (+22%)


There is still something uncool with it, I was working on normals, but I'm not a graphical expert. I haven't succeed in adding that functionnality.
I added some code an interface to provide it but there is still a problem somewhere that don't render the normals...
It would be so great if anyone can help there :D


7
SFML projects / Re : Let There Be Light 2
« on: September 21, 2016, 08:32:40 am »
I worked using VS2015 and I haven't tested it elsewhere yet.

Okay that is not really header-only, I read that having .cpp is better for compilation time.

I hope people will test it and give me some feedback.

I'm also working on the normals, I'm getting inspired by the implementation of Breush, here : https://github.com/JumpingToasts/LTBL2

The normals aren't in the two files, yet. I'm waiting a good implementation for normals


8
SFML projects / Re : Let There Be Light 2
« on: September 18, 2016, 11:51:52 pm »
Hi !

While working on my engine I wanted to improve as much as possible LTBL2.
I forked the main repository and reviewed ALL the code.

Changes (compared to the actual version) :
  • Light management : use create...() to create your light and add it to the system (no shared pointers used)
  • No more public variables access
  • Quadtree : rebuilt entirely
  • LightSystem : simplified render call and minor performance improvements
  • LightShape & LightPointEmission are updated with the quadtree
  • LightDirectionEmission has been simplified
  • Some performance improvements, based on Sayuri suggestion here : http://fr.sfml-dev.org/forums/index.php?topic=16895.msg138669#msg138669
  • Add resources direclty in C++ (PenumbraTexture, UnshadowShader & LightOverShapeShader)
  • Documentation : https://cmdu76.github.com/LTBL2
  • Two-files version, just add LetThereBeLight.cpp and LetThereBeLight.hpp

Here is the repository :
https://github.com/Cmdu76/LTBL2

Feel free to suggest or pull request

(The next feature I might add is normals)

If lolz123 can see this, can you tell me if I need to make a pull request ? As it changes almost all files, I wasn't sure you'll accept it..

9
SFML projects / Re: Let's make 16 classic game in C++ video series
« on: September 18, 2016, 11:29:36 pm »
The Outrun game is incredible !

The only problem is that it's not explained, but I understand that this is not the purpose of this video

10
General / Re: Load From Memory
« on: August 22, 2016, 09:37:43 am »
Someone on IRC finally helped me !

(Sorry I don't remember who exactly, there were a lot of people trying to help)

I used this :

#include <fstream>
#include <assert.h>
 
int main(int argc, char* argv[]) {
    assert(argc == 2);
    char* fn = argv[1];
    std::ifstream f(fn,std::ios::binary);
    FILE* out = fopen("out.cpp", "w");
    fprintf(out,"char a[] = {\n");
    unsigned long n = 0;
    while (!f.eof())
    {
        char c;
        f.read(&c, 1);
        unsigned char uc = c;
        fprintf(out,"0x%.2X,", (int)uc);
        ++n;
        if (n % 10 == 0) fprintf(out,"\n");
    }
    f.close();
    fprintf(out,"};\n");
    fclose(out);
}

and in my code :

texture.loadFromMemory(&a, sizeof(a));




11
General / Re: Load From Memory
« on: August 22, 2016, 08:58:43 am »
Thanks !

And how do I convert my image .png into the vector ?

12
General / Load From Memory
« on: August 22, 2016, 08:10:29 am »
Hi !

Can someone explain to me how to load a texture from memory ?

std::string data = ...;
sf::Texture texture;
texture.loadFromMemory(data.data(), data.size());
 

What to I need to put in data ?

13
Window / Android and Keys
« on: February 28, 2016, 11:55:47 pm »
Hi !

In Android, I find (by myself) that the right button (return/escape) is mapped with sf::Keyboard::Escape.

But I can't find anywhere on the website documentation or tutorials.

So maybe SFML team should add it (if it isn't already the case)

And also I want to know, if others smartphones keys are accessible with sf::Keyboard ?

I tried sf::Keyboard::Menu but not worked...

Thanks in advance for any help

14
Feature requests / Re: push Events...
« on: February 25, 2016, 05:30:02 pm »
If you can use lambda, you can use this solution :

std::function<void()> myCallback;

int main (int argc, char **argv) {

    Big_Drawable BD_1;
    ...
    Big_Drawable BD_n;
       
        myCallback = [&](){
                // Here your clicked function
        }

    while (window.isOpen()) {
               
                while (listenToNetwork()) {
                        if (packetType == ...) {
                                myCallback();
                        }
                }

        while (window.pollEvent (event) {
            switch (event) {
                case Event::MouseButtonPressed:
                                        myCallback();
                                       
                                // ...
            }
        }
    }
}

15
General discussions / Re: Android Environment
« on: February 23, 2016, 11:34:35 am »
Thank you for this quick answer.

I just googled it and it seems to be like what I want :)

Anyway, if some people can post their way to do it, it would be great to have few options to choose in.

Pages: [1] 2
anything