Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


NightCreature83

Member Since 21 Feb 2008
Offline Last Active Aug 12 2015 12:37 PM

#5242927 Cheap Rendering Tricks Used in Game Industry?

Posted by NightCreature83 on 27 July 2015 - 03:42 AM

The reason light maps are used is more because we dont have the power to shade everything in real time, however this is slowly changing with Forward+ and Deffered and more with the tiled and clustered version of these methods. These are allowing us to do hundreds of lights in complex scenes which makes the need for using a lightmap less and less.

 

If you are making a racing game you will want to look into motion blur techniques too.




#5242247 Game Development Career Question?

Posted by NightCreature83 on 23 July 2015 - 02:16 PM

Hey thanks for all of the replies guys, I think based off all of these replies I'm going to look more into C programming, I started learning it a while ago I learned the fundamentals then stopped to go learn C++. I think I will be looking more into C. Thank you all!

If you know C# already there is no really need to learn C before learning C++ you can do this together most of the C syntax is accepted by a C++ compiler but not all though. Most of the stuff you need to learn for C is what you learn first when you start C++ anyway.




#5242170 Game Development Career Question?

Posted by NightCreature83 on 23 July 2015 - 08:21 AM

 

Scripting VS Programming

"Scripting" in unity is usually done with C#, which is a general purpose programming language... which means you'll be programming.
 
Learning to program well is important. You can do that in C#/Unity.
If you want to be a game programmer as a career, you should learn C and C++ at some point, but the order doesn't matter.
Many people will recommend that you learn C# first (it's more beginner friendly), then move backwards to C (because it's a lot harder)
I started with C++ first, and learned C# afterwards... but it was very frustrating laugh.png
 
There's not really a wrong way to do things as long as you keep practicing your skills and keep learning new things! Keep it up! biggrin.png
Try both approaches. Switch back and forth between them. Learning industry-standard tools like Unity is very important too.

 

I did the other route and learned C# first and then C++, its also frustrating biggrin.png there are minor syntax differences between the two languages that will constantly trip you up. I am not talking about memory management and such but simple about very minor syntax differences.

 

Thanks for the answer Hodgman! And yeah I have heard a lot about learning C, but I'm puzzled because as far as I know, C is basically unused at this point in time.  I'm sure a million things use C that I am not aware of, but I feel like C++ has taken the throne, I don't really know the difference between the two.  I'd guess C has more uses? I don't know haha.

 

 

C is still heavily used and in games we are actually more writing C with classes than proper C++. Things like templates, exceptions and newer C++ syntax are still largely please dont use in a lot of companies.

 

The major difference between C and C++ is the use of objects in C++.
 

 

While it's true that most games these days are written in C++ it's still useful to know C because of the enormous amount of legacy code written in it. Also some programming languages are implemented in C such as Lua and Python. So digging around in the internals of those languages would require knowledge of C. Also it's not that C has more uses, both are Turing-complete programming languages, meaning that any possible computer program can be implemented in them. Although one of the advantages of C is that its implementation is simpler, which means it's used more often on embedded systems.

C's compiler is smaller and simpler that is why it is ported to more platforms than any other compiler. C++ is a very cumbersome compiler and syntax to implement, which means you have tools for every thing you would like to do, but it also makes it very complex.




#5241981 How much of my game should be written in a scripting language?

Posted by NightCreature83 on 22 July 2015 - 12:27 PM

I would first come up with your threading strategy to be honest because scripts can mess dramatically with that. If you allow to much modification from the scripts that could for example call or send events to other entities, your threading strategy can become cumbersome all of a sudden or even impossible to do.

 

Scripting is nice but you need to really think about what a script is allowed to do because it can cause conflicts with other systems and/or cause performance issues that are hard to solve all of a sudden.

 

Data Driven en oriented code can give you a lot of the benefits of scripting without needing to have a scripting language embedded in the code.




#5241713 Advanced font/text rendering options

Posted by NightCreature83 on 21 July 2015 - 08:26 AM

Oh, I just meant like this sort of simple wrapping around 2D UI objects. My current own code simply does this by having a callback "getLineBounds(ymin, ymax)" that gives the simple English layout/word break implementation the allowed min and max x coordinate for a line. But my current code would be wrong once outside the using the space charecter to word break, and does combining characters wrong entirely which was the thing I came here to solve.

attachicon.gifwrap.png

Good point that Direct2D/DirectWrite can go to bitmap (using the WIC by the looks). Will have to look at what is best there, seems have a few ways to consider since as well as the other D2D stuff, means I can go direct to back buffer, to texture, or to bitmap then texture. Even with SDF, on Window's I could use DirectWrite to layout the glpyhs, then I just need to render them myself with a 3D transform, but it feels like an extra/optimisation once basic text works.

 

So DirectWrite looks like a definite option on Window's just not sure where that leaves me on Linux if I want to move past my simple custom solution.

 

As far as rendering rather than the layout problem goes:

 

UI component/widget text is never transformed by anything other than it's x/y position. It is never rotated, and never scaled. So to draw it each frame it is pixel perfect with an alpha blend at most. In the cases of lots of small text, e.g. item descriptions, npc/quest text, etc., it is also on a solid/known background. In the case of DirectWrite I found I could simply give it this background colour along with the text and font-style stuff, and get ClearType output. And I understand similar with FreeType.

 

If I made a glyph texture map however, this is not possible and small text is likely to be worse than normal DirectWrite/FreeType text rendered directly at that size. But in the case of 3D transformed text (e.g. above a item or other entity, maybe scaled with distance, maybe with other effects) not so simple. Right now I just use FreeType AA text and if scaling, rotating, etc. use a high font size, but looks like SDF might do a better job in that case is all I meant.

What is small text in your case, because if you go below 16 points its too small for a game. Games are not the same as Word or a webpage fonts should be used at bigger sizes than you expect.

 

32MB per screen just for text on VRAM is a lot, because you generally have more than one UI screen loaded, you also have the connected screens loaded so VRAM use matters a lot. SDF fonts always render a hard edge because you are using a technique that is closer to vector graphics rasterisation than bitmap splatting which is what bitmap fonts do. Also with SDF fonts outlines around text and drop shadows are minor tweaks in the shader to make that happen from the same input.

 

There are tools to create your SDF and bitmap fonts a good one is http://www.angelcode.com/products/bmfont/ its used by several AAA companies and some have even given fixes they have made back to the author. And here is a tool from Bitsquid (http://bitsquid.blogspot.se/2010/04/distance-field-based-rendering-of.html) that uses the output from bmfont to generate an SDF texture and options on how to use it.




#5241510 Jobs for specialists in maths/physics?

Posted by NightCreature83 on 20 July 2015 - 07:47 AM

Physics and graphics are general speaking the most math heavy areas of the game, the rest involve more abstract logic than pure math. If I were you I would start learning C++ to be honest, if you know a bit of C# this is going to be easier for you. The problem you will run into with C++ mostly is resource management (memory and such), pointer/references.

 

The games industry requires you to be a decent coder next to your math skills, having great math skills but no implementation skills will make it unlikely that you find a job in the industry.




#5241018 Advanced font/text rendering options

Posted by NightCreature83 on 17 July 2015 - 03:35 AM

Had a read through this https://www.mapbox.com/blog/text-signed-distance-fields/ . Looks interesting but more as a possible rendering optimization if I find myself rendering lots of 3D text and want the extra quality due to constantly changing transforms. For mostly static text I think uploading a per-text bitmap should be fine, but will keep this in mind to revist.

 

So looked at HarfBuzz some more. As far as i can tell it cant lay out multiple lines for me, with it only really taking care of getting the glyphs for a single line ("run") of text? I guess the intention is that I give HarfBuzz my paragraph, then post process its results to insert line breaks with the help of some other library. Is that the intention? I could likely manage English and similar languages using the same logic I always have, but is there such another library to do it for me? Im sure even English could be laid out better, and I have no idea about other scripts.

 

Ideally I just want to be able to give something some text fragments with associated styles/fonts (e.g. effectively like the content of a HTML <p> with some simple <span>'s in it) and just get a bitmap back, or at least all the glyphs with positions. Maybe another look at Pango or other UI libs is in order?

 

 

Considering looking at DirectWrite more for Window's, but the interop with D3D appears to be fairly complex, and would then have to consider the Linux/Mac support separately (somewhat in the hope that the libraries for Linux desktop applications include a suitable equivalent).

You completely missed the point of SDF font rendering, its not a rendering optimisation its a memory optimisation, because you only need a single texture for a font which then allows you to render every fontsize for that font. SDF is not meant to be used for 3D text but for 2D text at any zoom level, 3D text is done with meshes in games.




#5240024 A Pointer to member functions and boost::bind

Posted by NightCreature83 on 13 July 2015 - 01:49 AM

With bind you either use a static function like Ashaman mentioned or you pass an instance of a class and the member function to call to bind. You have to make sure that the instance of that class exists as long as the binding exists. If it doesn't you get issues when trying to call the callback, same goes for std::bind because it is based on boost::bind, and I would suggest you switch to std if you are on a C++11 compilers or higher.




#5240021 Why is my constructor/Renderer class being called twice?

Posted by NightCreature83 on 13 July 2015 - 01:43 AM

Also can you show the implementation of setRenderer because I am expecting to find the error in the implementation there to be honest. If you are storing a list of renderers this is simple to mess up.




#5239383 VS 2012 express any good?

Posted by NightCreature83 on 09 July 2015 - 06:39 PM

To be honest there is no reason to use express unless you are doing commercial activities and it breaks the Community license, but then again in that case you might also be breaking the express license. The only thing you will not have from the ultimate editions is some team tools and architectural tools, I have never needed these for as long as I have used VS.

 

The major benefit of using Community over express is that you are not faced with a hampered IDE, everything that works in the paid for version will work in that one. In the express editions the IDE has some big drawbacks like not plugins, aka no Resharper or VAX.




#5239188 directxmath headers

Posted by NightCreature83 on 09 July 2015 - 06:12 AM

Seems like you are missing a few headers that define these macros/functions maybe this helps: https://msdn.microsoft.com/en-us/library/hh916382.aspx

Which most likely means it can't find this header: #include <sal.h>

 

This explains what sal does: https://msdn.microsoft.com/en-us/library/hh916383.aspx




#5237467 Direct3d 11 programming using Windows SDK

Posted by NightCreature83 on 29 June 2015 - 05:57 AM

There is not much difference between the version in the Windows SDK and the June 2010 SDK. The sample from the DX SDK are still all valid. Replacing D3DX is not that hard, most of what D3DX did can be achieved with the DirectX Toolkit. Loading and compiling a shader yourself is not that hard, same as writing your own FX library, but if you dont want to do taht I believe the June SDK comes with the source for the FX shaders.

The math lib now resides in DirectXMath.h instead of xnamath.h




#5234021 HLSL matrix initialization

Posted by NightCreature83 on 10 June 2015 - 03:25 AM

You can also just per vector initialise the float3x3 which should work.

 

like  this, I ripped this from some old code I had but it seems to work properly:

float3 Normal  = normalize(normalTangentSpace);
float3 Tangent = normalize(tangent);
float3 binormal = normalize( cross(Tangent, Normal) );
float3x3 matInverse = transpose( float3x3(Tangent, binormal, normalize(normal)));

I would always initialise the matrix types from vector types just to avoid the problems of alignment.

 

I believe newer syntax allows you to use things like this, which makes what you mean far more explicit.

float4x4 mat = float4( {1,2,3,4}, {1,2,3,4}, {1,2,3,4}, {1,2,3,4} );
float3x3 mat = float3( {1,2,3}, {1,2,3}, {1,2,3} );



#5230684 Is Xbox360 live arcade development still worth it?

Posted by NightCreature83 on 24 May 2015 - 09:34 AM

The audience for xblig was never huge anyway.

Microsoft were put under pressure by AAA studios to give big releases priority positions in the search results, basically making indie games second class citizens in the arcade store.

Considering AAA studios might pay a lot for licensing to release games on physical dvds in brick and mortar stores for xbox, and xblig published games paid $99 a year it's easy to see why they might have got a bit miffed.

As more and more move from 360 to xbox one, the audience will continue to decrease, I wouldn't bother with it if I were you and stay tuned for an xbox one equivalent.

You can change that might to AAA studios pay a license fee to MS and Sony to release on the consoles, there is no might about that fact.

I have a feeling the XBox One equivalent will just be the strore like it is on Windows now.




#5229529 Running Debug and Release Code Simultaneously

Posted by NightCreature83 on 17 May 2015 - 09:43 PM

If this is c++ set your solution to release and warp parts of the code that you want in debug in pragma optimize. Look at MSDN, GCC or Clang docs for the precise syntax because it is compiler dependant.

 

For MSVC

#pragma optimize( "", off)
//Code in here is not optimized.
#pragma optimize( "", on)

 

This is not the same as running a release build with debug symbols, the code in the wrapped pragma is actually compiled as un-optimized code, like a debug build. This makes debugging easier. Sometimes you need to do this with whole files because inline functions and stuff like that.






PARTNERS