Advertisement

Latest SFML Activity

nortski said:
all the vertex points sorted by angle

Watching the video, i guess it breaks if your at an edge, so a vertex from that edge and its projection outwards have the same angle.
Eventually this flips winding order and a triangle gets culled, or something like that.

320 views
Advertisement

yusuf0 said:
HI. I m trying to learn creating tilemap with vertex array. I found a code from a tutorial but i didnt understand completely this code:

What do you not understand about it? And why do you want to do your own tile maps, although SFML already has that implemented? (I assume you use SFML, b…

3,281 views

Never used box2d, but as nobody else seems to have time, let's try.

I copy/pasted the code above and reformatted it to something readable. Compiling it fails with:

$ g++ something.cpp
something.cpp: In function ‘void AddBox(b2World&, int, int)’:
something.cpp:132:20: error: invalid conversion fro…
4,310 views

@undefined I appreciate the detailed response. Unfortunately there is no documentation or user examples I can find regarding using SFML's mipmaps. I tried generating a mipmap for each tile atlas texture, wondering if it would benefit the view.zoom() calls. But no, same issue as before. I'll just ha…

15,078 views
Euthyphro
March 18, 2022 01:34 PM

I see you tried to fix it here:

void move(sf::Vector2f &dir,sf::Vector2f &last_direction){
    update_pos();
    makethatshitnotkillitself(dir,last_direction);
    snek_head.move(dir.x,dir.y);
    wrap();
    self_collision();
    }
  • selfcollision returns 0 or 1, so calling this method does no…
  • 3,954 views
    rileyman
    April 30, 2021 10:49 PM
    The Colon Case - Wrapping Text in SFML

    In my previous post, I presented a simple FontFamily class.  This was just the first step in being able to render large blocks of text for my upcoming detective game, The Colon Case.

    When SFML renders text on the screen, it will only wrap that text to a new line if the string actually contains …

    5,756 views
    rileyman
    April 28, 2021 12:40 AM
    The Colon Case - Font Families in SFML

    Slow but steady, progress is being made on my upcoming detective game, The Colon Case.  With basic character movement well behind me, the next main feature to tackle will involve examining items on the map.  Following that will be dialog with NPCs.  Both of these features will requir…

    5,062 views

    yusufabi said:
    its not erasing last element of vector. i would like to erase enemies from my class this is my problem

    Please explain in words how this erase code works.

    13,064 views
    rileyman
    April 16, 2021 07:21 PM
    The Colon Case - Now Building with CMake

    It's been a few months since I last posted about my next game, The Colon Case.  I've actually been reasonably (sporadically?) active on the project, but took a little detour over the past month to learn how to build C++ projects using CMake.

    I'm happy to say that the source code for The Colon C…

    6,863 views

    Learning to program takes around a decade or so, so it's understandable why you make games as well :D

    5,568 views

    SuperVGA said:

    Vectors might be a more better, more forgiving fit if you want to add and remove enemies dynamically:

    Unfortunately I haven't been able to find a tutorial as nice as the one provided by @kylotan .
    Not on the go-to Cpp sites isocpp.org, cplusplus.com and en.cppreference.com, anyways.

    The …

    3,905 views
    8Observer8
    June 16, 2020 08:56 AM
    SFML C++. Bouncing ball with showing coordinates

    l use MinGW and lightweight editor VSCode: https://code.visualstudio.com/docs/languages/cpp

    Type the command: mingw32-make

    Makefile

    # -mwindows - without a console window
    
    CC = g++
    
    INC = -I"E:\Libs\SFML-2.5.1-windows-gcc-7.3.0-mingw-32-bit\include"
    
    LIB = -L"E:\Libs\SFML-2.5.1-windows-gcc-7.3.0-ming…
    7,065 views

    @internia Hey there,

    We actually have a channel regarding programming help full of friendly programmers over on our Discord server, feel free to come along and pop a question in!

    I'm sure some guys would be more than happy to answer your questions!

    Feel free to pop in and ask any questions, no pressur…

    5,393 views

    @lawnjelly Hello and thanks for your answer. I dont fully understand.

    In SFML i have a circle object that is my brush. Its color and alpha is all zero.

    Then i have a shader ON this brush object.

    The shader has a color glFragColor.rgb and the alpha is glFragColor.a = GradientAlpha

    Then on every mous…

    13,919 views
    Advertisement
    Advertisement