Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Jan 2011
Online Last Active Today, 02:07 PM

#5314354 Visualize points as spheres

Posted by on 08 October 2016 - 01:33 PM

Well if you want spheres you could use instancing and draw those sphere in big chunks(or in one chunk depends on your case).
Otherwise if it is suitable for you you could draw them as points. Both OpenGL and D3D support drawing directly points on the screen with customizable size.


@work we've simulate particles and in order to draw a preview of those particle we just draw them as points(GL_POINTS or D3D11_PRIMITIVE_TOPOLOGY_POINTLIST) and give the user an integer that specifies the size of those points. It works like a charm.

#5314088 PBR Sanity Check (Black Metal)

Posted by on 06 October 2016 - 02:19 AM


"PBR Sanity Check (Black Metal)"


#5313043 the very best resources I found for game programming

Posted by on 28 September 2016 - 09:37 AM

Also keep in mind that we've all been there (I mean at the start where you get a bazilion different opinions). So just pick something a start learning. it seems like a big deal now, but your 1st language isn't that important, when gain a bit of experience you will learn new languages pretty fast, and you will be able to understand different APIs(for the same thing) super fast.


Doing something is always better than doing nothing.

Just do not learn in isolation. Ask questions when you need to.


if you like python go Python, if you like Swift go with Swift ect..
In my case my 1st language was Javascript, after 3 months I've switched to C++. Now at work 95% of the code I write is in C++, but I also write code in Python, C#, Php, and other small languages. I write both code for D3D, GL and other APIs.

#5312874 Coding-Style Poll

Posted by on 27 September 2016 - 10:54 AM

@work we write code exactly the opposite way that I was used to. I really hated it, but I kind of adapted over time.



@home the braces are always alone on a new line

@work the braces are always on the same line with if/else/ect. keyword without (usually without a space)


I think this is not that important, as long as the code is readable, to be hones @work I sometimes come across a code that is just bananas and it's looking like a dense block of logic that is hard to read, but that the same time, @home style braces sometimes make the code to be too long. 

So final verdict, I'm fine with both. Mixing them is not a big deal for seaching in code (at least in my code and the code at work)




members prefix:
@home - for non "structs" (I think of struct for something that easily behaves like an int) no prefix, for all "classes" m_ prefix is a must.

@work - all prefixes are forbidden.


Well I hate no prefixes, it is a bit harder to search in code, it's harder to read, and shadowing arguments happens. I do not like it, but I can do my job with it. (this is pretty annoying)


class name prefix - I put prefixes if there isn't a namespace for that project. the prefix is something abbreviation of the project's name.


@work using underscore is forbidden for all identifiers - I really hate it as i cannot make things a bit more readable and when I need a new function that is used as a substep i like to do the following thing:
void DooFoo():

// These are intended to simplify the code in DooFoo, they I introduced only if there is no way to make them general purpose

void DooFoo_Dothing1();

void DooFoo_Dothing2();

I Can still do that but the underscore is some kind of "implicitly descriptive", at least for me.


I'm always adapting to the style of the project, it is cleaner, doesn't make the code *feel hevy* and it is searching friendly.



Other things that I do:
Methods names that are usually commonly used (like Create, Initialize) should be suffixed with the class name like so:
struct Texture { void CreateTexture(); }
struct Buffer { void CreateBuffer(); }


I do this in order to simplify code searching.

#5311383 Why do most people recommend Python

Posted by on 19 September 2016 - 06:38 AM

Yes, I am talking about Swift...

I some parts of the world it is pretty hard to find a person who has an Apple computer. My first encounter was at 1st job in the summer of 2012, we had a few VMs with some sort of MacOS(or was it called OSx), not sure. At my current job we have a few Apple desktops, but we use them only for debugging if needed. Otherwise I do not know anybody who has Apple PC/Laptop as home.

#5307379 Easy way to get static AABB for animated model

Posted by on 23 August 2016 - 06:44 AM

if you have a simple collision mesh for your model,

yeah but often that collision mesh is thinner compared to the actual model.

#5307280 Easy way to get static AABB for animated model

Posted by on 22 August 2016 - 04:09 PM

one lazy thing is to create a "worst case AABB" in the scene and use that. Otherwise I think that performing the skinning is the only solution that assimg offers(correct me if I'm wrong).

Usually the lazy solution is good enough.

#5307069 Preventing overengeneering

Posted by on 21 August 2016 - 02:34 PM

While I'm at work I do not have this problem, but for some reason while I'm at home I just keep geoengineering things a lot.. let me put that in a perspective,

I worked as a game programmer for 1 year, during that time I worked on the UI and gameplay. The UI was done in an Embedded Flash and C++, the gameplay was i"mplemented" in Excel Spreadsheets and C++. I did exactly what I was asked for, I'm confident that i've deviled and everyone was on the team was satisfied with my work including me.

Later for some reason i've decided to change my job (i had 1 year of professional experience in total at that moment). My new job is to write plugins and tools (usually for 3ds Max and Maya) for 3D rendering(file IO, talking to other plugins, UI, scene conversion tool like that, almost nothing around the actual rendering).



At home I'm developing that mini-game engine that I lie to myself that is for educational purposes only, but deep inside me I really hope to quit my job one day and develop a game on my own(probably with that engine that i currently write). The problem is that It has been 3 years of writing after work and during the weekend (while mixing real life).

The development goes extremely slow. For those 3 years I wrote:
- D3D11/OpenGL3+ - wrapper that misses some features

- A shading language (Vertex and Pixel shaders only) that translates to HLSL/GLSL @ feature level of ~ShaderModel 2.

- A flexible 3D models file format with import export. (and a small CPU skinning for that)
- a bunch of other small things (base64, DDS texture IO, Linux support maintaining).


And that's it for 3 years of work. It's just too slow and currently I blame over engineering:

Let me give you and example: for the last ~2 months I'm trying to design and program:
- a general purpose "entity system" (just a small set of features that i think are need my most of the games).
- a basic editor around that "entity system". an example would be a world editor, value tweakers.

- a Undo/Redo system for that editor.

That thing above itself is complex enough for me, but additionally I'm carrying the burden of over engendering. I'm going to give my most renascent example:

IF TL;DR start here:


For my level editor nodes I've implemented a very small structure:

struct Node
   string name;
   std::map<string, int> int_attributes;
   std::map<string, float> float_attributes.

I imagine that everything on the level is going to be represented by that stricture in the editor(the game would have a different implementation). So far so good, but I remembered that for the 3D Models file format I've implemented a class that holds an "animated value" :

struct Parameter
   int data_type; // int float, vec3f ect...
   void* default_data;
   std::vector<animated> data; // basically a set of [animation name, {key-values}]

So literally after 5 seconds I've decided that I must use that stricture for the level editor as I may want in the future to have animated parameters for my game objects! But as I think about it how often do you have animated values for your game objects.. Using that "Parameter"

 class will sure make thing a bit more flexible, but the code is going to be a bit more complicated and slower(well 3ds Max and Maya aren't that slow and their implementation of ParamBlocks and Attributes is a lot more complicated than mine).  And basically I cannot decide. My lack of experience is playing thick on me.


Now imagine doing this ON EVERYTHING YOU WRITE! I literally do it....


In addition to that i needed ~3 weeks to come up with an idea how to implement those features together (I have 0 lines of code on the topic so far), this itself made me super lazy, because the task seems really hard and for some reason I stayed away form Visual Studio and instead I wasted my time playing WoW.

Now I finally somehow recovered form that laziness, but I'm hitting that over engeneering wall...

So my questions are:

 - How do you handle complex task and avoid laziness and lack of motivation?
 - How do you deal with over engineering?

 - Do you think that an average programmer would do more for those 3 years?

 - Any thing you wanna add? personal experience and suggestions.

Sorry for the long post and my bad grimmer and spelling, here is a <potato>.


#5304156 Ide For Linux

Posted by on 05 August 2016 - 04:55 AM

I use Code::Blocks, currently trying out Visual Studio Code(not an IDE but has a decently working debugging interface). I've also tried Codelite - it is awesome, except when it crashes(happens 4-5 times a day), otherwise I love it.

NOTE: I usually work under Windows, so my opinion is no the best.


Not sure if you can use Cmake with it, but all other requirements should be fullfilled with this combination

Partialy - CMake supports projects that are not in a child directroy, while Ecliplse doesn't (ot at least didn't 1 year ago).

#5303093 Any Book Recomendations?

Posted by on 29 July 2016 - 09:46 AM

I would recommend http://www.gameenginebook.com/index.html
It is more high level then game coding complete, but still covers a lot of important

Reading books about game programming (expecially books that are focused on engine programming) without having a good programming knowledge, won't benefit anybody.
(damn I'm playing with fire... not recommending that book again...)

As said above.

Do yourself a favor and start now.

If you are interested in programming already, learn about it, I think anyone can assure you that you won't mix the syntax of the langauages if you pay a bit of attention :)

#5303058 Game Engine Advice

Posted by on 29 July 2016 - 01:51 AM

Here is a good book on game engines, written by one of Naughty Dog's programmers: http://www.gameenginebook.com/

I'm afraid that I will unRecommend that book.I have to admit that a havent read it(Just a few topics here and there). The book contains a lot of trivially google-able knowledge that is applicable to amolst any type of programming, sure those skill are 100% a must, but the book won't eduacate you anything about the large topics that are really hard and needed (editor and all that goodness around it, how does it blend with the game world, undo/redo, asset management, different approches to different game types, ect..) Correct me if I'm wrong.

unfortunately I have nothing to recommend in exchange, I tend to develop something in my head and comapre it with what others have done, then I try to weight the pros/cons and If possible blend the ideas or come up with new one.



A few suggestions from my point of view.... At work I write a lot code for 3ds Max and Maya. Those tools are pretty powerful, and they already have a lot a of the things that you would need for your game. A thing that you could do is to implement your level editor in 3ds Max Maya. Writing plugins for those is not that hard (and will teach you about the real world problems of the level editors, as those softwares are good but not perfect). Additionally I do not know for 3ds Max, but with Maya you can directly link your game with it, and create a hot link between them for fast iterations(there were several approches, one on the top of my head is sockets).

I don't know but there might be a simialr functionally for Blender.

Otherwise you could write a miniamal editor yourslef, however I do not have any tips as I'm struggling to write one currently myself.


EDIT : About the book. I've read a few chapters of that book(a firend of mine gave me the book for a couple of days), not the whole book. Additionally to corrent myself, I do think that the knoledge shared in the book is very helpful, but I don't think it would be that benefitial to Happy SDE.

#5302881 Stackoverflow And Money

Posted by on 28 July 2016 - 02:07 AM



It's right in your public user profile. I literally just clicked on your username.

No... moderators see fields that users have set as private. Try logging out and clicking that link again.



Oops.  Sorry.  I thought that was a public field.  Either way, removed as soon as it was requested, and sorry again.


@frob it was public, you did nothing wrong.

PS : BG = Country Code of Bulgaria

Yeah, I can live with that :)

#5302812 Stackoverflow And Money

Posted by on 27 July 2016 - 03:00 PM

@Josh Petrie I've imagine that on west the average web developer earns ~average game programmer salary.
@frob yeah, I was just curious about the average salary in the western countries.

@frob how did you found out my name :D, I really would love to hide that information. (really can't find it anywhere on GDNet)

@frob EDIT Just found it, could you edit you replay in order to keep my identity a bit less of a public information (not that it really matters, but just in case).

#5301245 Compilers

Posted by on 18 July 2016 - 01:07 PM

- no IDE means zero start-up time
- better C++ language standard compliance
- no pesky project settings to get lost in
- produces well-optimized code
- (optional) often possible to compile code written for a different platform, but only if you manage to install msys/binutils and such correctly

Non of there are advantages of non-MSVS nor they are disadvantages of MSVS, as they are easily achievable with the Microsoft compiler. 

#5300893 Dice Battlefront Level Editor

Posted by on 15 July 2016 - 08:14 AM


Looks amazing.


I wonder how do they blend the geometry with the terrain so well.