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

Pages: [1]
System / Thread creation starts to fail.
« on: June 07, 2011, 03:27:31 pm »
ulimit -u returns 1024. Well maybe i have to use less threads then. :P

System / Thread creation starts to fail.
« on: June 07, 2011, 03:11:17 pm »
Yes, but my kernel limits the thread count to 15 thousand and not just to few hundred.

System / Thread creation starts to fail.
« on: June 07, 2011, 02:59:08 pm »
I wrote a threaded multiplayer networking, but my threads stopped being created when client connected so i wrote test which reproduces the problem, but with just creating threads code.

Code: [Select]

#include <iostream>
#include <SFML/System.hpp>

void thread_one(int* counter) {
for(int i = 5; i < 100; i++) {

void thread_two(int* counter) {
for(int i = 5; i < 100; i++) {

int main() {
int counter = 2;
while(true) {
sf::Thread * threadOne = new sf::Thread(&thread_one, &counter);
sf::Thread * threadTwo = new sf::Thread(&thread_two, &counter);
std::cout << "Two threads launched!" << counter <<  std::endl;
counter += 2;

This code starts failing to create threads after few hundred threads and i will be needing like 4000 threads.

I'm running linux so it creates pthreads and gives me the error message from the linux version of Launch() function. Oh yeah and i'm using SFML 2.

Care to help?

SFML projects / Ultimate Zombie Fighters
« on: August 09, 2010, 12:22:02 pm »
Quote from: "priomsrb"
I looked a little at sf::Network and some other low-level networking libraries recently. I think I might choose enet since it doesnt require threads and makes it easy to send reliable packets.

I've never done netowork programming before and so it seems really interesting and challenging. It's almost like a new way of thinking. However every time I think about it I get scared because of all the issues that can occur (high lag, cheating, synchronisation problems). Perhaps I should try to get a basic system working and worry about those later.

Have you made any networked apps before? Is it really as hard as I think it is?

Survived 7 rounds with touchpad on my laptop ran out of bullets

Wow must be hard on a touchpad. You can buy more ammo from where you bought your gun. I'm guessing you ran out of mp5 ammo ;)

I have written small chat client/server applications, it's not that hard, but i like more low level networking libraries like berkeley and winsock as they don't come in way, but sf::Network is nice as i can easily make the packets easily and it still does not come in way.

I actually ran out of mp5 ammo and then didn't have money to buy more and kept running out of ammo from other weapons i died just before i could buy more. :P

SFML projects / Ultimate Zombie Fighters
« on: August 01, 2010, 03:16:33 am »
If your using SFML and looking for network library just use the sf::Network class for it and you might want to read bjee's guide to network programming. Not that complicated, but some problems might come like how to send a packet when your waiting for a packet. To get around this you either use threads or use selector and both are provided with SFML too.

Networking for like 4 players you can easily keep sending movement packets constantly. Like you could have packet "PMU1" (Player Move Up ID1) that's 4 bytes. Send it to the server and server broadcasts it to the 3 other players it becomes 12 bytes. If everyone moves constantly the most it would use is  4 bytes * 4 players  * to 3 players = 48 bytes, but this of course raises quite fast the more packets are sent per second.

Anyway looking nice. :) Survived 7 rounds with touchpad on my laptop ran out of bullets. More player sprites would be nice to have like with different weapons, seems bit idiotic to use a rifle when the sprite has a hand gun.

For the matter of 7zip quite many extractors support it and after this week i've never downloading zip from sourceforge anymore as all of them have been corrupted.

SFML projects / Tengine / Torem Online
« on: July 28, 2010, 02:42:51 am »
Wiki's are great yes, but my designs on the wiki change bit too fast. Recoded already the statemanager and event manager as it was causing circular dependancies and desided to redesign it and do it bit better. :) Now i have just the state manager and every state has their own event handler. I know MMOPRG is pretty large project and yes i have that 4 years for doing it.  :P

SFML projects / Tengine / Torem Online
« on: July 27, 2010, 11:15:43 am »
Howdy people. I would like to share my project. It's huge. We have been designing it for a year already. Basically the main project is massive multiplayer online role playing game in the exciting universe of Torem.  We have several side kick projects too like a manga style comic, visual novel and ebook going on.

You can find much of our design art at http://crimasi.deviantart.com and join our dev forum at http://crimasi.com/forum

I don't have anything to show about the game itself yet as i just started to program it and have state manager and place holder intro state done and 30% of the network manager. Sooo much to do still. I'm using SFML and OpenGL. 8) Oh yeah i forgot it's 3D, but were not probably doing any heavy 3D stuff, but i'm planning on some quite extensive NPC AI.

The game will feature standalone rpg and mmorpg. Were not going after some asian grinding mmo, but a game where players can really do some roleplaying. The game will feature custom vocation system where players can play any vocation they want with their character. Different vocations make different skills available like priest vocation makes healing and resurrection and smiting skills available. More about vocations at http://www.crimasi.com/torem/wiki/index.php/Vocation

The game has several playable races. http://www.crimasi.com/torem/wiki/index.php/Ilem_Rixmon_Races

The game features moving vehicles such as ships, steam trains, air ships, etc. Ridable mounts.

Basically if you were going to ask me if you could play a pirate in the game i would say yes. You can also become a thief. Start a family in your own house. Join the war of different kingdoms and even become the king. Start a village with your guild.

I will update here what i get done. 8) Big Dream project i would say, but it's doable with some time. You nasty people do not start saying "mmorpg?  Try something easier first like tic tac toe!"  :twisted:

General / [Solved] 3D camera and events
« on: June 17, 2010, 03:05:22 am »
Seriously dude. There's nothing wrong with global variables, but yes thank you. They were not nulling.

General / [Solved] 3D camera and events
« on: June 17, 2010, 12:22:10 am »
Okey.. I was writing bit of 3D and my camera went kind of crazy. I've written events to move the camera, but when i click on a key it keeps going on and if i click it again it goes faster and if i click reverse it slows down. Seems like the events are going into loop or something. Remember. It keeps going forever, been trying to debug this for few hours now, like once i press key it stays down. :P

Here's my code http://codepad.org/9NpiXuGg

Graphics / Opengl + text
« on: June 13, 2010, 11:21:21 pm »
Nice. :)

Graphics / Opengl + text
« on: June 11, 2010, 11:51:27 pm »
Sorry for bringing up such old topic, but has this had any improvements? I would so love having easy way of rendering text on OpenGL app with C.

Pages: [1]