• 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.


  • Content count

  • Joined

  • Last visited

Community Reputation

101 Neutral

About Spline

  • Rank
  1. I recommend lapack, or its C interface, lapacke. The function you are looking for is "LAPACK_dgels", http://www.netlib.org/lapack/lapacke.html
  2. Uh, you need to help me out here... how are these guys going to help me? Save asking them, I mean...? Perhaps I should re-state my intentions. What I currently do in order to determine the length of a nurbs curve is to split it into the non-empty intervals defined by the knot vectors and perform a piece-wise numerical integration (my special thanks go to Gauss & Legendre...). Now I split the intervals in half and perform another iteration. The difference between the larger and the sum of the two corresponding smaller intervals are my error estimates. Until the sum of error estimates is smaller than some ?, I recursively split the interval with the largest error estimate. For all curves I have tested so far this works well and all, however, I lack a (mathematically sound!) argument as to the "real" error bound. Or another approach that has such a guarantee - although my current method seems to give good results, an error bound would be rather large due to my derivate estimation alone. And while De Casteljau has defined a numerically sound algorithm to evaluate Bezier curves, and the NURBS basis can, for some degenerate cases, degenerate to Bernstein polynomials, I fail to see the connection to my problem and would appreciate any more concrete hints. Kind regards Spline
  3. So, you read some grammar G1, say, in BNF, defining L(G1), and your program is now accepting L(G1). Then, on the fly, you read G2, and, by some magic trickery as it were, you now accept words from L(G2). Well, nice. But (setting aside the fact that I can think of neither practical application nor theoretical value) how would that do something useful? You need to take, when you encounter a statement, a form of semantic action. Say after playing with your example of addition and substraction, you have the idea to allow assignments, i.e., you have an assignment-expression: additive-expression | postfix-expression ASSIGNMENT_OP assignment_expression ...now you would recognize "a = b = 2+3*sqrt(5);" as an assignment-expression. But what would you *do*? How do you intend to take a semantic action of something you don't have any semantics associated with? There is actually a reason that we have a C-compiler and an Ada-compiler and so on and not one meta-compiler that needs to be fed with a grammar, and then can compile any given language. Setting my reservations regarding the usefulness and feasibility aside, my answer to your initial question still stands: you need, for the grammar you specified, one token look-ahead. Oh, and by the way: yacc does, by and large, not operate on characters, but on tokens. So unicode should not be a problem; as for (f)lex, google found me this: http://stackoverflow.com/questions/9611682/flexlexer-support-for-unicode And I highly recomend it, even if you stick with your original plan, to parse the grammar itself and create the parser for that grammar.
  4. Well, this is the kind of situation where you need one token look-ahead. It is, in most cases, sufficient. Whether it is or not depends, as you already noticed, on the language you want to parse (and the way you formalize it). C, for example, can be nicely parsed with an LALR(1)-parser (that is, with one exception: the "dangling else-problem", which is a shift-reduce conflict, but that one can be resolved by preferring a shift). C++ is something different entirely. Parsing it with a LALR(1)-parser has been attempted, but the result is... not very nice. Another type of parser, GLR, would be a better choice. So it really depends on what you want to do. If your language is not more complex than C - and given your question, it probably isn't - LALR(1) might be the right choice for you. What are you using to generate the parser? If you feed your grammar to yacc (or its GNU-implementation, bison), it will work nicely.
  5. Hi all, although NURBS seem to be used widely, I can find only little information on length approximation of NURBS curves on the web. It can very well be that I simply didn't feed google with the right search terms, in which case I appologize for the noise and kindly ask for a hint as to what these terms might be. To my actual problem... given a NURBS curve C of degree d, defined on the real (well, in terms of implementation, rational) interval [0;1]. For 0<=a,b<=1 and ?>0 find l, u: l <= length of C in the interval [a;b] <= u and u-l <= 2?. Differential geometry says that I have to compute the integral of the speed vector at each point. Well, nice try, but NURBS cannot be differentiated analytically. So a numerical solution is required. However using the "default" algorithms like Gaussian quadrature and difference quotiont (likely to require an exact rational arithmetic to work at all) seems to be a bit wasteful. There must be better algorithms out there, or am I missing something?