Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

244 Neutral

About Kjansen92

  • Rank
  1. Kjansen92

    Making Machines Learn

    This is a great article, although social norms do not seem to be the 'be-all-end-all' to defining acceptable behavior. Immediately, you notice The Weak Claim stance on machine learning here: the AI models what a person in this position would do. With The Strong Claim, however, the AI IS the person in that position.   Consider, for example, the possibility being that the most winningest players in the game are those with long-term strategies that may be more likely to lose, but win more games per minute played (rather than the amount of risks they took). This may be a divergent behavior. It may be way more likely for a person to use tactical approaches that make sense in the short-term, but overall do not win more games.   In this case, in order to truly be more successful, you would need to be different. In business, successful people are those who MAKE themselves different. Of course, this is different than random decisions made. However, the AI could have an unfathomable amount more data to make this work (think E=mc^2).   Point in case, it would be the knowledge gathered, and generalizations made about the game, rather than mass social acceptance, that would lead to the most successful approach. So, you could, in order to vary the difficulty or style, use machines that GENERALIZE information differently, and organize it more or less efficiently.   Something to consider... The outcome is worth the work, right?
  2. Hello,   Please forgive me if this has been answered too many times before.   I am proficient (according to eLance.com) in c++, openGL, Game Development, Data Structures, OOPS, etc.   How may this translate into a full-time position in the games industry, where I live in a town of about 500 people in Canada? What choices do I have, as far as locating a desired position (on both ends), networking with like-minded people, etc.?   A full-page ad online seems to be very effective in finding freelance work with low barrier-to-entry projects, but I'm not sure if it's worthwhile to spend money marketing my services, and if so, which forums would be valuable to an aspiring game programmer.   If there are any lessons to be learned in this area of programming, I'd gladly take the plunge. It just seems like such a wide area of expertise, with no distinct signs pointing in the right direction for someone with the talent, but no inside info on the industry.   Thank you, Kevin
  3. Hello all!   I've been searching the internet for some time, now, on the topic, and haven't seemed to find anything of value.   The situation at hand, is that I have vectors of objects serialized, using Boost serialization. It works great, and is an effective tool. Although, the larger the files get, the longer they take to load. This is especially painful when you are only looking for a very specific piece (0.001%) of the actual file. What's worse, is that the only way to circumvent it is to have so many different files that it is ridiculous.   What I'd like to do, is, be able to iterate through any container(s) within the file, and load the specific one that I'm looking for.   For example, an object that I am looking for has an ID # of 9289. Then, be able to find the object with that ID # within the file, load it, and use it within my program.   An alternative is to be able to access a known area of the file.   For example, wanting to load the entire 54th vector within the file.   Could somebody please correct me in regards to paragraph #2 here, or lead the way to a better solution?   Thank you in advance, Kevin   
  4. Kjansen92

    Optimizing 2D Tile Map

    Hey Ravyne,   I appreciate the super tips!    Still implementing the compressed folder with all current serialization techniques, while building other functionality comes first right now.   With the rest of the tips offered here, processing speed has decreased multiple times already.   Thank you for all of your help!
  5. Kjansen92

    Optimizing 2D Tile Map

    SeanMiddletich, thank you for your input. All things considered, compression is an obvious benefit in this scenario. I've tested all of the approaches and functions, and it is most definitely the loading from disc.    ServantoftheLord, thank you as well. I would not have imagined that changing strings into binary format would be another approach.   Obviously, I have much to learn about this. Everyone here has given me a wealth of information on the subject, and I've found all of it useful and to be overall a better approach than what I was using. Not only that, it meets all of my optimization goals (even the lofty ones).    Will leave an update after everything is switched over, with time differences, just for reference sake.   Thank again!
  6. Kjansen92

    Optimizing 2D Tile Map

    Servant of the Lord, yes, they are text files, although by using Boost, switching to binary is very simple.   Ravyne, the maps do contain a lot of data. Again the 10,000 tiles in each (I know, an atrocity), as well as all of the objects. One example is a forest map (100 * 100), each containing about 5000 trees. Currently, the whole purpose for the tiles is simply for rendering. If I know which tiles are active, then I can render just the objects within those tiles.   Will look into compressing files, as that is one major question that I had - having a database that will allow loading of files as needed, and at the same time being able to compartmentalize files.    One other direct application of the same functionality was to create a 300 * 300 tile vector in the Action Screen, and passing all of the objects into them. This way, if an AI unit wants to travel from map to map, it won't actually have to load very many objects (just things like buildings and geographical data), in order to determine travel time and long-term pathfinding.   Understanding that this is not comprehensive, I will give you the data here, so you may be able to help me.   Each map, currently, is 170kb, and by removing the Tile portion of each, will reduce that number to about 100kb. Saving objects separately will reduce that very dramatically.   The maps contain a few private integers and a string variable, as well as a private vector of objects. When the map is saved, it clears a global vector of objects, passes it's objects into it, and then serializes all of the data.    The funny thing is that I don't even use tile images yet!   Will change serialization to binary, save objects in a folder separate from the map itself, and implement object passing to the Action Screen Tile vector.   Thank you for your insights. Just with this, the bottleneck will be almost gone, less the need to still load all of the objects of a map.
  7. Hello GameDev community!   How many here have valuable experience with 2D tile maps?   I have a question for you that may be very valuable to any readers of this page, which will give you good opportunity to share your expertise.   The begin, I have what is called here and 'Action Screen,' which loads a matrix of what are called here 'Maps.' Each map is 100 * 100 tiles, which also contain objects (in this implementation).   The Action Screen works great, and allows a player to travel across any number of maps.   The challenge is getting it to save and load maps efficiently. Currently, maps are serialized and deserialized as needed, along with a vector of Tile objects within them.    Rendering and displaying are both very fast. The challenge currently lies in loading the maps from a directory (which takes a lot of time, due to the number of objects within them).   One solution I've considered is to serialize and deserialize tiles individually, which would work very well for loading, but horribly for saving new maps, which contain unique tiles. Also, that is an ungodly amount of individual files.     Is there anyone out there that might have what it takes to field this one, or some relevant resources?     Thanks in advance!
  8. Hello GameDev.net!   I was curious if you excellent people could help me with my current situation..   I'm developing a game that uses a kind of 'Action Screen' concept, with buttons on the right and left side. My map is displayed in the center of the screen.   I'm wanting to know exactly how to display a portion of my map, with world coordinates which are away from my button area.   ex. My left panel is between coordinates (0, 0) and (10, 50), and my right panel is between coordinates (60, 0) and (70, 50).   My map is displayed between coordinates (100, 100) and (400, 400).   What I want to do, is display an 11*11 "tile" area of my map in between the left and right panels.     Is anyone keen on this type of operation?   Thank you.      
  9. Hello,   I am attempting to create save/load functions for my current project, using Boost serialization.   There are a few good tutorials out there, each explaining how to write different objects and STL containers.   The situation is, that most of them won't actually complie.   I get errors when using BOOST_SERIALIZATION_SPLIT_MEMBER(), saying that an explicit type name is missing.   I get many, many other compile errors, which is strange, because I'm using identical IDEs and environment setups while using the tutorial code.   Can anyone point me in the right direction here?   Thank you, Kevin J
  10. Kjansen92

    When to Implement Game Loop

    There are always loops. IMHO, a typical beginner game is often just structured around the game logic with many different loops and many different ways to get input, like this simplified pseudocode: int main() { show_intro(); wait_for_keypress(); // first loop hidden there string answer; while(1) { // next loop that repeats each time a new game is started while(first_scene) { // next loop that repeats in same game state do { // next loop that waits for acceptable input show_question(); answer=input_text(); // loop hidden here to collect chars } while(!text_validated(answer)); do_something_with(answer); show_something(); int number; do { // next loop that waits for acceptable input in a different way show_question(); number=input_number(); // loop hidden here to collect chars and only let numerals through to convert them } while(!number_validated(number,lower_bound,higher_bound)); // many more loops here } // many more loops here } show_end(); wait_for_keypress(); // another loop hidden here } Then sometime later they hear about the game loop and hopefully do the mental leap to realize its just a simplification, by turning this mess inside out, cutting out all those hidden repetitions of slightly modified output, input, validations, loops and replacing it with just one loop and some conditionals inside.   Yes, although, one other implementation could last forever. This does not make it a game loop any more than RPG Maker makes a game.   The purpose of a loop is vital and easy to understand.    It's the input/output of human energy consumption to anomalies in the creative approaches - that should be utilized to make practice that one notch better - that is valid information to explore objectively.   I don't care if the code hardly works, and I have no idea how to fix it yet. What's relevant is that those avenues are being explored, while being subjective to rigidity of code. 
  11. Kjansen92

    When to Implement Game Loop

      You could always pass a function and check for functionality. As long as your features work seamlessly, you could create a tutorial loop (such as, mentioned above) which allows active responding to game elements until that loop ends.    With a standard loop like the one above, it would maintain forever the end desired game formula.    Objectively, with a tutorial-type loop, you could actively test different parts of your game and improve them, without structuring game schematics.   Why else would I build anything other than to learn and produce? 
  12. Hello,   I am primarily using openGL for anything graphics-related. I've discovered SDL 2.0, which will open a window for me, and works great!    ...But my situation is that I've done everything so far in openGL, and don't know how to turn my previous code into an SDL window.   What I mean is, going from this:   mainLoop(); glutInit(&argc, argv);                 // Initialize GLUT glutInitDisplayMode(GLUT_DOUBLE); glutCreateWindow("OpenGL Setup Test"); // Create a window with the given title glutInitWindowSize(800, 1200);   // Set the window's initial width & height glutInitWindowPosition(50, 50); // Position the window's initial top-left corner glutDisplayFunc(display); // Register display callback handler for window re-paint glutReshapeFunc(reshape); glutIdleFunc(idle); initGL(); glutMouseFunc(myMouseMap); glutPassiveMotionFunc(myMouseMotion); glutMainLoop();           // Enter the event-processing loop   To an SDL window instead.   I can create an SDL window, and understand that. But I don't know how to still program in openGL (primarily), and run it through an SDL screen.   My rationale for doing this is so that I can use fonts and text display that are available with SDL.      Thank you in advance, and I hope this helps somebody,   Keviin Jhansen
  13. Here is the basic operation. I know that within my program, the string values are correct, as I can get a std::cout output of them.   This is a very simplified version, although I'm more interested in finding a correct library to work with, or more intelligent way of going about this, than getting my code to run the way it is.   class Object { public: Object(string s) {        name = s; } ~Object() {} string getName() {        return name; } private: string name; };   **** This is within the openGL display() function displayInfo   int main() { Object object = Object("Freedom"); }   void drawText(const string &name, GLdouble x, GLdouble y) {        glColor3f(1.0, 0.0, 0.0);          glRasterPos2f(x, y);        for (int i = 0; i < name.size(); ++i)        {                glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, name);        } }   void displayInfo() {        drawText(object.getName(), 10.0, 10.0); }   **edited main function ** did not include any of the openGL initializations. **
  14. No, both of those work, but only if the string is written that way within the function.   What I want is to be able to access string variables - particularly as private members of objects.
  15. Thank you Bob,   Although it still does not display anything unless I explicitly send an unsigned char *, such as "Hello Bob!"   For some reason, a stored string variable will not display in this way. 
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!