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

wolverine

Members
  • Content count

    346
  • Joined

  • Last visited

Community Reputation

358 Neutral

About wolverine

  • Rank
    Member
  1. Hi. This is a common problem within volume rendering and isosurfacing: given a cube with 8 values at its vertices, what is the value at a point p within the cube. The usual approach is to use trilinear interpolation. There are a lot papers describing this. For example, see the beggining os section 2 of this paper.
  2. Quote:Original post by Sneftel Indeed. If the line ends with a backslash, you'll need to put a space after it to keep the line break from being removed. Totally awesome, huh? Pretty much every thread about macros has this happen sooner or later. Yep, it worked :)
  3. Quote:Original post by LessBread Run some tests on those macros first. Iirc, there's an error in the generated code. I don't recall exactly where as it's been several years. Check your compiler specs for the command line switch that outputs preprocessor code. Instance those macros in your test file, then output the preprocessor results and review that code to locate the error. Quote:Original post by DevFred Quote:Original post by LessBread Check your compiler specs for the command line switch that outputs preprocessor code. gcc -E I've tried the code and made some changes. The changes were: * due to html, the operator "->" was posted as "-". I've replaced that on the code. * added "#define DEF_SIZE 2" since it was needed by the code (it assumed the value existed). However, it's easy to change the code to eliminate this need. * in the macro-function "int type##_AddElem(type##_Vector *pV, type Data)", I've replaced the first if from "if(pV-len = pV-size)" to "if(pV->len == pV->size)" * in the macro-function "type type##_GetElemAt(type##_Vector *pV, int pos)", I've replaced the if "if(pos = 0 && pos <= pV-len)" to "if(pos >= 0 && pos < pV->len)" Here's the modified code: #include <stdio.h> #include <stdlib.h> /*Macro definitions from http://www.flipcode.com/archives/Faking_Templates_In_C.shtml*/ #define DEF_SIZE 2 #define CREATE_VECTOR_TYPE_H(type) \ typedef struct _##type##_Vector{ \ type *pArray; \ type illegal; \ int size; \ int len; \ } type##_Vector; \ void type##_InitVector(type##_Vector *pV, type illegal); \ void type##_InitVectorEx(type##_Vector *pV, int size, type illegal); \ void type##_ClearVector(type##_Vector *pV); \ void type##_DeleteAll(type##_Vector *pV); \ void type##_EraseVector(type##_Vector *pV); \ int type##_AddElem(type##_Vector *pV, type Data); \ type type##_SetElemAt(type##_Vector *pV, int pos, type data); \ type type##_GetElemAt(type##_Vector *pV, int pos); #define CREATE_VECTOR_TYPE_C(type) \ void type##_InitVector(type##_Vector *pV, type illegal) \ { \ type##_InitVectorEx(pV, DEF_SIZE, illegal); \ } \ void type##_InitVectorEx(type##_Vector *pV, int size, type illegal) \ { \ pV->len = 0; \ pV->illegal = illegal; \ pV->pArray = malloc(sizeof(type) * size); \ pV->size = size; \ } \ void type##_ClearVector(type##_Vector *pV) \ { \ memset(pV->pArray, 0, sizeof(type) * pV->size); \ pV->len = 0; \ } \ void type##_EraseVector(type##_Vector *pV) \ { \ if(pV->pArray != NULL) \ free(pV->pArray); \ pV->len = 0; \ pV->size = 0; \ pV->pArray = NULL; \ } \ int type##_AddElem(type##_Vector *pV, type Data) \ { \ type *pTmp; \ if(pV->len == pV->size) \ { \ pTmp = malloc(sizeof(type) * pV->size * 2); \ if(pTmp == NULL) \ return -1; \ memcpy(pTmp, pV->pArray, sizeof(type) * pV->size); \ free(pV->pArray); \ pV->pArray = pTmp; \ pV->size *= 2; \ } \ pV->pArray[pV->len] = Data; \ return pV->len++; \ } \ type type##_SetElemAt(type##_Vector *pV, int pos, type data) \ { \ type old = pV->illegal; \ if(pos = 0 && pos <= pV->len) \ { \ old = pV->pArray[pos]; \ pV->pArray[pos] = data; \ } \ return old; \ } \ type type##_GetElemAt(type##_Vector *pV, int pos) \ { \ if(pos >= 0 && pos < pV->len) \ return pV->pArray[pos]; \ return pV->illegal; \ } /* this is supposed to go into an h file*/ CREATE_VECTOR_TYPE_H(int) CREATE_VECTOR_TYPE_H(double) /* this is supposed to go into an c file*/ CREATE_VECTOR_TYPE_C(int) CREATE_VECTOR_TYPE_C(double) /*main*/ int main() { // then you use the functions like int_Vector iv; double_Vector dv; int_InitVector(&iv, -1); // -1 is the illegal double_InitVector(&dv, -1.0); // -1 is the illegal int_AddElem(&iv, 10); int_AddElem(&iv, 11); int_AddElem(&iv, 12); /*cool, it grows*/ double_AddElem(&dv, 3.1415); printf("intvector at[%d]=%d [expected 10]\n",0,int_GetElemAt(&iv,0)); printf("intvector at[%d]=%d [expected 11]\n",1,int_GetElemAt(&iv,1)); printf("intvector at[%d]=%d [expected 12]\n",2,int_GetElemAt(&iv,2)); printf("intvector at[%d]=%d [expected -1]\n",3,int_GetElemAt(&iv,3)); printf("doublevector at[%d]=%e [expected 3.1415]\n",0,double_GetElemAt(&dv,0)); printf("doublevector at[%d]=%e [expected -1.0]\n",1,double_GetElemAt(&dv,1)); printf("doublevector at[%d]=%e [expected -1.0]\n",2,double_GetElemAt(&dv,2)); int_EraseVector(&iv); double_EraseVector(&dv); return 0; } I didn't had time to make extensive testing... I'll problably do it in a day or two and say something then. EDIT: ooooooops this code appears as strange here on gamedev... it's because of the macros :( EDIT2.1: Followed Sneftel sugestion and replaces the "\" by "\ ". If you copy and paste the code and try it, it will generate warnings on some compilers because of the space after the slash. Some other compilers, may even generate an error on this. If you have problems, just replace "\ " for "\" [Edited by - wolverine on August 20, 2008 4:16:54 PM]
  4. Quote:Original post by LessBread Faking Templates In C wow... Mighty cool :D
  5. Quote:Original post by Hodgman Quote:Original post by Gage64 What if I want to use a vector of ints and a vector of floats in the same program? in my example the structures would be named vector_int and vector_float. The vec_init and vec_push_back are overloaded for these two types. Whether we are considering real overload or not, it will not help you here. Both those functions are referring to the same ELEMENT_TYPE. The "user" would have to redefine the same ELEMENT_TYPE for int and for float which would be not so easy to deal with... Aditionally, if the sizes of the types are different, push_back may not work. [added: DevFred answered that first then me :)! he's fast :D ] The approach I've seen most used is the first one Quote:Original post by DevFred a) Implement a vector with element type pointer-to-void and do casting on the client side. Would it be possible to store integers directly as pointer-to-voids? Is (int)((void*)i) guaranteed to be i, assuming sizeof(void*) == sizeof(int)? Or could I only store pointers in such a vector? where you carry a structure for the vector arround in each function. Something in the lines of: typedef struct { int sizeOfEachElement; int maxCapacity; int numberOfElements; void *data; }GenericVector; void genericVector_Init(GenericVector *vector, int maxElems, int sizeOfEachElement) { vector->sizeOfEachElement = sizeOfEachElement; vector->maxCapacity = maxElems; vector->numberOfElements = 0; vector->data = malloc(sizeOfEachElement * maxElems); } int genericVector_PushElement(GenericVector *vector, void *element) { if(vector->numberOfElements >= vector->maxCapacity) { /*Error condition. vector is full.*/ return ERROR_CODE; } else { memcpy(); memcpy(vector->data + vector->numberOfElements, element, vector->sizeOfEachElement); vector->numberOfElements ++; return 0; } } void genericVector_Destroy() { vector->sizeOfEachElement = 0; vector->maxCapacity = 0; vector->numberOfElement = 0; free(vector->data); vector->data = NULL; } int main() { GenericVector intVect, doubleVect, elephantVect; genericVector_Init(&intVect, 10, sizeof(int)); genericVector_Init(&doubleVect, 20, sizeof(double)); genericVector_Init(&elephantVect, 10, sizeof(Elephant)); ... } [Edited by - wolverine on August 20, 2008 6:35:33 AM]
  6. Quote:Original post by Sneftel Thanks for the links, everyone. VisualMind looked good, but the price was a bit extravagant. Misi's wiki linki led me to FreeMind, which seems great so far. Freemind is cool, it even allowd you to create links to docs in the nodes (which comes in handy for me). My only small complaint is that sometimes it's hard to control the exact display of the graph (for example, having all the child nodes at the left of the parent node). But it is excellent for a free product!
  7. It seems that Carmack's 2008 keynote has just become available on-line: link
  8. Quote:Original post by Eelco It also depends. If you tailor your living situation to your commute, public transportation can work fine. If you dont pay any heed, you might end up having to do something like bus->train-&>bus, with 50 minutes of pure travel time and 30 of transfer time, even though you live right next to amsterdam. If your house or place of work is near a public transportation hub, thats a big plus. If you are lucky/clever you can go from work to your home in the next city in 15 minutes or so by train. Quote:Original post by WanMaster Within the city it's pretty good, although many prefer to use bikes. The western part of the Netherlands has a high density network of various types of public transport, but the other cities of the country are also well connected. Ok, thank you both. I will look into the public transportations and the wester part of the Netherlands :). txs
  9. Quote:Original post by Eelco Most figures here are gross, btw. Gross 3000 - net < 2000 sounds plausible for someone in your position id say. So, taxes are high... bummer :(. Looks like that if I really go I will have to do a lot of digging to find a good house/bedroom for a good price. Do public transportations work well? I mean... if you are far from Amsterdam, is it easy to enter the city in public transportations or do you take a lot of time to do it?
  10. Quote:Original post by PouyaCat Well... Amsterdam is BLOODY EXPENSIVE! Real question is; what is the Amsterdam area? I live about 1 hour away from the city center, and here things are affordable. Mind you, I live nearly on the other side of the country *laughs* Anyway, I'd say, expect 2000 ~ 2500 euro's a month (gross), provided you can do webdevelopment as well. Cost of living? For 700 ~ 1000 a month you can live nicely, depending on your comfort level (thinking about: car, appartment (2 bedroom), good food, and fun) EDIT: addendum: of course, depends on where you live. I spend less than 200 on my appartment. In Amsterdam, expect to pay around 800 to 1000! Thanks for the information... This was the kind of insight I needed. Maybe I can stay near Amsterdam.
  11. Quote:Original post by speciesUnknown "Personal reasons" hmm? Everybody thinks about permanently moving to Amsterdam at some point in their lives, and renting a cheap apartment in the red light areas. But the vast majority of us don't do it. lol. I can see it now... he codes during the day, he lives on the red light during the night.
  12. Hi all, due to personal reasons, I'm considering going abroad to Holland. Can anyone help me finding out what's the average salary in Holland for someone with a degree in Computer Science with about 1,5 - 2 years of experience? Also, what's the average cost of everyday life over there (bedroom rent, food, transportation), particularly in the area of Amsterdam? Thxs
  13. Hi By reading your post, I get the feeling that you aren't very updated on the subject... I would recomend that you get a serious reference on it (Real-Time Rendering is excellent). Also, Michael Abrash' Graphics Programming Black Book is quite old (*very* old , only discusses software rendering, but is free and *very* interesting) and on the last chapters he discusses several different algorithms that were considered to be used in the Quake engine which you may find interesting [Edited by - wolverine on January 28, 2008 1:30:00 PM]
  14. Quote:Original post by Vanisher Man, gimme a break, I'm new. Ish. I'm not sure where i got SDL from I'll have to check. All i know is that it came in a zip with very poorly written instructions on how to install it on VC++ which didn't help at all because I'm using DEV-C++. Now I feel like a moron. If you follow the link given by rip-off you'll eventually get to this page: Setting up SDL in Dev C++
  15. Quote:Original post by OrangyTang Is there a transcript anywhere out there? I'd rather read some nice, small, text rather than spend ages for a video download. I've found this blog: live blog but it's not a transcript... just a "live blog" of the speech (as such, it doesn't have much extended info). P.S. I've added the Q&A video link at the 1st post.