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

Pages: 1 ... 17 18 [19]
271
General / Re: Linking Errors - unresolved external symbol _main....
« on: October 23, 2014, 10:35:34 am »
Does sfml-main have any other purpose? The dependency is listed in a property sheet so I cant tell it not to include it for console projects.

272
Graphics / Re: Text height
« on: October 23, 2014, 09:00:32 am »
You could use getGlobalBounds().height.

273
General / Re: AW: Linking Errors - unresolved external symbol _main....
« on: October 23, 2014, 08:57:15 am »
If you link against sfml-main you need to set the subsystem to "window", otherwise it should be "console".

You do not need to change the subsystem if you link to sfml-main. I have projects linking to main which run in both Console and System and I have no issues.

274
General / Re: Game Server Structure
« on: October 22, 2014, 07:01:31 pm »
"Protecting" a string length against users using a char array is old and C.
It makes no sense whatsoever. How can a user (not a developer) simply resize a std::string but not a dynamic char array (it must be dynamic if it should be able to store variable length names)?

Huh? What do you mean? I was simply saying that explicitly declaring char[] to hold a string is old and C-style and that std::string should be preferred since it is dynamically allocated and you dont have to worry about buffer overflows.

275
General / Re: Linking Errors - unresolved external symbol _main....
« on: October 22, 2014, 06:58:58 pm »
Compile what? Post the code you are using.

276
General / Re: Game Server Structure
« on: October 22, 2014, 03:37:20 pm »
Yes I meant SQL injections, thank you for clarifying that Nexus. "Protecting" a string length against users using a char array is old and C. I hope you are checking for overflows.

277
General / Re: Game Server Structure
« on: October 22, 2014, 08:59:33 am »
I havent used queues in C++ at all but as far as char[] being secure? I'm not sure where you got that from.

278
Feature requests / Re: allow to build SFML as a monolithic library
« on: October 22, 2014, 12:21:35 am »
I dont think there is a need for SFML to be able to be built as a singular library as it would benefit only applications who use all modules. Like Nexus said, there arent a whole lot of applications or libraries (at least public ones) that would use all of the modules.

279
General / Re: Game Server Structure
« on: October 21, 2014, 11:45:00 pm »
Things like weapons and items are a tad different, they are usually hard coded or created at run time with a script language. They are nor persistent or temporary (unless of course thats how you want them).

Also be careful about using strings in persistent data if you are using a database as you are prone to injections (especially if you are persisting strings that the user can change like names).

280
General / Re: I'm doing it wrong.
« on: October 21, 2014, 08:49:29 am »
Please read this post: http://en.sfml-dev.org/forums/index.php?topic=5559.msg36369#msg36369. I agree with exploiter, your linking should not be done in the source code.

If you narrow your problem down to a function or set of functions, try reproducing the problem outside of your current testing environment (ie: Make a new project) and post the appropriate code here.

281
General / Re: Game Server Structure
« on: October 21, 2014, 08:44:07 am »
I'm simply pointing out that its a common method and it works. You could even use a database depending on which way you want to go but a file is probably safer and maybe faster in the long run.

Simply put, persistent data is data that will not change between sessions. If you have 10 health and leave the game, restart the server or change the map, when you come back to that game you will still have 10 health.

I'm suggesting that you do it the way that Quake and Valve's games do it which works and its a simple approach.

282
General / Re: Game Server Structure
« on: October 20, 2014, 09:19:44 pm »
Its still the same thing. You save persistent data, close the server, open a new one, load the new map, load the persistent data. This is how most games do it like Half Life and Counter Strike (even Quake did it this way).

283
General / Re: Game Server Structure
« on: October 20, 2014, 07:55:37 am »
You need a form of persistance to keep data from the server stored between sessions. When you change map, generally you will be starting a new local server which (obviously) will not have the same variables and stuff as the previous one. This is easily solved by writing the relevant persistant data (health, armour, weapons, etc) to a file before the map changes, then reading it when the next map is loaded.

Pages: 1 ... 17 18 [19]