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.


Topics - TMKCodes

Pages: [1]
1
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++) {
sf::Sleep(500);
}
}

void thread_two(int* counter) {
for(int i = 5; i < 100; i++) {
sf::Sleep(500);
}
}

int main() {
int counter = 2;
while(true) {
sf::Sleep(1000);
sf::Thread * threadOne = new sf::Thread(&thread_one, &counter);
sf::Thread * threadTwo = new sf::Thread(&thread_two, &counter);
threadOne->Launch();
threadTwo->Launch();
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?

2
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:

3
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

Pages: [1]