Jump to content

  • Log In with Google      Sign In   
  • Create Account


Goran Milovanovic

Member Since 16 May 2012
Offline Last Active Aug 04 2014 07:37 AM

Posts I've Made

In Topic: That first game, where should you start?

04 March 2014 - 02:22 PM

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.

 


I would rather not program if I can help it

 

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.


In Topic: [Video Tutorial] Arkanoid in 160 lines - C++11 + SFML2

30 November 2013 - 06:26 PM

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.


In Topic: Functional reactive programming?

30 November 2013 - 02:11 PM

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.


In Topic: Need help with GitHub...

30 November 2013 - 01:05 PM

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.


In Topic: glortho function - assistance required...

26 October 2013 - 11:50 PM

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.


PARTNERS