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

Pages: [1] 2 3 ... 14
1
Graphics / Re: get click on an isometric tile
« on: November 02, 2019, 11:25:45 am »
This article should give you some insight: http://clintbellanger.net/articles/isometric_math/

You don't need to loop over your tiles in this case, if you store them correctly.

2
General / Re: adding sf::Vector2f ?
« on: September 15, 2019, 11:41:07 am »
In addition you can always add your own overloads if SFML does not provide them.

3
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:

Quote
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?

4
One way to do this is to simply toggle a boolean flag when you press/release your pause key and only update your game logic if the flag is set.

5
Graphics / Re: Merging two textures/images
« on: August 08, 2019, 09:44:28 pm »
Have you seen sf::RenderTexture yet? You can just draw your individual parts on one of them and use the combined texture for your sprite.
Another way would be to just draw them separately. If the parts overlap you might want to use an apropriate BlendMode.

6
Graphics / Re: Drawing one time is slower than 100 times.
« on: August 06, 2019, 05:44:19 pm »
That is because you are most likely running in Debug mode, try it with Release and it will be faster.

7
General / Re: Question about Rect
« on: July 30, 2019, 03:43:22 pm »
Lets say your body height is 1.8m. If you now jump, your height doesn't change, right? However your top position does and if you add your height to it, you get to the bottom. It's the same thing with rects.

Collision works exactly like you said and is already implemented as you can see in the tutorials. Is there anything specific that you do not quite understand?

8
SFML game jam / Re: Revival attempt
« on: February 25, 2019, 12:51:53 am »
Using artwork of an existing game, is infringing on their copyright. It's usually not something I look after in some hobby games, but I wouldn't want to support this behavior. So for providing assets for a clone, one would have to get unrelated assets.
Of course, that is a very valid point, thanks for mentioning!

Ideally it's a reasonably specific term that allows results to be comparable (like "electricity"), but still not restricting the freedom of each entry.
I am also more with you on that one. To clone something 1 to 1 is way too limiting and not very meaningful.

It was never my intention to supress anyone's creativity with this idea, but reading the post again it pretty much sounds like that ::) Sure you are limited to some extend, but I am certain we can find a good balance that most of us will accept.

However for the purpose of a jam I think it is better to limit the topic/theme with some additional input to make the entries comparable instead of limiting the time. "puzzle" as the topic, like Nexus said, is like saying "just make a game". And even "electricity" is too broad in my opinion. There should be something more to give the jam some common ground, like one or more assets that somehow need to be included or a small description how the topic should influence the game. But like both of you said nothing too strict...

...which brings me to the time
I usually find it hard to find 2 full days of time, but distributed over a week (this was also discussed a while ago) it would be really cool to see a game jam revived!
Exactly this. We will never find 2 days where everyone who wants to participate can, so having a softer time limit, like 1-2 weeks seems like the way to go for me. I don't think that having less time is beneficial, but that's just naive me being unexperienced. I just like the idea having a more specific direction than limiting the time too much. And this probably also gives us more participants, which gives more entries, which is what I want to achieve with those ideas.

With that in mind, it would be very nice if we could do this regularly. Once per year is way too infrequently for my liking (at least better than nothing). There is also probably more work that has to be done organizing all that, than I am giving it credit for, so I can totally understand if that is a problem. Maybe the demand is not that great too...

PS: I've acquired access to the domain and Twitter handle, if we ever want to start something.
That's awesome! I hope jams get another chance soon ;)

9
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!

10
Graphics / Re: Vector in SFML
« on: January 01, 2019, 11:03:51 am »
Without knowing anything about how your set and get functions work, look again at your if statement where the Body is at least 2 in size. What happens to Body[0] ?

They just dont save the given positions...
Do they save nothing at all? Then it most likely has to do with your set and get functions.

Also, does the snake really move the way you think? Maybe think again, in slow motion ;)

11
Hey,
I just took a quick look over your project...
You are using quite a lot of raw pointers, which most of them are never deleted (= memory leak).

One example would be your
sf::Font *FontArray;
this->FontArray = new sf::Font[Fonts::MAXSIZE];
// never deleted...

Many of them are not required in your project and if you really need pointers, use smart pointers.
Nowadays (since C++14) you don't even have to use the new keyword yourself.

There is also some inconsistency in your coding style, as if multiple people work on it, like:
float yScale                         // camelCase
sf::RectangleShape *Left_side        // Snake_case
sf::String OrgString                 // PascalCase
Or
#include "Textf.h"      // in Textf.cpp
#include <Textf.h>      // in main.cpp

I know that looks like not a big deal, but for some people it is, just don't make it a bad habbit  ::)

Anyways, keep it up!

12
General / Re: Optimize this City Map application?
« on: May 18, 2018, 01:40:24 pm »
I would also pre render your city, as it does not seem to change?

13
General / Re: Please help
« on: May 13, 2018, 05:53:45 pm »
You also have to link to some additional dependencies, which you can find in the tutorials or in the FAQ.

Also since SFML 2.5 you don't need jpeg anymore (maybe that should be updated in the FAQ as well?)

14
Graphics / Re: Need help with move function
« on: May 03, 2018, 08:21:16 pm »
Question, what do you mean exactly by testing left & right then testing up & down?
I mean something like this:
  • entity.move(xMovement, 0);
  • checkCollision(entity, collider);
  • // here you can check from which side entity collided (e.g. based on which key is pressed)
  • entity.move(0, yMovement);
  • checkCollision(entity, collider);
  • // here you can check again

And as for pixel perfect collision, would it be better if i nested it into another if statement so it didnt execute constantly?
If-statements in C++ follow the lazy evaluation strategy, so you can safely use && here.

Also depending on the implementation of PixelPerfect, it might already check for bounding box collision?

15
Graphics / Re: Need help with move function
« on: May 03, 2018, 08:02:49 am »
One way is to seperate your movement:
You first move only left and right, check for collision, then you only move up and down and check for collision again.
This way you can easily detect from which side you collided. Keep in mind that you will now spend double the processing power for your collision which in your case is quite expensive (PixelPerfect).

You might consider first testing for normal BoundingBox collision and only go PixelPerfect if needed.

Pages: [1] 2 3 ... 14
anything