Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 Oct 2005
Offline Last Active Today, 05:40 PM

#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)

#5249085 Question about deprecated OpenGL functionality

Posted by SimonForsman on 26 August 2015 - 06:02 PM

I am working on a game that I initially just used immediate rendering for, knowing that I'd revisit it and implement vertex/texture coord/color/etc buffers when the time came. So then I was reading in this thread that a lot of OpenGL stuff that I learned way back when (in the 2000's) is deprecated now.


My questions are:


  1. How much harm will I suffer if I use this deprecated stuff? It seems like it still works well enough. Is there any performance hit associated with using it?
  2. I saw this basic tutorial on shaders, and in fact have a attenuated point light shader sitting in a git branch, but it just shows how to color a fragment a solid color. Is there any easy, drop-in shader that I can use to handle the basics that I listed above, until I'm ready to dig deeper into writing my own shaders? (UV mapping, colored vertices, etc).

If there are any other resources I should be looking at, please let me know. It's hard to know how old the tutorials you're looking at are sometimes. There's still stuff out there with ARB functions in it that looks current at first glance...


1. If you are using immediate mode you will get significantly worse performance (especially if you are pushing tons of vertices to the GPU) and a lack of shaders does greatly restrict the flexibility of your renderer.


2. There are tons of pre-written shaders you can download and pretty much just drop-in but if they are basic(the GPU driver should replace fixed function UV mapping and colored vertices with shader equivalents for you anyway) you won't gain much by doing so, for a basic renderer the main performance advantage comes from using VBOs rather than pushing vertex arrays to the GPU once per frame, or worse, pushing a metric crapton of individual vertices to the GPU each frame with glVertex calls.


once you are using VBOs however you will have to use vertex shaders to do more fancy transformation of the vertices (i.e, skeletal animation) as doing that on the CPU will require you to re-upload the mesh each frame (which is fine if your scenes consist of 10-20k vertices but not quite as fine if your scenes contain 30m vertices), if you are modifying your vertex arrays right now (rather than just rotating, translating and scaling them) you will have to convert that code to vertex shaders in order to use VBOs effectively.


fragment shaders are less useful for basic renderers but becomes almost essential once you try to implement more advanced effects (if you use the fixed function you're pretty much limited to stencil operations and blending the results of multiple render passes together in various ways)



edit: it is worth keeping in mind that "significantly worse performance" is still insanely fast, the deprecated stuff is not slower today than it was in the late 90s or early 2000s, its just that GPUs have become several hundred or even a few thousand times faster while PCIe x16 is only around 30 times faster than PCI (4GiB/s vs 133MiB/s) and only 2 times as fast as AGP(2GiB/s for AGP8x) so the amount of data you can send to the GPU each second hasn't gone up much at all.

#5245768 default install folder for windows game

Posted by SimonForsman on 11 August 2015 - 10:43 AM


What's the advantage to "everything in one folder"? I'm missing something here.


backup purposes primarily. and no chasing down long directory trees to mass delete saved games through the OS (ever tried to delete a couple hundred savegames in skyrim from inside skyrim?).



and yes at the moment, the game just uses current working dir, no specific paths. so you can install and it works anywhere (well, at least anywhere UAC allows). this also means you can freely move the game folder without breaking anything. however, such a setup does not take user permission systems into account. i remember first noticing way back at OSU (late 80's)  that such a setup is really not the UNIX permissions way of doing things.



Things like backup actually becomes easier if everyone plays by the rules and stores things in (roughly) the correct place, As a user i don't want to keep backups of all my installed games (doing so would require insane amounts of space and re-installing them from disc/steam/gog or a downloaded installer is trivial) and i definitely don't want to set my backup scripts to make backups of C:\Program Files\game1\saves  , C:\publisherX\game2\saves, D:\game3\saves, etc


If all applications behave as they should i only need to make a backup of the user folder and everything that can't be re-installed will be covered (documents, photos, code, save games, settings, my browser bookmarks, etc, etc), if i use network/domain user accounts (or just store the user folders on a NAS and configure the local users on all machines to use that) i can share all that stuff between all my machines seamlessly while still having all the big game assets, binaries, etc on a local SSD on each machine for fast loading.

#5243421 default install folder for windows game

Posted by SimonForsman on 29 July 2015 - 01:15 PM

whats a good default install folder for a windows game?


i'm about to post beta 21 of Caveman with skinned meshes. But i noticed that in Inno setup, i'm installing to \program files(x86)\caveman.


i've had one user with issues caused by a corrupt UAC file and use of the program files directory.


Also, skyrim modding guides recommend moving steam out of the program file folder due to UAC issues, protected folders, having to run as admin, etc.


So installing to protected folders can cause issues.


So whats a good default non-protected folder to install under?


(multi user) application binaries should go into FOLDERID_ProgramFiles, application data should go into FOLDERID_ProgramData and user files (save games, settings, etc) should go into FOLDERID_LocalAppData.





if you want to support legacy versions of Windows you can use the CSIDL equivalents


If you want non admin users to be able to modify the binaries you should default to FOLDERID_UserProgramFiles (single user installation) Available in Win7 and later, for Vista you can fall back to FOLDERID_LocalAppData and add \Programs or something to the path (You should never ever install multi user binaries in a location where non admins are able to modify them as that compromises the systems security), even if you do single user installation you may still want to share some or all data between users (if you have several gigabytes of levels, artwork, music, etc you probably don't want each user to need their own copy even if they each have their own binaries)