Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Oct 2011
Offline Last Active Oct 22 2014 04:51 PM

Topics I've Started

Declaring std::String Causing Segfault

26 August 2014 - 10:55 AM

I have a project in Code::Blocks to practice my SDL. For some reason something as simple as this:

string stringname;


is causing a segfault for me. I don't ever recall having an issue where declaring a string caused this.


I generated an all new console project to test this:

#include <iostream>
#include <string>
using namespace std;
using std::string;
int main()
    std::string helloworld = "hello world";
    cout << helloworld << endl;
    return 0;


This has the same issue. Am I just missing something obvious?

My Own Game Feels Worse Than It Is

04 March 2014 - 08:33 AM

Since I'm weird and like games in genres that tend to be unpopular, well its gotten better lately, I learned how to program and got to work on an open source game engine. I made relatively good progress on the programming part, but everytime I started to add the content it got dull. Part of this was that editing XML files is dull as hell. But the main problem is that it was my own personal project.


A good comparison would be Banished. Because he wrote the engine from scratch the dev ended up not adding as much content as people wanted. The gameplay is relatively simple, but still fun. Now, on a technical level Banished is way better than anything I could program, I simply lack the experience to do a lot of things that dev can do. But that's not the main issue. I got mediumly far into setting up the basic city builder economy. Its currently about the level of Banished in depth/complexity/stuff you can make, somewhat modified by lacking the technical skills to do certain stuff. But whereas I could play Banished for quite a while, maybe 20 hours so far, I can't get excited at my work at all, even though it arguably has more stuff to do, and will have even more if I can get my self to work on it, since I saved time by using an existing engine. Even though there's arguably no reason for this feeling, I can't get over it. The only thing I can think of is that knowing exactly how stuff works sort of dulls my enthusiasm.


This happens to me somewhat in modding games as well. In EU4 my mods are always just a little less fun than vanilla, except the parts that are vanilla. Making my own events and nations and idea groups, even when I resist the urge to make them too powerful, does not produce the experience I would expect.


Does this ever happen to anyone else? I get fired up by an idea and make it happen and then its just meh, even if I can have fun playing someone else's game that is similar or even lower quality.


Is there a term for liking your own games less than other people's?

More Bad News For Free To Play

28 August 2013 - 07:43 PM



Its looks like all that dopamine pumping that many free to play developers are trying to do may be less benevolent than previously believed. Compulsion is different from enjoyment after all.

Event System and GUI Interaction

10 August 2013 - 09:05 PM

So I am working on adding an event system, basically, triggers, possibly choices which generate different results, sometimes only one result. I want to generate a window that lets you make choices.


Due to the gui system in place and my lack of experience in the area its not as pretty as I would like, basically it just uses the same style as the rest of the GUI.


However that's just a graphics issue which I don't care about.


What I need to know is how to handle windows if multiple events trigger at once. I want the game to pause so players can pick choices and because obviously having a big GUI item in the middle of the screen will ruin their view of the game.


So I have a few thoughts and am trying to figure out what is best:

Store multiple events and then push one to the window which becomes visible if there are 1 or more events and doesn't exist otherwise.


Have each event spawn its own window, like a Paradox game does.


I feel like popping up a ton of windows might be slower, but its also more user friendly in a sense. I dunno. I haven't done this kind of GUI thing before.

Multi-threaded AI

23 July 2013 - 09:37 PM

So I am working on various strategy game stuff and I tried to figure out how to use multiple cores to speed up my game. From what I gathered the best way to use threads is to run a single main thread and pass off tasks from the same subsystem rather than splitting off each subsystem into a thread.


Like I run this:






Sequentially and get my performance from having each step use as many cores as the system has available. So during the AI step I would assign a main AI thread that would make high level decisions and then spin off low level tasks in a hierarchy to separate threads/cores.


I was given to understand that this method scales better than separate threads for subsystems. For instance a particle engine has a ton of tasks its can run separately and you can pretty much split them up arbitrarily. So you look at the number of cores available and split the tasks more or less evenly among them and if you have more cores to use you just split the tasks so each core does less.


Is that the best way to use multi-threading? Do I have something wrong? I understand that advice can really only be general since you don't have detailed information on my project.