Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olof Hedman

Member Since 24 Aug 2011
Offline Last Active Yesterday, 02:39 AM

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

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

#5289862 Hiding Company Nationality

Posted by Olof Hedman on 03 May 2016 - 03:49 AM

Ok, hiding your nationality could matter if you want to market yourself in a region who happens to be bigoted against your nationality.

(regardless if you are a US guy selling in Russia, or a Pakistani selling in India)

I guess that might be a bigger or smaller problem depending on what nationality you have...


But when you sell your game in literally every single country in the world (yes, even that tiny African country), this fixation with nationality just seems curious and outdated... I'm sure most people in the industry just don't care, they are used to working with people from all over the world in different capacities.


So that's why they don't show a huge flag and whatever national animal they like on their front page, they just write "Here is our software", and if anyone really cares (like they want to visit or something) you can just check the "about us" page and see an address, or check company registration, or just ask...

#5289711 Hiding Company Nationality

Posted by Olof Hedman on 02 May 2016 - 06:03 AM

Do you think the nationality of the developer can affect the initial perceived quality of a piece of software?


I'm sure it _can_.

In most cases though, the nationality of the developer is totally irrelevant, and not something the end user cares about.

I'm sure most gamers doesn't even know the name of the developer of many of the games they play. (or they think the game developer is named "EA")

#5288888 what is meant by Gameplay?

Posted by Olof Hedman on 27 April 2016 - 02:54 AM


Not necessarily -- its true that many scripting languages are compact or have features (e.g. actor-model, prototypal inheritance model) that lend themselves to scripting game entities and game interactions, but that does not mean that writing gameplay code in C++ has to more difficult or more verbose for the people "scripting" the gameplay elements, albeit in C++.


Many custom scripting languages are basically just stripped down C-syntax anyway.  :)


There is no reason you _have_ to use a scripting language.


From my view, as a small scale developer with our own engine, I've always seen adding a scripting language as just unnecessary extra work and more stuff to maintain.

Our engine needs a proper C++ API anyhow, so why spend the extra work adding another API, which most likely will just be a subset of the engines true capabilities.


Also increases the work to add new features.

Plus you have an extra layer of code that can introduce bugs, while it also often makes debugging harder.

And when you try to push the boundaries of what the scripting language is capable of, it can get messy...


I imagine the cost-benefit will be better in a larger organisation where you have a lot of people that need to implement game specific stuff, and you also have a support organisation to keep the scripting language with enough features and debugging tools to be useful.


With just a few people, where everyone is part engine part game implementers, and everyone already know C++ well, there is little reason to use a scripting language.