Jump to content
  • Advertisement

Tudor Nita

  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Tudor Nita

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Tudor Nita

    OOP is dead, long live OOP

    Composition based OOP ( where it makes sense) is great and can see it being used locally ( sub-component level ). Or any other piece of hot-code where you really need to optimize after the system is designed and approved. Losing the abstraction layer of components, for example, seems a bit heavy-handed to me. Would be hard pressed to see our hundreds of components done this way. It could be done, I'm sure, but at what cost to development/ maintenance time? The example as far as I understand it ( based on this tiny snippet ) has a similar problem to unity's ECS framework. It requires an upfront, close-to-complete, system design and is rather inflexible in nature. Any more than a trivial gameplay change requires a programmer and at least one recompile. Does it not create a host of other complications like designer-specified data, toolset integration, regular inheritance use-cases like automatic script bindings, etc ? One of our major risks is iteration speed and it's only very rarely programming iteration speed ( at least in the mobile world ). Granted, on more constrained platforms with fiercer competition ( to be read as the graphics race ) I can see this as being an affordable compromise
  2. Tudor Nita

    OOP is dead, long live OOP

    Aras's example has been used in many a production-ready ( to be read as shipped ) games and engines. It's far from a straw-man example IMHO. It seems like an (anti?)pattern that works well with quick turn-around times, ever-changing requirements and the realities of big-business game dev. Out of curiosity has anyone seen the "proper OOP" example actually used in a non-trivial, modern, title? I am asking from honest curiosity.
  3. Tudor Nita

    c++ file reading

    Just personal preference I guess. It's a bit verbose for my liking and enforces type safety at compile time. This nags at me a bit too: http://stackoverflow...answer-5165293 Seeing how I'm really used to the fgets way, this is all, of course, highly subjective. Still, it's a valid alternative.
  4. Tudor Nita

    What are the downsides to using Unity?

    Unity's fbx import will convert it, but have non zero values in the rotation fields, with no way to set the default rotation to identity (0,0,0). Especially when writing scripts to instantiate objects [/quote] I'll have to agree on that. Was thinking from a manual import POV. However I remember you can get a 0,0,0 rotation if you pre-rotate the object/ pivot in 3DS Max before exporting. Will have to check this out again as my memory is not to be trusted.
  5. Tudor Nita

    c++ file reading

    I wouldn't use iostream. Something like this works for me. Imagine an input file like: # a comment a 3.5 3.5 yay_some_text a 3.2 4.5 yay_some_more_text [source lang="java"]FILE *pFile = fopen(filePath, "r"); // the file to load char buffer[512]; // character buffer char temp; // read each line into the buffer while (fgets(buffer, sizeof(buffer), pFile)) { // switch based on leading type switch (buffer[0]) { case '#': // do nothing, it's a comment break; case 'a': // set ambient color ? sscanf(buffer, "%c %f %f %s", &temp, &someFloat, &someOtherFloat, &aString); break; } }[/source]
  6. Tudor Nita


    "stupid long mathematical equation"[/quote] That doesn't sound good regardless of how much I spin it around in my head. Anyway, you could just go with some simple conditional statements and inverse the direction of the ball. If you want something more complex you'd have to do some vector maths with at least the ball's direction vector, the paddle's forward vector and the position the ball hit the paddle. [source lang="cpp"] // edge of playing field if (pong.ball.centre_y > 0.6f) { pong.ball_velocity_y = -ball_speed; } else if (pong.ball.centre_y < -0.6f) { pong.ball_velocity_y = ball_speed; } // ball hit a paddle on the right side if (pong.ball_velocity_x > 0 && collides(&pong.ball, &pong.bats[1]) ) { pong.ball_velocity_x = -pong.ball_velocity_x; } // ball hit a paddle on the left side if (pong.ball_velocity_x < 0 && collides(&pong.ball, &pong.bats[0]) ) { pong.ball_velocity_x = -pong.ball_velocity_x; }[/source]
  7. Tudor Nita

    What are the downsides to using Unity?

    As a long-time user of Unity: downsides: Although it's amongst the best in asset management, the module does have its quirks and can ruin your day if you're not careful. Hard to "patch" asset/ scene files since they are binary (see 500mb comment above ). [They are switching to a text-based scene format so this will change very soon ] Some web-game developers complain about users leaving the game page once they see the Unity logo [ which in the free version has to be there ]. This is a side-effect of so many people having access to the free version and so much shovelware being developed. I have my doubts about it. Jack of all trades dilemma. It does everything but doesn't really shine in any particular category. It's not exactly a downside but surely not an upside either. Really bad GUI implementation. The inbuilt GUI system is a performance drain at best. [ This is bound to change with ver. 4.x ] Binary SDK. As a c++ enthusiast, source code access would make my day. upsides: Extremely easy-to-use. I love UDK, Corona, Cocos2D and even ShiVa but they just aren't in the same ballpark when it comes to ease-of-use. Awesome cross-platform support. [ with 4.0 ] Linux, Web ( plugin and flash), Windows, Mac, iOS and android. And all of them free [ basic versions anyway ]. Well documented scripting. Some of the best documentation this side of a complex engine. Decent to great performance on mobile devices. Couple of tricks to make it run great but it eventually gives. Great community. They've got their trolls and whiners but overall the community is great. Asset management. Both a blessing and a curse. corrections: [ Daaark ] Getting the correct orientation is not a bug nor an inconvenience. It's just the coord. system they use ( common y-up system ). The problem lies rather with the authoring tools [ z-up for 3ds max for example :| ]. Nothing some decent planning won't take care of.
  8. Not exactly an answers, more like a guess but: From a (very) quick look at the code, I assume you are taking a single sample per pixel. That will always generate edge artefacts. Try subdividing the pixel. You could start with a 2 by 2 and just average the results. This is an assumption based on no data though ( can't see your raycast loop ) so take it as is. P.S: Bacterius makes a valid point too. I hit that block early as well. Wald's paper might help This was also an eye opener when I was building my raytracer. Probably the most performance oriented intersection technique ( still using barycentric coords.)
  9. Tudor Nita

    Alternatives to Unity?

    1st approach For a 2D-only implementation, in unity, you could try writing a simple lighting algorithm that pokes bits in a custom texture with texture.SetPixel(); You'd have to poll all shadow casting objects and write into some secondary texture attached to them. To speed things up, you could create the texture at lower resolution and "jitter" the pixels for some simple blurring. Problem is, this will still be slow. Quite slow. And to do custom shadows from what I assume are alpha-textured quads is not only even slower but decently complicated as well. 2nd approach Use the alpha buffer to build your own 2d shadowing system. There's a great article on 2D Shadows right here. Should be fairly easy to do for basic polygonal shapes. Not so for alpha-textured quads. Alternatives: Corona comes to mind. UDK might be ok too but UDK's overhead and requirements are a bit harsh for a 2D game. p.s: someone built an alpha-buffer based ( stencil buffer unavailable in free ) hard-shadowing plugin. Could try that first.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!