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

Pages: [1] 2
General discussions / Strong Types
« on: September 01, 2019, 07:09:59 pm »
Hey guys,
I recently stumbled upon Jonathan Boccara's blog and especially Strong Types peaked my interest. To quote Jonathan's readme on github:

A strong type is a type used in place of another type to carry specific meaning through its name.
Strong types are about better expressing your intentions, both to the compiler and to other human developers.

Have you heared about Strong Types before? Do you use something similar in your own projects and if so, how? Do you think SFML could benefit from them?
I think they are really interesting and can make code more expressive. What do you think?

SFML game jam / Revival attempt
« on: February 24, 2019, 03:04:23 pm »
Welcome back!

Time has passed but game jams did not really get much attention, so let me throw in a new idea, maybe you like it.

Instead of a traditional game jam with a topic and some time to be creative with a new game, what do you think about the following:
There will be a specific "reference game", either a classic (like Pong/Snake/Tetris/etc... ) or something the community created (may it be for this purpose or because it already fits the needs). The goal would be trying to recreate the reference game as close as possible. (Clone Wars, Total Ripoff, you name it  ::) )

For this to work and to be interesting I suggest that all the needed assets (spritesheets, sounds, music, fonts) as well as some form of executable (or at least a detailed description or enough video footage/screenshots) should be provided, so that there is nothing unclear what has to be done, because I don't think anyone here wants to spend any time on gathering the assets instead of implementing the actual game.

I find myself very uncreative when it comes to having ideas to some specific topic and spend most of the time searching for ideas, which I would rather spend implementing. The creativity part then comes in how I implement the game.

The main rating would then be: How good does this compare to the reference game? (to a certain degree, for example only level ABC of game XYZ, everything else would not influence the rating)

Depending on the game there could be additional / other criteria as well, like how extensive is the clone? how smooth does it run? is it easily expandable? did you also manage to recreate the difficult part in level ABC? Not the best ideas I know, but you get the point...

It would be nice if you could then test the clones without knowing who made them and give it a score how good you think it compares to the original.

Some of you might think this is boring / a waste of time / not a challenge / ruins the fun of creating your own games / etc... and I can totally understand that, but maybe I am not the only one who finds this interesting and has some ideas?

This is just one of many variants. Another would be to also provide some assets and maybe an incomplete description as a starting point and then you go from there. This makes it more creative / open again, depending on the scenario.

I see this more as a mix between a jam (or simply a challenge) and learning new things, because for certain parts of a game you might have to learn completely new stuff, which is part of the joy in my opinion.
This might also be a useful resource to put on the wiki, so people can see how the same thing was made using (maybe completely) different methods by different people and learn from them.

What do you think about all that?
Thanks for stopping by!

General / Curious about a bugfix
« on: October 08, 2014, 01:54:46 pm »
Today I went through some old projects and I noticed a bug I had back in SFML 1.6 / 2.0. It is a pretty strange one and it seems that only my PC had/has it. However now (with 2.1 projects) it is gone, thats why I forgot about it, but I am curious what the cause was:

When having almost no programs open and then starting an old project, it had 30 frames, although I used setFrametimeLimit(60), however as soon as I started google chrome it went up to 60. Also it went back to 30 again when closing google chrome.

Back then it was pretty annoying and I couldn't explain it, neither can I now (it still happens with the old projects), so maybe you know what the cause was and what changed with SFML 2.1 that could have fixed that.
Thanks :)

Graphics / Heat haze
« on: July 21, 2014, 01:18:55 pm »
Hey community,

For those of you who don't know the effect, here's a small video showing it.
I always love to see this effect in real life, especially when driving the car or watching a fire  :D
So I thought this would also look great in any game which has fires or other hot stuff.

However my research ended unsuccessfully after reading tons of old forum posts about this topic...
The only thing I found (for 2d) was this devlog, but I don't quite understand the theory explained there.
What I also found was this pdf, but again I couldn't pick the necessary bits out of that to implement it.

I would really like to use this effect as a glsl shader, so if anyone could give me a better starting point, I would appreciate that :)
Also I know this forum might not be the perfect one for this question, so I don't really expect to get an answer, but who knows, maybe someone implemented something similar already.

Thanks and greetings, Geheim!

SFML website / Spoiler tag
« on: May 15, 2014, 11:56:58 am »
As requested a lot here in the forums, but always mentioned indirectly in posts (like 1, 2, 3, 4, ...) and because I think it is an important feature for the website, it is time to make a thread for it  :D

I think the idea should be clear to most of you, but here is why it is important imo:
  • A large amount of code could easily be hidden under the spoiler, so a reader doesn't have to scroll down the hole code and can have a look at the files individially (if the writer made them seperate, ofc :D)
  • In a project post, you could hide pictures and/or videos (and for mobile users I think they only load if you open the spoiler, but I am not sure)

The syntax may look like this:

Which may create this spoiler:

I hope it is possible to add this tag, if the creator(s) of this website find the time to do it, because it could really help improving the readability of many posts.
Thanks and greetings, Geheim!

*The pictures are from this website.

SFML projects / Council of Torment
« on: February 10, 2014, 09:29:48 pm »
Hey guys, we want to present you our game "Council of Torment".

What is Council of Torment?
Council of Torment is a story-driven role-playing game developed by two passionate independent developers. You play as a mysterious wizard's apprentice during a continental civil war for freedom. Craft, explore, fight, there are no limits in Council of Torment. We try to find a balance between gameplay mechanics, intense storyline, special effects and warm artwork.

Current Progress:
Some things which are fully working:
  • Game menu
  • Settings/controls
  • Tmx-parser
  • Scripts and map triggers
  • Equipment system
  • GUI system
  • Map system
  • Sound/music system
  • Ingame console with lots of commands
  • Tile-based movement with following camera
  • Camera scrolling

Some things currently worked on:
  • Light system
  • Inventory
  • NPC-system
  • Combat-system
  • Multiplayer
  • Effect system
  • More content
  • Story

About us:
Our "team" consists of 3 guys, one for the music/sounds and the other two for the rest ;)
Check out our musician he has some awesome stuff: https://soundcloud.com/matthewjvince
Everything you see/read/hear was made by us, except the parser.
We use C++ and SFML 2.1, as well as Tiled for the maps.

Social Networks:
Blog: http://thecounciloftorment.wordpress.com/
Twitter: https://twitter.com/The_Octav
Facebook: https://www.facebook.com/pages/Council-of-Torment/474678962601812
Youtube: https://www.youtube.com/channel/UCsXg-zXVuE1-SMOlNKY8JMQ

Game menu:

Option menu:

Part of a map with inventory open:

Ingame console:

A bit lighting:

Lights, shapes and soft shadows:

We hope you like what you see/read/hear.
If you have any questions or feedback please let us know.
Greetings, Geheim ;)

Graphics / [SOLVED] texture from an image -> white sprite
« on: September 14, 2013, 10:36:10 pm »
Hey guys,
I try to load a texture from an image, set it to a sprite and draw it on the screen.
The image gets created and the colors are set "by hand", however the sprite always is white, no matter which color I set.

blockImage.create(BLOCK_SIZE, BLOCK_SIZE);
for(size_t x = 0; x != BLOCK_SIZE; ++x)
        for(size_t y = 0; y != BLOCK_SIZE; ++y)
                blockImage.setPixel(x, y, sf::Color::Blue);

blockImage, blockTexture and block (the sprite) are members of a class and this class is stored in a std::vector in another one (maybe it has something to do with it)

I tried to print out blockImage.getPixel(0, 0).b after I set it to blue, but I get no number, so I think I make something wrong with the image, but what is it?
Thanks and Greetings ;)

General / sf::Shader::currentTexture
« on: August 14, 2013, 03:36:19 pm »
Hey guys,
I have a renderTexture and my renderWindow.
Now I want to render something on the texture with a shader.
In this shader I call: vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);

I don't get the pixel from the renderTexture, but from the renderWindow...

How can I change that, so I get the pixel from the renderTexture?

Graphics / Shader flickering
« on: July 26, 2013, 09:13:49 pm »
Hello guys,
I wanted to start making some light effects with a fragment shader, but I get some strange behaviour.

Thats the issue:

I made a simple class which draws the light on a renderTexture to have multiple lights, however the mixing seems not like it should be for me and I get the strange flickering. I have a vector of the lights and if I make green after blue and red, the flickering is gone, which is quite strange to me.

I can't find the mistake though.
Thats how I draw the lights on the texture:
void Game::render()
        // Clears the texture

        // Draws all lights on the texture
        for(auto&& light : lightList)

        // Draws the texture

And pointLight.cpp:
void PointLight::render(sf::RenderTexture& texture)
        // Sets the parameters
        shader.setParameter("radius", light.getRadius());
        shader.setParameter("color", light.getFillColor());
        shader.setParameter("texture", sf::Shader::CurrentTexture);
        shader.setParameter("center", sf::Vector2f(light.getPosition().x + light.getRadius(), light.getPosition().y + light.getRadius()));

        // Draws the light on the texture
        texture.draw(sf::Sprite(texture.getTexture()), &shader);

And of course the shader:
uniform vec4 color;
uniform vec2 center;
uniform float radius;
uniform sampler2D texture;

void main()
        // Takes the pixel and calculates the difference to the center of the light
        vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
        float difference = distance(vec2(gl_FragCoord), center) / radius;
        // Calculates the alpha value and sets the light color
        float alpha = 1.0 - difference;
        vec4 light = vec4(color.x, color.y, color.z, alpha);
        // The actual color is the addition of the pixel color and the light color
        vec4 col = pixel + light;
        gl_FragColor = vec4(col.xyz, alpha);

Hopefully somebody knows what I am making wrong.
Thx and Greetings!

General / Configuring errors with cmake
« on: July 01, 2013, 10:52:27 am »
Hello guys,
I have some really big and strange problems with Visual Studio, maybe you saw the post with the linker.exe error (http://en.sfml-dev.org/forums/index.php?topic=11888.0)

Anyways I thought, maybe this is a problem with my current SFML build in some sort of strange error, I don't know. And for some days a newer version of SFML released, so I thought, why not build this version and everythign should work then. However I can't even configure it with cmake: I tried to re install cmake, but still same errors and I did the same thing like always (and like in the tutorial).
These are the errors:

The C compiler identification is unknown
The CXX compiler identification is unknown
Looking for sys/types.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)

CMake Error: Internal CMake error, TryCompile configure of cmake failed
Looking for sys/types.h - not found
Looking for stdint.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)

CMake Error: Internal CMake error, TryCompile configure of cmake failed
Looking for stdint.h - not found
Looking for stddef.h
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)

CMake Error: Internal CMake error, TryCompile configure of cmake failed
Looking for stddef.h - not found
Check size of void*
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)

CMake Error: Internal CMake error, TryCompile configure of cmake failed
Check size of void* - failed
CMake Error at cmake/Config.cmake:13 (message):
  Unsupported architecture
Call Stack (most recent call first):
  CMakeLists.txt:20 (include)

Configuring incomplete, errors occurred!

Hopefully somebody knows what is going on with my Compiler, I really want to use VS 2012...
Greetings Geheim!

General / Compiler Error MSB6006
« on: June 17, 2013, 04:25:54 pm »
Hey guys,
I have a compiler error since some days, but I have the feeling that it now occurs more often and it is really annoying...

Thats the error
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(611,5): error MSB6006: "link.exe" wurde mit dem Code -1073741819 beendet.

I have to compile the project 5 times sometimes, to compile it successfully, which is really annoying.
I use VS 2012 Ultimate, if this is important. I searched a bit and some others have similar problems and they just re-installed the compiler, is this what I have to do too?

Greetings Geheim!

Network / Handle problems
« on: April 27, 2013, 11:54:24 pm »
Hey guys, a friend of mine wants to know something, but I am not able to help him, and for some reason he cannot register in this forum right now, so he asked me to ask for him:

" Hello Community,
I am trying to programme a gameserver for a jump n' run. The problem is, that I really don't know how to handle the data transfer.
I am using TCP/IP and my server works so far in the following way:
-Listens to a given port(in my case: 12345)
-Accepts the incoming connection
-Creates a thread for each client(where the data is going to be received)

Where and when should I send the data(e.g. player's position) to every client?
 -Where: in the client thread or another seperate thread(e.g. a worker thread for each client?)?
 -When: directly after the server has received it or after some time(because of the FPS rate?)?

Hopefully all of you guys could understand me!

greets ..."

General / save/load a huge tilemap
« on: March 26, 2013, 01:13:38 pm »
Hey guys,
I want to save and load a pretty huge tilemap (5000 x 3000 tiles). I only have one idea and I don't know if it is a good one, so I ask here ;)
Of course I can't save/load everything at once, because it is too much (15000000 integers).
So I thought I have to split the hole map into chunks und save/load them if I enter/leave them.
So that I have several files, one for each chunk. Is this a good solution or does there exist better ones?
If I would do so, I would load the chunk where I am at and lets say the 9 chunks surrounded by it at the beginning of the game.
In-game if I leave one chunk I save it and load the chunk I entered, in threads.
And if I generate the map for the first time I should save the hole map once, or?
Greetings, Geheim!

Network / [SOLVED] What do I need to send?
« on: March 08, 2013, 10:41:39 pm »
Good evening,
Today I wrote a simple pong via server and client. Everything works just fine, but with the code so far, it causes a lot of lag... I am pretty sure, that I send too much or too often... I use TcpSockets and thats what I have so far:
The server updates the ball and sends the position to the two clients, each client updates his pad individually and sends the position to the server, which sends it on to the other client.

Somewhere I read, to limit the packets to 30, is this the solution and if it is, what is the best way to do this?
Should I use Udp instead of Tcp (I hope and don't think so)?
But my main question is: What do I need to send?
Is it right to send the position from the ball and the two pads each frame? Should I also update the ball on the clients and only check the position with the server sometimes?

I hope you know what I mean  ::)
Greetings, Geheim!

General / [Solved] Tilemap improvements
« on: October 03, 2012, 07:24:11 pm »
Good evening guys,
I have an isometric tilemap (100x100 tiles) and I already split the map into 16 super-chunks, which have 25 chunks, which again have 25 tiles. The problem is, that the frametime is not as high as I expected it to be.

So my questions are:
Is there any way to improve the frametime? Is the way I handle the map a good one?
I think I read something about rendering directly with OpenGl, but I forgot where... Is this a solution?
Should I handle the map different? If yes, how?
Or is this already the most efficient way and it can't get optimized?

Greetings, Geheim!

Pages: [1] 2