• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Tudor Nita

  • Content count

  • Joined

  • Last visited

Community Reputation

121 Neutral

About Tudor Nita

  • Rank
  1. 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: [url="http://stackoverflow.com/questions/5164538/how-can-i-speed-up-line-by-line-reading-of-an-ascii-file-c/#answer-5165293."]http://stackoverflow...answer-5165293[/url] Seeing how I'm really used to the fgets way, this is all, of course, highly subjective. Still, it's a valid alternative.
  2. [quote] 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.
  3. 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 [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] break; case 'a': // set ambient color ? sscanf(buffer, "%c %f %f %s", &temp, &someFloat, &someOtherFloat, &aString); break; } }[/source]
  4. [quote]"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]
  5. As a long-time user of Unity: [b]downsides:[/b][list] [*]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. [/list] [b]upsides:[/b][list] [*]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. [/list] [b]corrections:[/b] [ 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.
  6. 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. [url="http://www.sci.utah.edu/~wald/PhD/wald_phd.pdf"]Wald's paper might help[/url] [url="http://elib.lvk.cs.msu.su/papers/documents0/26/http:zSzzSzwww.graphicon.ruzSz2007zSzproceedingszSzPaperszSzPaper_46.pdf"]This[/url] was also an eye opener when I was building my raytracer. Probably the most performance oriented intersection technique ( still using barycentric coords.)
  7. [b]1st approach[/b] 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. [b]2nd approach[/b] Use the alpha buffer to build your own 2d shadowing system. There's a great article on 2D Shadows[url="http://www.gamedev.net/page/reference/index.html/_/technical/graphics-programming-and-theory/dynamic-2d-soft-shadows-r2032"] right here[/url]. Should be fairly easy to do for basic polygonal shapes. Not so for alpha-textured quads. [b]Alternatives:[/b] 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. [url="http://forum.unity3d.com/threads/102079-Dynamic-shadows-in-Unity-Free-Pro-possibly-Mobile"]Could try that first[/url].