|
322
|
Developer / Technical / Re: Platform jumping problems with AABB collisions
|
on: July 04, 2011, 07:04:02 AM
|
I'm looking for something that "automatically" works in any situation. This is a good thing to look for, but be aware that sometimes this is a Do What I Mean problem. That is, for any given situation you have some intuitive expectation, but in fact there may be no simple, systematic rule that encapsulates all your expectations. Example: I wrote a 2D game with a ball in it many years ago and initially had a very simple collision system, then across the game's two months of development the collisions got more and more complex as I found more and more obscure cases where I knew what behaviour I wanted and wasn't getting it. In the end my collisions ended up depending on ball velocity, the local geometry of the thing the ball hit, gravity and friction and required processing multiple collisions per frame in cases where a fast moving ball bounced off multiple objects in a single processing step.
|
|
|
|
|
323
|
Developer / Technical / 3D Objects With Borders at the Edges
|
on: July 04, 2011, 05:30:00 AM
|
|
I've just started looking into improving performance on my current (3D) project and, in the process, have learned about draw call batching. It is good. It makes things faster.
The one trouble is that in order to batch draw calls you need things to have the same materials. This is no problem in theory, but quite a few of the objects in my game have textures which vary at the borders. Imagine, for example, a wooden crate reinforced with metal strips along the edges and at the corners. The way I'm doing this kind of thing at the moment is to render a suitable texture at runtime (but once only) using 2D graphics to put the edge and corner textures in the right place. Which causes problems for batching...
The naive approach results in a situation where two crates of different sizes have different materials. I can be a bit cleverer about it and put the textures in a texture atlas, but if I do that then every time a new crate appears with different dimensions I have to add that to the texture atlas too and update all the other materials in the level. Ouch. A third approach would be to have the edges of the crate as separate objects, but that multiplies my game object count by nine, which I'm obviously not delighted about.
This must be a pretty standard kind of problem. What do people do about this sort of thing?
|
|
|
|
|
324
|
Developer / Business / Re: How to monetize my multiplayer game?
|
on: July 03, 2011, 04:43:17 AM
|
You can't get anything by paying gold farmers that you wouldn't be able to get by simply playing more. It's the same with tf2, lol, and magic. Well, except Magic. I assumed I'd misunderstood your earlier post, but apparently not. To be clear: Magic the Gathering Online uses a pay-for-unique-advantages business model. Starting players begin with no cards (or a pathetic number of bad cards) and the only way to get more is to part with money. To be clear: there is not a way to accumulate cards through play. (There are competitions with prizes, but since you pay to enter competitions these at best represent discounts.) Magic is a worldwide game but has a very large US playerbase, so it's an example of a mutliplayer game where paying money for significant (even critical) in-game advantages is normal and accepted. (The case against would be that only the existence of the paper game makes this model commercially viable. Could be true. I don't know enough to be sure.)
|
|
|
|
|
325
|
Developer / Business / Re: How to monetize my multiplayer game?
|
on: July 01, 2011, 05:39:54 AM
|
It's managed to remain an unspoken and very well-respected rule in multiplayer game dev that people shouldn't be able to directly or indirectly buy a unique competitive advantage. <cough> Magic the Gathering Online (Not that I recommend anyone follow their lead...)
|
|
|
|
|
336
|
Developer / Technical / Quaternions - Error in Unity Docs?
|
on: June 16, 2011, 03:04:07 AM
|
This is one of those threads I'm always really reluctant to post because I'll end up feeling really silly if I've got it wrong... but it's worth it just in case I can save someone else a week's worth of nightmarish debugging. OK, so the Unity docs for the Quaternion * operator say: Quaternion.operator * static operator * (lhs : Quaternion, rhs : Quaternion) : Quaternion
Description Combines rotations lhs and rhs.
Rotating a point first with lhs and then with rhs is the same as rotating the point by the combined rotation. Note that rotations are not commutative: lhs * rhs does not equal to rhs * lhs. I'm writing a fairly complicated game at the moment with lots of 3D transforms in it and having spent a week failing to get hinges working properly I eventually get a little suspicious and run this: print("Test 1 - " + (rot1 * Vector3.up)); print("Test 2 - " + (rot2 * Vector3.up)); print("Test 3 - " + ((rot1 * rot2) * Vector3.up)); print("Test 4 - " + (rot1 * (rot2 * Vector3.up))); print("Test 5 - " + (rot2 * (rot1 * Vector3.up)));
And the output looks like this: Test 1 - (0.0, 1.0, 0.0) Test 2 - (0.5, 0.8, -0.2) Test 3 - (-0.2, 0.8, -0.5) Test 4 - (-0.2, 0.8, -0.5) Test 5 - (0.5, 0.8, -0.2)
So do I need more caffeine this morning, or is that actually the opposite of what the docs say? 
|
|
|
|
|
338
|
Developer / Technical / Re: Real Programming
|
on: June 13, 2011, 07:54:01 AM
|
Nobody REALLY knows what the hell it is That's really not true! However much corporations may sometimes get the wrong idea, the basic idea is really very simple: get something really, really simple working and then move from one working, stable release to the next, adding features in increments that are as small as possible.
|
|
|
|
|
339
|
Developer / Technical / Re: The grumpy old programmer room
|
on: June 12, 2011, 04:22:18 AM
|
And don't get me fucking started on embedAsCFF="false" Oh yes. So very seconded. When I first ran into that problem, my reaction was pretty much: OK, so they made "broken" the default and you have to select "make this not broken" manually? Nice. 
|
|
|
|
|
340
|
Developer / Technical / Real Programming
|
on: June 12, 2011, 04:19:31 AM
|
Yes, I agree with that part, however I feel he is oversimplifying what an engineer does somewhat. Yes, engineers often do more practical work, but they still have a lot of hard maths to contend with. Just in case there were engineers reading who might actually have been offended, I should probably clarify that that was a joke. (It's a kind of universal stereotype that mathematicians see themselves as smarter than scientists, who in turn see themselves as superior to engineers, who themselves look down on arts students.) The point about the "software engineering" label is that in the corporate sphere it's a label best loved by people who do not themselves write code and therefore serves as a kind of warning sign. But of course your mileage may vary.
|
|
|
|
|