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

Pages: [1] 2
1
General / Mouse Move Method
« on: October 26, 2011, 06:57:42 pm »
Awesome, thanks for the reply!

2
General / Mouse Move Method
« on: October 26, 2011, 04:48:32 pm »
Hey guys, I have a quick question about a particular method.

I'm designing a little utility, not an actual game per say.  But it uses a 360 degree viewing system.  What I'm trying to think about how to do is use the mouse input to rotate the view across the space.  I know SFML sends mouse movement events in a position relative to itself.  

I think the best way to do that would be to get the change in movement from the previous frame, calculate the difference based on mouse sensitivity and current resolution, and apply that, then reset the "cursor position", but I don't know if SFML supports that natively.

 <-- an example of what I was talking about in terms of view.

3
System / For newcomers to Parallel Computing/Threading
« on: April 15, 2011, 12:03:25 am »
Okay, yeah, I get it, xD;  The wording confused me a bit, :]

4
System / For newcomers to Parallel Computing/Threading
« on: April 14, 2011, 11:32:02 pm »
So if you gave each thread a copy of the vector, how was it sorting out a common area?  Unless you meant you passed pointers or references to each thread, aren't you sorting out the same vector multiple times for no reason?  o.o  *blinks*

5
System / For newcomers to Parallel Computing/Threading
« on: April 14, 2011, 08:44:09 pm »
Just a couple of questions about the assignment.  

Do the algorithms need to get their source material from a common pool, or do they just need to be individual materials that need to be sorted?  

And, what do you want displayed exactly?  Like, how far along each algorithm is?  What is being sorted at the current frame?

6
General discussions / Multiplayer games
« on: April 14, 2011, 08:07:20 pm »
To elaborate a bit further on the post above me, there would be two main functions for the internet here.

First, you'd need some sort of lobby/matchmaking system.  You could use the old methods similar to back in the day where one person just "listens" for other users that would connect, and other players obtain their IP address and connect to them.  But in this day and age it doesn't work as well due to firewalls/routers not letting packets in indiscriminately without having to configure port forwarding.  

So an easier method in this case would be to have some kind of centralized server that people connect to for matchmaking purposes.  With this, you can still have a player hosting the game.  The reason it works a little better is that, with the modern firewalls and routers, if you send a UDP packet out to a destination before you receive any packets, it temporarily allows you to receive packets on that same port from your destination.  

So, when you join together in a lobby and start a game, the server would send the host the ip's of the other 3 players, and the ip of the host would go to the players themselves.  The ports would be opened, and data exchange can begin.  


The second main function of the internet is of course sending data throughout the game.  For either of the above, you can use TCP or UDP.  TCP opens up a connection with another computer over a socket.  You can only (for most intensive purposes) only have one computer connected per socket.  The upside is that there is procedures in place for TCP connections to check for lost packets.  The downside is that you use up extra sockets and you have to manage all of those incoming and outgoing connections.  

For UDP, you can have all the players connected to a single port and just broadcast changes out to everyone through that indiscriminately.  The downside is that you have to employ your own method of checking to see if packets were dropped or not.  

Kind of a long bit, but I hope it helps, :3

7
System / For newcomers to Parallel Computing/Threading
« on: April 14, 2011, 07:56:08 pm »
This looks like an excellent idea.  I might try this when I get home and post my source code as an example, :]

8
General / Unresolved linker externals
« on: April 14, 2011, 07:53:47 pm »
When I switch between libraries and such I often times get this issue.  The easiest way by far is to just recompile everything, making sure that all of the settings are 100% uniform across the entire board.

What that means is, if your final product is going to be Multi-threaded Debug/Release Static, make sure that all of the libraries compiled beforehand follow this.  Most of the errors come from one of the libraries being compiled under a different setting such as being dynamically linked.

9
General / Error loading sprite.
« on: April 14, 2011, 07:50:46 pm »
Or, if for some odd reason you need to, you can also use absolute paths.  I would highly not recommend this though.

10
General / Drawing tilemap is lowering my fps to a crawl
« on: April 14, 2011, 07:46:13 pm »
Just out of curiosity, what makes the engine run faster displaying one image versus a bunch of smaller ones?  

One reason I can think of in my head is only having to perform all of the extra manipulations such as scaling and what not once, but other than that, I don't know.  I don't have much OpenGL experience to know what goes on behind the scenes.

11
General / Editable textboxes and you~
« on: July 10, 2009, 01:04:41 am »
I'm going to assume that GetCharacterPos() returns the top-left position of the character as other get position functions defaults to?

IE, if I set the string position as 100 px by 60 px, then go to the 3rd character, the returned position will be 100 + some number by 60px?

EDIT:  Also, I see in the documentation that it doesn't not apply scale.  So does that mean if the string is scaled down 50%, that it will still return the position as if it were not scaled at all?

12
General / Editable textboxes and you~
« on: July 09, 2009, 09:25:12 pm »
This isn't so much of a "I don't know how to do it" thread as it is more of a general discussion thread regarding this subject.

I currently have a textbox, that is selectable, and editable.  This part is cake.  But for the next part, I do not know enough about SFML itself yet to determine the most optimal route.

1)  Displaying the flashing | glyph at the edit point.
The only way I know to do this right now with SFML is to calculate the width of each individual character and how far it is in, and place it inbetween the two characters manually.  Annoying in a way.  

2)  Being able to set an edit point by clicking in the middle of a textbox somewhere.
Once again, this goes back to the previous situation.  I can manually calculate the position on the screen, the width of each character, and determine if the spot is within the string... but it seems like a pain in the arse, ;)

Is there an easier way that this can be done?

13
General / [Solved] Issue with Keypress and sf::Key::Back
« on: June 30, 2009, 07:21:28 pm »
I found the problem.  After it removed the character, it was inserting an invisible character (unicode 8) representing backspace, that wasn't actually displaying.  Fixed.  Hurray.

14
General / [Solved] Issue with Keypress and sf::Key::Back
« on: June 30, 2009, 04:49:26 pm »
Well, I just did a test.  I added code to the event that spawns a message box upon receiving the backspace key event.  The message box does spawn each time, meaning that the event is being received.  This means that for some reason, the string isn't updating properly.  Hmm.

15
General / Error with static linking
« on: June 30, 2009, 02:09:40 am »
First off, are you compiling with /MT or /MD?

Pages: [1] 2
anything