🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Latest SFML Activity
@JoeJ Thank you for taking the time to help me with this.
I actually fixed the problem. As it turned out it was an off by one problem with my loop. A triangle fan needs to be 2 elements larger than the number of vertex points in my vector, 1 for the central position and 1 to close the gap between th…
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…
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…
@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…
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();
}
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 …
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…
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.
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…
Learning to program takes around a decade or so, so it's understandable why you make games as well :D
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 …
@undefined thanks
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-min…
@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…
@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…