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

Pages: 1 2 [3] 4
31
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!

32
General / Re: Weird movement shoot bug
« on: October 29, 2017, 12:38:39 am »
Wow you guys were right. It is indeed NOT an sfml bug.
Thanks for your answers!

33
General / Re: Weird movement shoot bug
« on: October 29, 2017, 12:14:01 am »
Alright, I figured it. It was indeed an sfml bug. It seems sfml doesnt respond to certain keys when there are a few events at the same time.

Thanks anyways!

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

35
General / Re: Collision between circle and rect
« on: October 28, 2017, 11:49:59 pm »
Thank you very much for your answers. I see what I can do. Got too much bugs in the moment to progress :-/

36
General / Re: Collision between circle and rect
« on: October 26, 2017, 08:56:03 pm »
Maybe I should be lazy and create a lot rectangles to form out a circle. But this is not nice  :(

37
General / Re: Collision between circle and rect
« on: October 26, 2017, 08:42:49 pm »
Well I have hoped there is something like intersect funtion or so..

38
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

39
General / Re: Difference between list and list::iterator
« on: October 25, 2017, 06:22:56 pm »
It is ok, i just read it. Thanks!

40
General / Re: Difference between list and list::iterator
« on: October 25, 2017, 06:04:00 pm »
Thank you for your answer.

I see. I am sorry about posting it in the wrong forum, I just did because it directly affects my Game that I code.

So a list contains objects and an iterator is used to work them off piece by piece.

May I be allowed to ask a last question, even if it is the wrong forum.

Remove just removes objects from the list but erase destroys them?

41
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

42
General / Re: What comes first? Collision or update?
« on: October 24, 2017, 06:36:54 pm »
Thank you very much for your answer.

I see. The problem I have is overlapping sprites. That shouldn't be too hard to solve.

43
General / Re: What comes first? Collision or update?
« on: October 24, 2017, 05:07:36 pm »
Thanks for your help!

It did give me a clearer view of what to do and what not.

Actually I think I'll put collision at first. And that is because:

If id update first and then check for collisions, it wouldnt be drawn in time. Which means for example my ship will explode without actually touching anything that is drawn yet.

But maybe ppl can still help me even more, im new to this (collision)

44
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

45
Graphics / Re: Get current screen (image)
« on: October 20, 2017, 11:31:40 pm »
Thank you very much! Works like a charm  :)

Pages: 1 2 [3] 4