Advertisement Jump to content
  • Advertisement

Goran Milovanovic

  • Content Count

  • Joined

  • Last visited

Community Reputation

1104 Excellent

About Goran Milovanovic

  • Rank
  1. Well, I can get a pretty decent score (as one would expect, from the developer ), but I'm told it's quite difficult.     Give it a try:
  2. Goran Milovanovic

    That first game, where should you start?

    As a beginner, you should endeavor to make something fairly simple first, like tetris, or breakout. Trying to produce anything more complex is akin to jumping into quicksand - you'll never manage to crawl out.   In the beginning, even a simple game will take quite some time to finish, but once you finish it, you'll have a very clear picture of the difficulty involved, and you'll be able to move forward in the right direction, as opposed to drifting aimlessly for years.   In short: start small.     Programming is pretty fundamental to video games. So, if you want to make games, you'll either have to learn how to program, or partner up with a programmer.   Which is easier depends on your circumstances, and your personality type, but there's definitely more leverage in knowing how to program.
  3. I you're interested in developing a small browser game, using a functional language, you may find this helpful:     You can find (and play) the complete game here:
  4. Good work.   Here are my thoughts:   "testCollision" is a very poor name for a function that does much more: You're not just testing if a collision occurred; You're modifying game state, and this should be reflected in the function name.   I would decompose collision detection from actual response:   if (intersects(a, b)){     a.hit(b);     b.hit(a); }   Or, maybe even better: provide all relevant objects with a list of collision partners, which they can then inspect, and act on, in their update method:   for (auto& obj : objects)     obj.updateHitObjects(objects);   void SomeType::update(){     if (mHitObjects.contains(something))         doWhatever(); }   ---   The erase + remove_if + lambda combo used to remove destroyed bricks is a good showcase of new C++ 11 features, but I think you overstate the performance aspect: At most, you can remove 3 bricks at the same time (and that would be an extremely rare event), so the "block remove" optimization features offered by erase are basically irrelevant here.   ---   The whole "frame time" segment should have been left out, in my opinion, because, as you yourself explained, it leads to a pretty absurd situation, where a slower machine has to do more work, so ... Is that really a solution?   Something like continuous collision detection would probably do the trick, but it might be too involved to cover.   Otherwise, I think this "problem" should be relegated to "minimum system requirements". ;)   ---   I don't see the point of replacing the content of main with Game::run. That seems like needless indirection.   It's good to have a Game structure that encapsulates your gamestate, but there's no reason why your high-level flow can't stay in main.
  5. Goran Milovanovic

    Functional reactive programming?

    FRP has tremendous promise, but it takes some time to actually understand in detail.   It helps to use a language like Elm, which was designed with FRP concepts from the outset, as a core part of a language (not just a library).   Actually, I'm currently working on a video tutorial series for Elm, if anyone is interested.
  6. Goran Milovanovic

    Need help with GitHub...

    Git does keep a hidden directory called .git, where the "version tree" is stored, but you don't really have to worry about this.   The easiest method to get something into your github account is to create the initial repository on github, clone it to your machine, put your files into the cloned directory, commit them, and then do a git push.   If you search youtube for a git/github tutorial, you'll find videos that explain this in detail.   There are also mini-instructions printed when you create a new repo on github, and depending on your previous experience with git, that may be enough to get you started.
  7. Goran Milovanovic

    glortho function - assistance required...

    Try:   GLfloat x = w / 2; GLfloat y = h / 2; glOrtho(-x, x, -y, y, -1.0f, 1.0f);   Scaling the projection matrix will scale everything in the scene. If you just want to scale a specific object, you should do so by scaling its world transform matrix.   ... Is the example small enough to post somewhere? That would help.
  8. Remove all objects in the first scene, and then add all the objects in the second scene. This would effectively put you in "scene 2", assuming that all your game logic runs on the objects themselves.   Beyond that, you should research simple state machines.   PS: Blender actually comes with an internal game engine, so you might want to give that a try (google Blender Game Engine).
  9. Goran Milovanovic

    C++ Roguelike - Clearing a defeated Monster off the map

    You replace 'x' with a blank character in your Map array ... Assuming that this is the extent of your model, and there's no additional structure that represents the "Monster" and related data (in which case you would probably want to delete that).
  10. Goran Milovanovic

    Tracking and moving Columns of Objects

    I show the code at 4:02, so you can see it there (or you can just click the links, and read it).    It's a recursive approach (to facilitate animation between steps), using an array of rows as a base data structure. I didn't really care much about performance, but if I did, I would use an array of columns, so I could just do a memory move on an array of pointers, to "shift" the columns to the right, instead of swapping all the elements.   So, my "performance minded" implementation would look like this:     I don't see how a hash-map (a more complex data structure) would be more efficient in this context; direct array access is faster than having to go through the hash function, as far as I know.   Could you show me a quick code example? I probably misunderstood your algorithm.
  11. Goran Milovanovic

    Tracking and moving Columns of Objects

    Here's a small video that explains one possible algorithm:       Code:   Python demo (your mechanics, replicated, with the added feature): C demo (just the horizontal squish, in ASCII):   Hope that helps.
  12. Goran Milovanovic

    Python and online games

    You can build games with Python, but you can't post them on the web, as you would a Flash game.   ... Well, at least not yet, but there are efforts to compile Python (and other languages) to a JavaScript subset; I'm thinking of things like Emscripten.
  13. Goran Milovanovic

    Tile Map Collision - TileData vs. Colliders

    I don't know, but I think you should implement the most straightforward algorithm you can think of, and if that performs well, then you can consider that to be the best solution.   I reason that software development is largely about managing complexity, so try to introduce as little as you possibly can, while satisfying the specification in question.
  14. Goran Milovanovic

    2D Oriented Game Engines

    You can make 2D games with 3D engines. Actually, that would probably give you a little more flexibility.     SFML is a media library, not a game engine.
  15. Goran Milovanovic

    How could I start game coding?

    Programming tutorials can be helpful.   I have a series that you can try:     Beyond that, it's just a matter of passion, practice, and patience.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!