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

Pages: [1]
1
General / Gamestates - in which order?
« on: February 18, 2018, 04:39:25 pm »
Hello!

Ive got 4 states of my game.

1. update
2. check collision
3. spawn enemies
4. draw

And I wonder in which order I should put these.
I am sorry If something like this post has been written already 100 times.
What can I say, Im a nab  :)

Best regards,
Bizarreofnature

2
System / Easy way to load files from zip
« on: February 05, 2018, 10:27:44 pm »
Hello!

When it comes to streams and stuff im kinda helpless.

Im searching for an easy way to load for example .tga files from a zip file.

Forgive me for being such a noob.
Ive googled hours and checked every single thread in subforum System.
Without success of course.

Thanks in advance!

Best regards,
Bizarreofnature

3
System / sf::sleep problem
« on: February 02, 2018, 06:39:47 pm »
Hello!

Quote
sf::sleep (sf::seconds ( ((1.0f / 60) - cTimer.GetElapsedTime ()) ));

GetElapsedTime returns as float.

It doesnt work. The weird thing is that even the following does NOT work:

Quote
sf::sleep (sf::seconds (1.0f) );

Please help me, i already googled like crazy and nothing :-/

Best regards,
Bizarreofnature

4
System / Framerate regulation question
« on: January 31, 2018, 04:39:15 pm »
Hello!

I am really clueless when it comes to framerate regulation.
Im aware there is a nice function for this in SFML... however:

I want to do it the hard way and make it all myself.
I dont want sourcecode, im searching for someone who can explain to me what to do in words.

My goal is to capping the framerate of my game by 60 fps.

I have no problem when it comes to measuring time, the problem i have is i simply dont know how to cap framerate.

Thanks in advance!

EDIT: If it helps to explain, of course id like to see sourcecode.

MfG Bizarreofnature!

5
General / Weird movement shoot bug
« on: October 28, 2017, 11:54:43 pm »
Hello!

And again I have to annoy you guys.
I got a very weird bug and I have NO idea.

Basically my ship can move in all directions and shooting at the same time is no problem, except for one direction. If i move my ship upwards and to the left at the same time, for some reason i cant shoot anymore.
It is only this direction, all the other 7 work fine. And the weird thing is my code is all clean. Just what is going on?

Thanks in advance,
Bizarreofnature!

6
General / Collision between circle and rect
« on: October 26, 2017, 08:29:29 pm »
Hello!

Ive searched in the forum but did not find anything useful.

I want my ship to have a shield and if something touches it, it will be destroyed.

So basically all my collision boxes are rectangles. All but this single one.

How do I realize a collision detection between my circle and the enemy rectangles?

Thanks in advance,
Bizarreofnature

7
General / Difference between list and list::iterator
« on: October 25, 2017, 05:12:29 pm »
Hello there!

I hope this is the right section for my question. However:

What exactly is the difference between a list and list::iterator?
And when do I use those?

EDIT: And what is the difference between "remove" and "erase" ?

Thanks in advance,
Bizarreofnature

8
General / What comes first? Collision or update?
« on: October 24, 2017, 04:13:33 pm »
Hey there!

I have 3 routines.

- update
- collision
- draw

I wonder what comes first in a game loop.

In "Update" im updating the positions of objects like player, enemy etc. .
In collision, im checking for collisions.
And in Draw im simply drawing.

I though about this for quite a while and i have no clue.

Thanks in advance,
Bizarreofnature

9
Graphics / Get current screen (image)
« on: October 20, 2017, 09:49:35 pm »
Hello there!

I got a small problem. I want the current screen contents to load into a texture.

TextureWindow.update (gWindow);
Window.setTexture (TextureWindow);

gWindow is my renderwindow and Texturewindow an sf::texture, Window an sf:sprite.

Somewhy it does not work. The Window sprite is empty.

Please help me.

Best regards
Bizarreofnature

Pages: [1]