Jump to content

  • Log In with Google      Sign In   
  • Create Account

C0lumbo

Member Since 02 Nov 2012
Offline Last Active Today, 06:56 AM

#5125982 Structure of Development Costs for games

Posted by C0lumbo on 23 January 2014 - 03:56 PM

If you're trying to do back-of-the-envelope calculations, then you can do a lot worse than calculate one man-month as $10000 (http://www.altdevblogaday.com/2011/11/13/10000-is-the-magic-number/). This (in theory) covers the cost of hardware, software, wages, taxes, office rent, insurance, utilties, pensions, etc.

 

So if you hear of a game that cost $1000000 and was developed over the course of 10 months, then you can guestimate that the team size was about 10 people.

 

Of course, when you're doing it as an indie, you're going to be cutting out as many of those costs as possible, and $1000000 seems like an impossibly huge budget, but then you're probably using free software, working from home, not paying yourself a proper salary/pension, etc.




#5125251 What is the general practice to deal with animationsets?

Posted by C0lumbo on 21 January 2014 - 12:01 AM

There's nothing wrong with loading everything up at game start, providing that you have a reasonably small set of things to load so that you're not making the user wait for too long a time, and you're not exceeding your memory budget for your target platform.

 

Packing multiple assets into a single file is often a more efficient way to load things than having lots of separate loose files. Particularly if you're using the push model of loading so have very sequential access as you load the file (I don't about the details of the ,x format).

 

A majority of big games, particularly ones with large amounts of cutscenes, would have at least some of their character's animations loaded on demand. For most indie games, packing the character and the animations up together and loading the whole lot at boot or at game start seems a pretty sensible choice.




#5123929 iOS game - making it in other languages?

Posted by C0lumbo on 15 January 2014 - 12:35 PM

If you decide not to localise your title for your first release, then I've heard advice that at the very least you should get your iTunes product description translated competently into EFIGS.




#5123507 Text rendering - Minification?

Posted by C0lumbo on 14 January 2014 - 02:05 AM

Trilinear filtering might help with the mipmapping a little perhaps.

 

However, probably the best/easiest fix is to generate some more fonts which you can switch to when you're rendering. So instead of a one-size-fits-all 50 pixel source, have a 15 pixel, a 30 pixel and a 50 pixel version. You might even find that your chosen typeface looks poor at 15 pixel, so you might need to use a different font for very small characters, one which has been optimised specifically for small sizes.




#5123000 Method for getting an angelic effect

Posted by C0lumbo on 12 January 2014 - 12:55 AM

I'm not sure you really want lights in this scenario. It sounds like the effect you're really after is God Rays (or Crepuscular Rays to the pedantic). Something like this: https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRLgyNYsX-MqAOZKNPOtkp89eNfKk34jn455IXA-nmG3K-uBVH9LA

 

These are often achieved a screen facing quad (billboard) with an appropriate texture on it and additive blending (see http://pixel.bnetwork.netdna-cdn.com/wp-content/uploads/2008/08/8.jpg).

 

In the case where you need it to be a little more 3D, you can make God Ray shafts out of long thin quads (a + shape in cross-section works quite well) they need to be additive blended and a texture to smooth out the edges helps. 




#5121674 Nearest Neighbor resampling problem on CPU

Posted by C0lumbo on 06 January 2014 - 12:01 PM

Perhaps what you ought to be doing for a nearest neighbour mipmap function is always sample from the top layer.

 

Each pixel in a mip level is going to choose one of 4 pixels from the mip above, and by doing it iteratively you're introducing a systematic position shift. If you always sample from the top mip you'll avoid this problem. Another solution might be alternate which of the 4 pixels from the mip above that you choose from depending on the mip level so the shift doesn't accumulate.




#5121499 Indexing multiple VBOs

Posted by C0lumbo on 05 January 2014 - 04:27 PM

For the most part, you're best off using a single interleaved VBO unless you have some special reason for needing some of your vertex attributes to be in a different VBO. Examples of such reasons might be software skinning where positions and normals have to be in a dynamic VBO, while UVs and colours are better off in a static one, or an instancing situation where you have lots of objects with identical positions and normals, but they each have different pre-baked lighitng.

 

For the vast majority of cases it's a bad idea to use multiple VBOs, and you can't index the components separately (although it's not dummy-dumb to think you can, I know of at least one console which supported it, and it did save a lot of memory).




#5121394 masking and unmasking arithmetic exceptions - could it be usefull?

Posted by C0lumbo on 05 January 2014 - 08:56 AM

 

In my indie game, I leave _EM_INVALID, _EM_ZERODIVIDE and _EM_OVERFLOW on pretty much all the time in debug mode. I only disable them when I'm calling out to some 3rd party library that misbehaves* and I can't fix. I find it very helpful to catch floating point exceptions as early as possible before they start producing undefined behaviour.

 

_EM_UNDERFLOW, _EM_INEXACT and _EM_DENORMAL are less useful because they fire all the time, and are almost never an error condition. However, I still make use of them. I plan to support lock-step multiplayer in the future, so there's a simulation part of my game which isn't allowed to use floating point numbers in case they behave differently on different machines, builds, optimisation settings, etc. To 'enforce' the no-float rule, I enable all the spurious exceptions in the knowledge they will almost certainly fire if I accidentally do any floating point math within the simulation.

 

*I say misbehave, but sometimes optimised code is written that is deliberately allowed to create infinities and then handles them correctly.

 

well interesting, could you say yet maybe how do you handle this exceptions?

This optymistion code remerk is also interesting (how much % speedup gain can be obrtained this way and how?)

Are the INVALID and DIVIDE set on by default in windows? Does the

api called by program not change the fpu/sse state ? 

 

 

I don't handle the exceptions, I have them enabled only in debug and consider them as errors. If they occur while I'm debugging, program execution stops and I can debug and fix the problem.

 

The optimisation remark was perhaps misleading. What I meant, is that I've sometimes seen code in collision intersection testing (or maybe it was frustum culling) where it was doing a floating point divide, without bothering to check if the denominator was zero. The code was correct as it only cared about the sign of the result, so whereas usually a divide by zero is a sign of a bug that needs fixing, it's not necessarily the case. All I was saying is that a divide by zero is not necessarily a bug.

 

AFAIK, floating point exceptions are off by default (at least in the environments I've worked in).

 

I recommend Bruce Dawson's series of articles on floating point numbers. This is the one where he talks about exceptions: http://www.altdevblogaday.com/2012/04/20/exceptional-floating-point/ (read the rest too though, they're great). The code I use to switch exceptions on/off is roughly based on the classes in that blog.

 

edit: Well behaved APIs shouldn't change the fpu/sse state (or if they do, they should put it back again). A long time ago, DirectX used to mess with the rounding mode, I believe, but I'm pretty sure it doesn't anymore.




#5121354 masking and unmasking arithmetic exceptions - could it be usefull?

Posted by C0lumbo on 05 January 2014 - 05:11 AM

In my indie game, I leave _EM_INVALID, _EM_ZERODIVIDE and _EM_OVERFLOW on pretty much all the time in debug mode. I only disable them when I'm calling out to some 3rd party library that misbehaves* and I can't fix. I find it very helpful to catch floating point exceptions as early as possible before they start producing undefined behaviour.

 

_EM_UNDERFLOW, _EM_INEXACT and _EM_DENORMAL are less useful because they fire all the time, and are almost never an error condition. However, I still make use of them. I plan to support lock-step multiplayer in the future, so there's a simulation part of my game which isn't allowed to use floating point numbers in case they behave differently on different machines, builds, optimisation settings, etc. To 'enforce' the no-float rule, I enable all the spurious exceptions in the knowledge they will almost certainly fire if I accidentally do any floating point math within the simulation.

 

*I say misbehave, but sometimes optimised code is written that is deliberately allowed to create infinities and then handles them correctly.




#5121323 Deconstructing roguelikes: what makes them addicting?

Posted by C0lumbo on 05 January 2014 - 12:54 AM

I can't find a citation, but I read once that two key factors when comparing the addictiveness of various forms of gambling are:

 

1. Size of stake (higher stake = more addictive)

2. Speed of turnaround (quicker result = more addictive)

 

Roguelikes seem to tick those two boxes more than most other forms of games, because of their relatively high stakes and fast turnaround. I think it's also why Counter-Strike is like crack-cocaine for so many people.

 

(not that I'm implying that these games are like gambling, I'm just saying the psychology of addiction in games and in gambling probably follows similar rules)




#5121080 Has there ever been game engines or libraries in assembly?

Posted by C0lumbo on 04 January 2014 - 01:47 AM

Apparently VD-Dev's Big Bang engine for 3DS is entirely written in assembly. http://nintendoeverything.com/interview-vd-dev-talks-ironfall-streetpass-support-tech-details-and-lots-more/

 

 

The engine used in Iron Fall is called the ‘Big Bang Engine’. Its an engine we have programmed from scratch and is optimized for the Nintendo 3DS. It took us several months to write (days and nights), and is written fully in assembly code, using all the ARM optimizations we know.

 

Although I wonder if the reality is that large chunks of code are hand-written assembly within a more traditional c/c++ framework, but the guy doing interviews isn't techy enough to know the distinction. If it really is 100% hand-written assembly, then it's a pretty impressive feat really, even if it does seem rather an unwise approach. Even if the game is a great success, they might want to port their engine to other platforms one day, and their premature optimisation of non-performance sensitive parts of the engine will make that harder. Can't help but wish them the best of luck though, I admire their chutzpah.




#5119273 Some things about memory management

Posted by C0lumbo on 26 December 2013 - 03:40 AM


If I understoo it right you have to take the memory youwant to use over the game ap as a static field.



fr example i got an linear allocator:

I would do something like this



char* subsystemMemory[2048];

linearAllocator.start = subsystemMemory;



char* renderSystem = linearAllocator.Allocate(sizeof(renderSystem), 4);



So to say I could do a file, where i declare all of the memory as static and use it over the game?

 

I think this is a perfectly valid way to do it, but I don't think you "have" to do it that way. I've always acquired the memory for my memory allocators by calling the system's memory allocation function (e.g. malloc).

 

In fact, in some cases your approach won't work. e.g. Some consoles have multiple memory 'arenas', and any static allocations will always come only from the default arena. so if you want to make an allocator for MEM2 on Wii for instance, you would need to use a different approach.

 

Regarding alignment, it's not unusual for the caller to have some alignment requirement so any general purpose allocator should have that functionality built in. It's also pretty reasonable to set the minimum alignment to 4 bytes for a 32-bit platform, 8 bytes for a 64-bit platform, or just round up to 16 byte alignment to make life easier for SIMD




#5119081 Texture problem on a 3d model

Posted by C0lumbo on 24 December 2013 - 01:36 PM

Is it possible the UVs need to be normalised?

 

DirectX and OpenGL use normalised texture coordinates. That is, regardless of the texture's width and height, (0,0) and (1,1) will always represent opposite corners of the texture image. It's possible that the ms3d model format (or the loading code you use) uses non-normalised texture coordinates, so that a 512x512 texture would have (0,0) and (512,512) as it's corners.

 

Try dividing the UV coordinates by the texture dimensions and see if that gets you anywhere.




#5118911 OpenGL using one texture as the alpha mask of another

Posted by C0lumbo on 23 December 2013 - 04:31 PM


A) Does OpenGL already have functionality built-in for using one texture as the alpha mask of another?

B) When passing in a second texture to GLSL, are there features built in for rotating the texture coordinate for the second texture separate from the texture coordinate of the first texture?

C) This simple RotateTexCoord() function has 5 if() statements... that's 5 branches per fragment drawn for a trivial operation. How could it be optimized?

 

A) Don't think so

B) Don't think so

C) Use a matrix to represent the transformation. Calculate the 3x2 transformation matrix on the CPU and pass it into the vertex shader as a couple of vec3's, transforming the UVs should boil down to a couple of dot products. If you're not already doing so, make sure you do the transformation on the UVs in the vertex shader, not in the pixel shader.




#5118312 Camera shake

Posted by C0lumbo on 20 December 2013 - 12:32 AM

I've started using perlin noise for camera shakes instead of using spring-like solutions. It gives a similar result visually and will be completely frame-rate independent.

 

Spring/physics style solutions have a habit of behaving differently or even catastrophically falling apart when you run at very low or very fast frame-rates. Of course, that can be fixed by running that bit of the simulation at a fixed frame rate, but that didn't fit in nicely with my camera code which was independent of the fixed-rate update part of my simulation so for me, perlin noise was less hassle.

 

I suppose you lose some control though - e.g. with a physics based solution you could push the camera in a specific direction (say, in response to an explosion or bullet impact) and have it return. With perlin noise, My only control is fading in and fading out the shakiness.






PARTNERS