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

#5114373 Writing a small dodge game in Elm [Video Tutorial]

Posted by on 04 December 2013 - 01:28 PM

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: https://github.com/GoranM/bluepill

#5113385 [Video Tutorial] Arkanoid in 160 lines - C++11 + SFML2

Posted by on 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)){


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)
void SomeType::update(){
    if (mHitObjects.contains(something))




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.

#5113312 Need help with GitHub...

Posted by on 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.

#5104717 New to programming and need help with python/pygame graphics.

Posted by on 26 October 2013 - 11:39 PM

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

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

Posted by on 26 October 2013 - 11:34 PM

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

#5102506 Tracking and moving Columns of Objects

Posted by on 18 October 2013 - 04:41 PM

Here's a small video that explains one possible algorithm:






Python demo (your mechanics, replicated, with the added feature): https://gist.github.com/GoranM/7049155#file-columnsquish-py

C demo (just the horizontal squish, in ASCII): https://gist.github.com/GoranM/7049155#file-columnsquish-c


Hope that helps.

#5100660 2D Oriented Game Engines

Posted by on 11 October 2013 - 05:52 PM

You can make 2D games with 3D engines. Actually, that would probably give you a little more flexibility.


SFML seems popular?


SFML is a media library, not a game engine.

#5098783 texturing a cylinder with multiple texture.

Posted by on 04 October 2013 - 11:40 AM

Well, you need to properly "unwrap" your geometry, so that things align properly.


Search for "UV unwrapping", and you should find relevant information.

#5098778 Super Cross Platform C# game engine.

Posted by on 04 October 2013 - 11:23 AM

I don't think that "Super Cross Platform" is the killer feature.


Naturally, I can only speak for myself, but I would much rather have a tool that helps me make better games, with less effort. That would be my core concentration. The "cross platform" part is just a bonus, and even then, there's only a few platforms that I really care about, so it's not really a big problem.


It's definitely possible to compete with Unity, but I think you'll have to do more than simply provide existing features for a lower price; You'll need to make a better development tool.

#5098214 About separating game logic from rendering

Posted by on 02 October 2013 - 01:07 AM

Each entity should have a set of standard structures that encode the visual appearance of the object. The renderer can simply use that data to draw.


I would have an Entity with pointers to Transform, Mesh and Material, so that's all the renderer needs to know about.

#5097483 How to get motivated to learn Programming?

Posted by on 28 September 2013 - 01:33 PM

I created a video tutorial series that covers the development of a small memory match game:



It's done in Python, but the overall concepts are essentially the same, no matter the language; I prefer Python because it's modern, cross-platform and well supported.


So, you might find that helpful.


As for 1 on 1 help: I offer tutoring services -> http://www.nilunder.com/tutoring

#5097277 OpenGL and Spritesheets (2D game)

Posted by on 27 September 2013 - 12:02 PM

It's better for performance to use a single texture for multiple objects. The industry term is "texture atlas".

#5096716 Not sure whether to do CS or Engineering (Double Degree)

Posted by on 25 September 2013 - 11:02 AM

If you really like programming, a CS degree won't hurt you.


However, for a job, you just need to be really, really good. If you're not, a degree won't help.

#5096715 Stationary FPS/Dungeon Crawler Programming Burden

Posted by on 25 September 2013 - 10:55 AM

What is the level of graphical fidelity that you expect to have in game? You should focus on something graphically simple.


Whether or not it can be done within 6 months depends on the people involved, and their abilities, but as a programmer, I think it's something that I could craft with relative ease (it just sounds like a relatively straightforward RPG engine).


Although, I generally wouldn't want to work on anything that tries to emulate a AAA title. When someone describes their game idea in that way - like <popular thing> but with <gimmick> - it tends to fail.

#5095986 Which game engine should I choose?

Posted by on 22 September 2013 - 12:54 PM

As implied by Kaptein, you want to start simple.


I have a video tutorial series that covers the development of a small memory match game, which starts out as a simple command line program, but is later evolved to include graphics.


Regarding game engines: There's plenty to choose from, but in general, the tools don't matter as much as the developer - If you know what you're doing, and have some creativity, you can make interesting games with less than perfect tools (or tools that you develop yourself).