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

Pages: 1 ... 5 6 [7] 8 9 ... 16
91
Network / Sending own object from client to server
« on: June 29, 2010, 09:03:22 am »
Actually, your code is just sending a memory address to an other computer ;)

You might use Packet in order to do that, no need for CAMP lib.

92
Network / Re: Strange client outputs...
« on: June 29, 2010, 09:01:57 am »
Quote from: "Fr4sbokz"
Everything went quite fine, until we realized that the server suddenly stopped reading our messages.
How many messages per second do you send to the server ?

93
Network / Strange client outputs...
« on: June 28, 2010, 11:14:02 am »
Hi,

Can you post your server code ?
By the way, why are you using a +1 in your buffer size ?
This is why you are getting a \n\0.

In the memory, the string is like this :
[T][h][ ][a][ ][t][e][t][.][\r][\n][\0][][]
the \0 is a specific character (0 in hexa) indicating the end of the string. After this character you an have everyhting because this is an other part of memory (not used to store the string).

So, you are sending the string plus the \0 : nonsense (IMHO).

Thus, I'm not sure your problem is from this "error".

94
General / Needs Help for Installing SFML
« on: June 23, 2010, 02:46:34 pm »
you, certainly, are blind i guess : http://www.sfml-dev.org/tutorials/ ;)

95
Graphics / sfml/ogl alpha doesnt work
« on: June 21, 2010, 10:07:41 pm »
Look up at my signature ;)

96
Graphics / [solved]Tiles are showing black lines at the borders (1.6)
« on: June 17, 2010, 10:51:14 pm »
Yes,
It's a well known "bug". In order to have pixel art tiles you have to use Smooth to false, but when moving them around the screen they are using floating numbers thus, something is wrong with the drawing. Laurent knows that issue but "it's not a bug" as far as I know, it's just a tricky unsolvable problem...

97
General / Bullet Hell performance and optimization problems
« on: June 16, 2010, 11:01:47 am »
Quote from: "SuperV1234"
Entities.Tick(); basically means Entities.Update(); Entities.Draw();

So it's taking a single entity, updating it, drawing it, then passing to the next entity.
Right, what about Updating every entities, then drawing each entities ?
Something more like :
Code: [Select]
for (int i = Entities.Count - 1; i >= 0; i--)
                Entities[i].Update();
for (int i = Entities.Count - 1; i >= 0; i--)
                Entities[i].Draw();
I'm not sure (Laurent ?), but I think it would be better to draw everything in only one pass, while doing nothing else...

98
General / Bullet Hell performance and optimization problems
« on: June 16, 2010, 06:17:04 am »
Quote from: "SuperV1234"
By commenting the Draw instruction, the game handles 20000 bullets without slowdowns.

Is it a SFML limitation, or is there any chance I'm doing something wrong drawing the sprite?

I'm not really sure about what I'll say, because I can't open your code file (Ubuntu, so C# is hard to read).

But, what I understand is that you are not drawing all your sprites in one block. I think that SFML2 was optimized for such things. If you are drawing some sprites and doing others things, you are not using SFML optimization.
Can you show us your main loop and the place where you are doing the drawings ?
I usually do updates of all my objects, then drawing of all them.

99
General / Collision - example(?)
« on: June 11, 2010, 11:02:56 am »
Quote from: "Fuv"
Quote
Your code seeme to test just only one time the collision. What are the size of the two images ? Because maybe "Przesz" is not 100px width nor 50px height...


Does it have to be exactly 100x50? Why? I have the same images and one was scaled to 0,5height and 0,5 width. But also after making it without scaling it is not working.

Nop, thoses sizes where the minimas in order to make a collision between the two sprites.
As G. said, you have to do the test collision after each movement, in the main loop.

100
General / Collision - example(?)
« on: June 10, 2010, 04:10:26 pm »
Quote from: "Fuv"
Im not interested in what u are arguing about now. I just want to know why my collision is not working and so far it seems no one knows. I give you all my code, so if here is somebody who can explain me why it is not working I would be very, very grateful.
Don't have to be unpolite, everybody can speak about lto of things on those forums. Let's ask them to do it on another thread could be smarter ;)

By the Way :
Code: [Select]

   Ludzik.SetPosition(400.f, 350.f);
   Ludzik.SetScale(0.5f, 0.5f);

   Przesz.SetPosition(300.f, 300.f);
   
   if(Collision::BoundingBoxTest(Ludzik, Przesz)==true)
   {
  std::cout<<"Ble";
return 0;
   }

Your code seeme to test just only one time the collision. What are the size of the two images ? Because maybe "Przesz" is not 100px width nor 50px height...
Can you show us the BoundingBoxTest function too please ?

101
General / Collision - example(?)
« on: June 10, 2010, 08:54:43 am »
Quote from: "Ashenwraith"
Quote from: "Fuv"
It is not working. Can you tell me how collision should look like? Or what is wrong in my code? Or maybe you need more code?


Well one problem it could be is that depending on what sfml version you are using the Rectangle code has changed so you might have to alter that.
Seems Ashenwraith asked you something interesting, no ?

102
Graphics / Rotating/Snapping
« on: June 01, 2010, 12:44:15 pm »
Maybe ATI drivers ?

Apart of this :
- SFML Version ?
- OS ?
- IDE ?

Thx

103
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 08:47:15 pm »
If I were you, I won't destroy the Sprite. Since an other object is appearing just after the first one is eaten, just change the Image and place it somewhere !

104
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 04:49:42 pm »
Quote from: "foodman"
But I am not aware how to Destroy that apple Once ate
I'm certain that some websites can help you (maybe java, but it's the algorithm which is important). At least, use ethicle ;)

105
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 02:48:23 pm »
Quote from: "Documentation"
void sf::Drawable::SetPosition (float X, float Y)
This method uses float numbers.
the ".f" thing is used to say "this is a float" to the compiler.
If you are really using "A.f", this should not work (IHMO). Use A instead :
Code: [Select]
int randX = sf::Randomizer::Random(lowest, highest);
int randY = sf::Randomizer::Random(lowest, highest);
Sprite.SetPosition(randX, randY);
If all this is nonsense or not answeringto your question, please post the part of your code which is not working.

PS: By the way, using SetPosition(A, A) is a bad idea, all your sprites will appear with the same top and left position, on a diagonal.

Pages: 1 ... 5 6 [7] 8 9 ... 16
anything