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

AlexM

cili_wabbit: Thanks, Mummy: 3d S&H alg

0 posts in this topic

um, i can sort of see how that goes now, THANKS!! cili_wabbit !!, i was ABOUT to scold you for ur "easiness": Mummy: a suggestion. not sure if it works exactly, it is a scary alg. it does 3d S&H clipping (go to the link if u don't know what that is), like it or not (it may be slow, but its practical), but like i said, you can just transform the poly and do 2d S&H. Also use the bounding sphere idea for rough cutting. 3D S&H: the idea is the same as 2d S&H, take the poly, clip it against each of the planes by clipping each line seg in it (you have to send the resulting poly to the next function in order each time) first an alg to find the intersection point of a line seg (v1 to v2) and a plane: there is a very descent way of doing that WITH your Hesse form, i got a hint of it from my Math teacher (well, they are good for some things! ) here it is: v1:=1st vert in seg, v2:=2nd vert in seg, P:=plane vertex, N:=plane normal(hesse),t:=time/blend factor,v2v1:=vect v1 to v2 let W(t) = v1 + t*(v2v1) (3d line eq) and Vt = vector P to Wt, now solve for 't' so that Vt is perpindicular to the Hesse normal, so Vt o N = 0. this comes out to be: (v1xNx+v1yNy+v1zNz - PxNx-PyNy-PzNz) / (v2x-v1x+v2y-v1y+v2z-v1z) == t which is: (v1 o N - P o N) / (v2x-v1x+v2y-v1y+v2z-v1z) == t YOU will have to check these calcs, but i'm sure the eq is possible. THIS equation holds for all cases, giving you 't', the time factor of the vector line. NOW you get Wt, which is the intersection point: Wt = v1 + t(v2v1) Now, make six functions, one for each plane. each function will accept a ptr to a poly struct, v1 and v2. init 2 poly structs to empty, call the first plane clipping func as many times as there are segments (you will have to do vertex wrap around on the last seg), pass it one of the empty structs and the v1 and v2 of the seg. call the next clipping func with the current poly, pass it the other empty poly, and keep alternating (see the link to get the idea, its 2d, but same principle). Now the leftplane clipping: find the Wt for the seg, check if Wt is between the two segment vertices (comp x,y,z). if it isn't, the seg is either on one side or the other, find out which by ur Hesse alg, if it is outside, just forget about it, its totally out. if inside, add v2 to the temp poly. if Wt is between the two, find out which of the vertices is outside and which is inside. if v1 is out, add Wt and v2, if v2 is out, only add Wt. i don't know myself why this order, but it works in 2d, should work in 3d. do this for all six funcs. IN the end you have the final poly, u can just check if there are any vertices in it or not. sheeeezzz, maybe i should write an article Finally, the postmortem, i guess... IF this works in the first place (or it could be another 'intuition' of mine), i don't know whether it is any faster than just transforming the poly and doing 2d H&S clipping. like it or not. i'd like to credit Dale Hoffman, my Calculus 124 teach, for the intersection alg, and Jerome for info from that website. i'm also working on another alg that uses eq for convex polys and eq for a solid... but its a long shot, anyone want to fry their brains with me? oh, &&& somebody confirm: is this a valid eq for any convex poly of N verts??: V1,V2,V3...Vi:=poly vertices N:=num poly verts W:=the tested arbitrary vector from origin to (x,y,z) F(i):=function defined later Sum of (F(i)) from i = 1 to N == 360 (degrees) F(i) = {if i == N, the smallest angle between W->Vi & W->V0 else, the smallest angle between W->Vi & W->Vi+1} Thanks in advance!! Alex. **once again, the link: http://pages.infinit.net/jstlouis/3dbhole/ Edited by - AlexM on 1/11/00 12:40:55 AM
0

Share this post


Link to post
Share on other sites