Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 Oct 2005
Offline Last Active May 23 2016 02:27 PM

#5291896 Best gaming platform in the future with marketing perspective.

Posted by SimonForsman on 16 May 2016 - 11:36 AM

You'd be like the guys coding Cobol. They thought they'd have a job forever. However technology moves on, new languages appear, Cobol was discarded, and they're out of a job.

Cobol isn't quite dead yet, There are 17 open cobol positions in my city right now, (all at banks and government agencies), devs who are well past retirement age are being paid insane salaries to stick around and employers are prepared to spend months training junior devs in the language.

Technology may move quickly but big corporations and governments do not, Zombie technology may not be all that flashy and interesting but once big business critical systems have been built on any platform it becomes very difficult to kill it completely and you can build a great career supporting that crap.

#5289277 Does server's location affect players' ping?

Posted by SimonForsman on 29 April 2016 - 11:47 AM

How big is that tiny bit of latency? Currently it is > 100 for some(e.g. that korean had ~200), so some of them cannot play. I want it at least < 60.

the speed of light is roughly 300.000 km/s , the distance between germany and south korea is 8570km which means light would need ~56ms to travel back and forth between client and server if it could do so in a straight line without interruptions (i.e, if the earth was flat and you used lasers instead of cables)

#5286887 Multi-keypress movement in SDL2

Posted by SimonForsman on 14 April 2016 - 11:11 AM

don't move things when you process the events, flag the keys as pressed on key down, unflag on key up.
    key_pressed[...keysym.sym] = 1;
    key_pressed[...keysym.sym] = 0;


gameloop ...
    dt = Time::GetDeltaTime();
    dx = dt * (key_pressed[SDLK_RIGHT] - key_pressed[SDLK_LEFT])
    dy = dt * (key_pressed[SDLK_DOWN] - key_pressed[SDLK_UP])
    sprite->Move(dx, dy);

#5258234 Is there any space left for games about zombies?

Posted by SimonForsman on 20 October 2015 - 09:32 PM

I think there's more room for funny zombie games, especially if they make use of zombie animals rather than just humans.

I think there's room for both extremes really, animalistic zombies, and zombies that are basically people shuffling around. It's the middle ground that people seem to be getting sick of, where you have some special zombies, and most just shuffle around.
Specifically, games that have well thought out stories (or at least "deep" survival stories) seem to be doing well with zombies right now.

Personally i think the zombies are irrelevant.

What makes the game fun ? L4D for example is not fun because of the zombies, its fun because of how its mechanics push people to cooperate, You could take that game and move it to a sci-fi setting with aliens and it would still work.

#5256147 How can I improve my network performance?

Posted by SimonForsman on 07 October 2015 - 11:55 PM

Today I gathered my group together in which we had 6 of us trying out the networked game play. It didn't go too well. When there is only 2 of us everything works as expected and it's enjoyable. However, some strange discrepancies started occurring when there were 6 of us; 3 or more really. Individuals started to time-out mainly, some were even crashing for some unknown reasons. Mainly tho, the time-outs is what I'm concerned about. That isn't supposed to happen unless they don't receive a reply from the server after 30 seconds or so, or if they disconnect manually.
One of the strange things I noticed during the test on the Server log was multiple requests for the particular individual to exit the game, which was very strange because they weren't requesting to do so.
My network system is currently just TCP, which I think may be the root of my problem. I've been thinking that all of my packets should be guaranteed to be delivered timely since we are only working across LAN, I'm starting to become doubtful. However, another concern I suppose is maybe I am sending update messages to frequently.
Right now every .125 seconds and if the player's transform changed I send a message that looks like this:

// send our transform information to the other players
  transMsg << NetworkManager::GetInstance().GetServerCmdFromMessageType(MESSAGE_TYPE::Game)
           << "!SPECIFICOBJECTMESSAGE " << netCompRef.GenerateMessageID("UPDATEOBJTRANSFORM")
           << gameObj->m_Pos.GetX()   << NLDS << gameObj->m_Pos.GetY()   << NLDS << gameObj->m_Pos.GetZ()   << NLDS
           << playerCam->m_Rot.GetX() << NLDS << playerCam->m_Rot.GetY() << NLDS << playerCam->m_Rot.GetZ() << NLDS
           << gameObj->m_Scale << NLDS << "\r\n";
I'm also doing something not good for when we are shooting. Every bullet that is generate will send to the server the creation of the bullet, which since we have rapid fire now is definitely sending a ton of messages to the server, then back to the other connected clients. Also, another thing I was thinking is maybe my router's firewall is detecting the influx of packets and is thinking it's a DDOS or something, which then terminates the connection on that end. However, I don't think that's the case, but it might be possible.
Thanks for any insight in helping me improve my networking, I'm willing to hear any suggestions.

are you sending a long string for each message ? if so you should switch to a binary format, a 32 bit float uses 4 bytes, a 32 bit float encoded as a string tends to use 7+ bytes, things like "!SPECIFICOBJECTMESSAGE " is 23 bytes (could probably be replaced by a 1 or 2 byte number), you also get a nice chunk of CPU overhead from the encoding/decoding (converting numeric values to strings and concatenating them is not cheap)

Your timeout / disconnect problems are probably caused by something else though, (on a LAN you should be able to send tons of data without any problems)

#5255053 Virtual / abstract class variables / functions that are shared across all ins...

Posted by SimonForsman on 01 October 2015 - 03:31 PM


I consider myself to be very fluent with java syntax and I somewhat understand some parts of C# and C++. In java I have stumbled across a problem in my game programming that I cannot resolve, I have searched for a workaround or solution for the problem on different forums and websites, I also asked this in a few forums myself, however nothing nor' no one gave me any solution, adequate in my view, nor' convinced me that it's better to disallow a basic unimplemented solution that I myself and many other people have had as their first thought to this problem.

From my understanding, neither java nor' C++ allow the virtual / abstract modifier with the static modifier and I believe I understand why, considering what the static modifier does. However in java, you cannot force inherited classes to provide an implementation for an identifier (field or method) within a class that is shared across all instances of the class and can be accessed without the need to instantiate the class. I think this would be an extremely useful feature, but before replying, please do consider that, in computer science theory, I consider myself to be somewhat naive.

Kind Regards,

Why would you want to re-implement a static method in a child class ? since the static method won't use the instance anyway you can always access it using Baseclass.staticmethod() (from anywhere if it is public and from the child classes if it is protected)

#5254612 What exactly is API-First?

Posted by SimonForsman on 29 September 2015 - 09:53 AM

I can't help but keep returning to the fact that the OP's article is a terrible, strong-arm sales pitch aimed at non-technical managers of tech teams, trying to trick them into being hyped over a nonsense manufactured trend, which the author intends to profit from

Well, that sounds like every trend in the last 20 years. Anyone had their team agile-buzzword'ed lately?

Unfortunately no, our team got agile-made-up-word'ed instead since the company is innovative and unique. (I like the innovation but the made up words are confusing, with the usual buzzwords you can at least sort-of understand what the suits are referring to)

#5252526 SDL Key Delay

Posted by SimonForsman on 16 September 2015 - 09:51 AM

while (SDL_PollEvent(&ev) !=0)
		{ //inicio do eventHandle
			if (ev.type == SDL_QUIT || ev.key.keysym.sym == SDLK_ESCAPE)
				isRunning = false;
			if(ev.type == SDL_KEYDOWN)
					case SDLK_RIGHT:
						flipTheDog = frontDog;
						quadradoOrigem.x +=35;
						if (quadradoOrigem.x > 70)
							quadradoOrigem.x = 0;
Hello Again Guys!
Programming my first game in SDL, the Kakorro's Quest it was that I found a doubt..
I was programed the basic walk animation. Until here, it's all ok.
But, when i pressed a Key, and keep it pressed, the game takes a delay to recognize the next keypressed...
this causes a stop motion in the animation, like the dog walking animation, then stops for a little delay, then do the animation normally.
How i can fix that?
My code:

show more code.

you can simplify the inner loops but show the full structure (if you for example update game state and render inside the event polling while loop you will get significant delays on all events, not just keyboard events)

#5252209 Linux c++ debugging

Posted by SimonForsman on 14 September 2015 - 10:56 AM

I had no linux experience coming into my latest job. Some of our code is on linux and I'm so used to visual studio. I've used GDB as a debugger but it's a pain coming from Visual Studio. Are there any suggestions on programming tools on Linux?

Try QtCreator, it should provide a pretty decent graphical interface on top of gdb
other IDEs like code::blocks and eclipse should do the same

#5251371 System requirements

Posted by SimonForsman on 09 September 2015 - 10:44 AM

1.3 GHz is less than my phone. Quad-core will help with multiple file compilation but your linking time is going to be awfully long, since it needs single core power.
Not sure about graphics, but compare it other games: can you run Skyrim? Do you plan to make something better than Skyrim?

I want that when using tools like Unreal engine, VS, etc, not to get stuck, and  not to get messages like "... has stopped working" . I plan to develop 3D games, but not better than Skyrim, with not heavy graphics.

I wouldn't buy any laptop for any purpose these days unless it has SSD or atleast a hybrid drive, faster disk access makes even light office work smoother.

#5251194 Standard ML book?

Posted by SimonForsman on 08 September 2015 - 02:13 PM

Hi, any advise on a decent book about Standard ML book?
I need mostly exercises, level beginner to intermediate, not a reference manual.
Thank you.


That one is pretty good imho, each chapter ends with a series of exercises making it a pretty solid introduction to both SML and for functional programming in general.

#5251072 The technical side of game design

Posted by SimonForsman on 07 September 2015 - 05:08 PM

I don't know if this is the right forum for this.


Are there any resources for the technical side of game design on the web?  By the technical side I don't mean how to code and stuff like that.  What I mean is something that would lead to less inexperienced game designers from trying to make Skyrim on a gameboy advance.  In other words an article that is a sign of the time in regards to what is possible and what isn't, and the techniques (not necessarily implementation) that would allow for the more taxing behaviors of certain types of games/graphics.  Something that would allow a game designer to communicate better and be a more effective member of the team rather than just "being a dreamer". (not my opinion)


Whats possible on a given platform is pretty much irrelevant.

The only thing that matters is: 

What can your team actually do with the platforms you have access to in the time you have available for it ?


Designing any reasonably complex game without knowing what human resources you have available is pretty much doomed to fail, the platform is only a consideration if you are pushing close to its limits (and even then your human resources will be the biggest factor in determining how close to the limit you're actually able to get).

#5249542 How would I be able to do this in C++?

Posted by SimonForsman on 29 August 2015 - 04:52 AM


Did you remeber to #include ?


He is probably not using C++11.



The error message implies that he is compiling in C++98 mode using a compiler that also supports later versions, probably gcc


passing -std=c++11 to the compiler should fix that, in code::blocks there should be a checkbox under settings>compiler>compiler flags that he can check.

#5249231 Games on non smart phones?

Posted by SimonForsman on 27 August 2015 - 03:06 PM

Does anyone know anything about this, both pre smart phone era and current non smart phones, I'm pretty sure a lot of them used/use the Symbian OS, would these games be created in Java, can anyone shed any knowledge. What languages/tools are used. Just curious really.


Symbian is a smartphone OS(and it was quite dominant before Apple entered the market with a more consumer oriented device), apps for symbian were written in C++ and later versions(after 2010) used the Qt framework (Which made it a pretty awesome smartphone OS to develop for, it was imho superior to both iOS and Android from a developers point of view at that time but by then it was already too late.)


non smartphones tend to run Java Micro Edition "apps" which are far more limited, you can get everything you need for that here: http://www.oracle.com/technetwork/java/embedded/javame/javame-sdk/downloads/javamesdkdownloads-2166598.html

#5249227 Terraria clone. What do I need to learn

Posted by SimonForsman on 27 August 2015 - 02:48 PM

Hello fellow programmers.

I want to make a terraria clone. Ofc in alot smaller scale. And i therefor wonder what kind of skills i need to learn to do so.

What is the difference between procedural generation of my map and perlin noise generating my map array. Ive tried out Perlin, to get my array filled with random numbers.
Are those the same thing or am i all wrong?

What other skillset do I need to learn?

Im a newbie so go easy on me smile.png


procedural generation is a broad term that can refer to pretty much any form of data generation where the software creates data based on a set of rules (which may or may not include perlin noise), perlin noise is good for procedural terrain since it creates clusters of similar values that have reasonably "natural looking" shapes but you probably want to do more, you can for example add rules to modify the terrain based on things like slope and altitude,  add caves, add objects, etc. 


This one can be worth looking at: http://www.roguebasin.com/index.php?title=Cellular_Automata_Method_for_Generating_Random_Cave-Like_Levels

allthough it is intended for top-down rogue-likes you can use pretty much the same method to generate caves for a terraria clone (generating a bunch of such caves and placing them at not quite random positions below some suitable depth is fairly easy and makes the maps a bit more interesting)