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

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

PI

5 posts in this topic

Sorry about that, stupid mistake
I entered a wrong digit after the 9 and it gets rounded up so I lose the 9
0

Share this post


Link to post
Share on other sites
actually, here's a problem i had in VC++. first i'd put an integer in a float, such as 3.0, and when the float is in a watch window or something like that, it's displayed as something like 3.0000. but when i do this: (double)var, it ends up 3.00000038832, or something like that.

anyway there's some garbage at the end which comes from the inability to represent numbers that aren't a power of 2 exactly, so if you do var == 3.0f, it'll fail. just like to point that out to people who're getting weird float problems, that was what caused the lighting problems in my opensource engine
http://members.xoom.com/mutex0

0

Share this post


Link to post
Share on other sites
this has been a point of contention with me for some time.

Pascal has a constant for pi. C++ does not.

i mean, SURE, pi is easily copied, or calculated (pi=atan(1)*4 or pi=abs(atan2(-1,0)) ), but isnt pi an important enough number to have a constant in math.h?

i can understand not making e a constant, because e is more rarely used, and the way to get it is just exp(1). also, i dont ever suggest having a constant that is a single letter.

0

Share this post


Link to post
Share on other sites
/usr/include >grep -i pi math.h

#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390

C:\MSdev\include>grep -i pi math.h
* Currently, all MS C compilers for Win32 platforms default to 8 byte
/* Define _CRTAPI1 (for compatibility with the NT SDK) */
#ifndef _CRTAPI1
#define _CRTAPI1 __cdecl
#define _CRTAPI1
/* Define _CRTAPI2 (for compatibility with the NT SDK) */
#ifndef _CRTAPI2
#define _CRTAPI2 __cdecl
#define _CRTAPI2
/* Define __cdecl for non-Microsoft compilers */

0

Share this post


Link to post
Share on other sites
Just a quick question.
When I put PI in a variable (float or double), I always get 3.1416. But when I use assembler and do :
fldpi
fst pi

pi contains 3.14159
Can anybody explain the extra digit to me?
Thanks

0

Share this post


Link to post
Share on other sites
why the 20 digits?
in my coursebook it says that a float has 7 digits precisions
and a double has 15 digit precision
or is there a bigger FP-number?
0

Share this post


Link to post
Share on other sites