Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olof Hedman

Member Since 24 Aug 2011
Offline Last Active Yesterday, 03:28 PM

#5302447 What Makes A Game Look Realistic?

Posted by Olof Hedman on 25 July 2016 - 04:32 AM

Adaptive animation is another of the current frontiers that builds on realism. After that, probably AI/Behavior that results in more than a simple choice between pre-canned responses that are blended at best -- something more natural than that will be needed to cross the uncanny valley once we reach realistic-appearing humans in real-time..


+1 on mentioning animation. It's too often overlooked. Maybe we shouldn't talk about "photorealism" but "movie-realism".


On that note, lighting is not only about bouncing in the world, but also how light interacts with a camera.

#5300036 Finding that balance between optimization and legibility.

Posted by Olof Hedman on 10 July 2016 - 03:34 PM

I wonder what would Michael Abrash say...

Qouting carmack: "In almost all cases, code duplication is a greater evil than whatever second order problems arise from functions being called in different circumstances, so I would rarely advocate duplicating code to avoid a function"

#5296798 Space filling curves for 'concentric' flood filling?

Posted by Olof Hedman on 16 June 2016 - 06:28 AM

You might want to look into n-ary Gray codes  https://en.wikipedia.org/wiki/Gray_code#Special_types_of_Gray_codes


They define a hamiltonian path, which is what you are looking for


(3 bit binary gray code is a hamiltonian path of a cube, but if you want to fill further, you need 3 digits with higher values)

#5296788 optional perma-death mode?

Posted by Olof Hedman on 16 June 2016 - 03:54 AM

Having an option to create a new game with "perma death" enabled would be quite easy to implement, it fits very well with fpsrpg:s of almost any kind, (specially survival-type) and there is definitely a target audience that would enjoy it, while there is little chance players that don't like it would enable it "by mistake" and not enjoy your game because of it.


So I think the question should be "why not implement it?" :)


(I also think having at as an option that could be turned off mid-game defeats the whole idea of perma-death, so I doubt players who like perma-death would enjoy it, and players who don't like perma-death wouldn't enjoy it either)

#5296443 SDL+Qt for a devoloping a game engine

Posted by Olof Hedman on 14 June 2016 - 02:09 AM

I don"t intend to mix them in the same window. I thought of letting Qt handle the interface of the engine which ,depending on the modifciations done by the user, will generate an SDL code which will be compiled and executed externally (not in the same window as the engine). I hope it's clear



Not clear at all unfortunately..

When you say "the interface of the engine", do you maybe mean an editor, like Unity and Unreal Engine has?

If you do, I think that is the source of the confusion. I think most here assumed you meant the game's UI would be Qt based.


The editor is just an editor. It might use the engine to show a preview of the content, but it isn't the interface of the engine.

It's a tool to build games that are using the engine.


Technically, the interface of the engine would be the programming API.


And the user interface (of the game) might be part of the engine, or use the engine, but the engine could also not bother about UI at all, and you build the UI using separate tools.

#5296311 When you were starting out...

Posted by Olof Hedman on 13 June 2016 - 05:12 AM

Don't worry about it. It's impossible to know and remember everything, reading the documentation and other technical books is totally normal, and something you will do often, regardless of for how long you have been programming.


The way to make the knowledge your own is to use it, that is, just keep coding.


Continue to solve problems and get experience, and be more concerned with the broad strokes of how to solve problems and how computers and programming work in general, instead of with details like what parameters to send to a specific function in some API.

Then use documentation for the details of APIs and how to work with the platform and language you happen to have to use right now.


It's normal to have the documentation always at hand.

#5294145 responsiveness of main game loop designs

Posted by Olof Hedman on 30 May 2016 - 07:05 AM

>> There should also get to be one human player for every core involved, or else the computer is ganging up on the player.


only if you program the AI to do so. having the AI gang up on the player is the oldest form of "cheating" there is.


there are two kinds of games, those that provide a level playing field - and everything else.



I'm pretty sure he was joking.... 

Which makes me wonder what you are talking about.




just cause you can only draw the screen once every 8 games turns doesn't mean you should let the computer move every turn and only let the user move every 8 game turns.



What do you mean with this? updates and frames is not the same thing as game turns... So this doesn't really make sense to me.. Is the computer "cheating" if the framerate is too high?

#5293923 New Cryengine/Unity/Unreal 3rd/2nd/1st person shooter

Posted by Olof Hedman on 28 May 2016 - 07:02 AM

Pretty certain it's a joke. Even the fact that he puts great but old games like Crusader no remorse on there indicates that he's older, and shouldn't be inexperienced enough to suggest this seriously.


You're probably right :)

That reference to Infinite Detail at the end is kindof a giveaway too.

#5293911 New Cryengine/Unity/Unreal 3rd/2nd/1st person shooter

Posted by Olof Hedman on 28 May 2016 - 05:18 AM

" Ie there must be no possible way to condense the experience down to words that would accurately describe how amazing the experience of playing the game itself is"


Sounds like a marketing nightmare :)
So basically, you want to make a game that incorporate every game feature you have enjoyed from 15-20 years of gaming?


" i know that all these concepts work, because they have all been done before in one way or another,"


That doesn't mean they all work together, in the same game though...
I don't think choice of engine is really your main problem at the moment, first you need to focus a bit and try to make an estimate on how much time it would take to do all these features.
As a good baseline, you could look at the amount of people involved in, and the time it took, to implement all those games you are referencing.
You could almost add all those people and time up straight, because even though there is some overlapping work, there is also a lot of extra work to get everything to work as a whole.
A game isn't just a big list of features, the hard part is making it all fit together, without overwhelming the player, and also getting them all done in reasonable time and money spend.
Even if all your workers would be volonteers, they still need to eat, live and enjoy life, in the meantime.

#5293906 responsiveness of main game loop designs

Posted by Olof Hedman on 28 May 2016 - 03:44 AM


Human high-level conscious thought, by latest research, only updates at approx 5Hz :lol: 




Even though human high-level conscious thought might update at 5Hz, conscious thought is not where most gaming that need high framerate takes place.


Which is a reason we do notice the difference with framerates as high as 144Hz.


Very interesting discussion in this thread, just had to comment on this detail :)

(even though it's probably obvious to most people here)

#5293735 TinyXML2 Segfault.

Posted by Olof Hedman on 27 May 2016 - 01:26 AM

 Anyone know how to prevent the segfault caused by TinyXML2 when using FirstChildElement?


While it certainly is possible there is a bug in the version of TinyXML2 you are using, it is more likely something else in either your usage of it, or something unrelated in your program destroying the state for TinyXML causing it to crash. (maybe because of a buffer overrun or invalid pointer, writing in memory it shouldn't write in, or just some mistake in usage of the API)


To  know which of the possibilities is true, you need to debug the problem more.

Why exactly is FirstChildElement crashing? nullptrs? does the state look ok?

If some internal variable in TinyXML is broken, maybe put a watch on it before it breaks and see who changes it.


You should be able to loop through your document as many times as you please without it crashing.

So something is obviously going wrong, but more investigation is needed to know what.

#5293340 why i don't get the HBITMAP from file\resource?

Posted by Olof Hedman on 25 May 2016 - 06:47 AM

FindResource finds a resource of the type you specify.

It can find any type of resource, so it will find your resource of type "bmp"


LoadBitmap looks for a resource of type "BITMAP", and will ignore all resources of other types, so it will not find the resource.

#5293048 c++: sprintf but return chars. Possible?

Posted by Olof Hedman on 23 May 2016 - 07:11 AM

If we reinvent std::string, you can get half way there :P


Or, you could just ignore the extra copy and just use std::string.

Here's a c++11 templated version I'm using.

template<class... Args >
std::string makeString(const char* format, Args&&... args) {
  char buffer[256];
  int len = snprintf(buffer, 256, format, std::forward<Args>(args)...);
  if(len >= 256) {
    // if string is too long, try again with a bigger buffer
    char buffer[len + 1];
    snprintf(buffer, len + 1, format, std::forward<Args>(args)...);
    return buffer;
  return buffer;





Edit: Hmm. Maybe I should read the topic more carefully before answering. Oh well, I'll leave this here anyway. Back to work and getting stuff compiling I guess...

#5291440 Android development best tool

Posted by Olof Hedman on 13 May 2016 - 12:10 PM

There is both preference and some technical reasons to choose either.


Only Android Studio is the official one now, and both a lot of the documentation is AS focused, and most of the current samples are AS.

Sometimes you have to put in a bit extra work to get stuff working with Eclipse.


I use Eclipse, or rather, the command line ant build system that comes with it and the Android plugin, because I found it to work better with the NDK at the time.

And now I'm used to it... 


Can't say I'm happy with it though :)

Really wish for proper well supported NDK development, in whatever editor.

If it has a good integrated well working debugger, I will definitely use it. (Maybe AS will have it some day...)

#5290800 Colorimetry: Violet

Posted by Olof Hedman on 09 May 2016 - 08:31 AM


Wouldn't that mean that in RGB to see violet we would need values of R40%, G40%, B90% ?

(while in reality violete is more like R40%, G0%, B60%)



RGB really has quite little to do with the peak of the response curves, it is just a simplification that covers the perceivable color spectra reasonably good.

Both the "red" and the "green" cones are quite close to each other, and most of the colors they are sensitive to is really in the "green" to "greenish yellow" part (very useful if you live in the woods)

A surprisingly big percentage of the human population can't even see the difference between red and green, they only have one type of cone in this part of the spectra.


Seeing red is of course very beneficial to spot ripe fruit in said woods, but it seems you can do well without it.