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

Patrick Polzin

  • Content count

  • Joined

  • Last visited

Community Reputation

126 Neutral

About Patrick Polzin

  • Rank

Personal Information

  • Location
  1. I develop general definitions and functions for the collision system. The math library of bsxEngine helps really to do that :-D.
  2. #include <earth.h> int main(int n, char **args) { Earth *EarthInstance = new Earth; while(Earth->run()) { if(Earth->IsException()) break; } delete EarthInstance; }
  3. DX11

    Oh my god, and now it works fine. Sometimes I watching hours to the monitor and a can't find the bug. What for an horror to waste time for this simple bug. Really really thank you! [smile] And the day is saved!
  4. Hi guys, since yesterday I want to try to include additional HLSL Shader Files with the D3DX11 Effect Framework but I have none success. As I looked to the documentation, I found out that I have to create a class which inherits from ID3D10Include and I have to write the functions Open() and Close(). I think Close() isn't a problem, but Open(). As I read from documentation, I'm reading "A user-implemented method for opening and reading the contents of a shader #include file.". So I'm understanding that I have to read the content from a file and save it into ppData. Am I right? // The defined open Method for ID3D10Include STDMETHOD(Open)(D3D10_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) { // Read the file content FILE *f = fopen(pFileName, "rb"); if(f == nullptr) { char buffere[2048]; sprintf_s(buffere, 2048, "Could not load the effect include file \"%s\".", pFileName); BSX_ERROR(buffere); return E_FAIL; } // Get the file size fseek(f, 0, SEEK_END); long sz = ftell(f); fseek(f, 0, SEEK_SET); // Get the file content char *buffer = new char[sz]; fread(buffer, 1, sz, f); fclose(f); // Save the file data into ppData and the size into pBytes. *ppData = buffer; pBytes = new UINT; *pBytes = UINT(sz); // return E_FAIL; // Because it isn't successfull supported... return S_OK; } But it doesn't work and my shader is telling me, that the definitions from the include file are not known. Another possibility I checked out was to compile the shader file. But here the shader will completly fail. The ID3D10Include::Open() should be identical with it from D3D9 and D3D10 the documentation says. Has somebody an idea where the problem is or knows my ideologic error? [oh] Thank you
  5. Hi, do you mean direct train simulation? There are existing none good SDKs to solve it. Using "normal" physics functions like collision testing will give very hard numeric errors and not "the" simulation. For trains especially there are existing different formulars dependend on acceleration or how the driver drives (gears, brake ect.). For only drive physics you have to solve the following equation (abstract and simplyfied): F_result = F_acc - F_roll - F_air - F_gr - F_train - F_switch - F_track F_acc = force of acceleration (advanced: eg. motor gears, steam pressure) F_roll = force of rolling (advanced: eg. major while speed is small) F_air = force of air (0.5 * µ * p * v^2 * A) F_gr = sin(a) * m * g Simplified and abstracted equations to simulate train forces: F_train = (F_a%)*v^2 + (F_b%)*v + F_c (F = Cubic + Linear + Constant) F_switch = W%. * v * m * g (mostly small, W%. in promille) F_track = (Ta%. * v * m * g) + Tb% * lg(d * v^2) + Tc% * exp(-ev) (F = Linear + logarithmic (small increasing in high speeds) + exponential part (high in slow speed, near 0 in high speed)) I hope this was the entrance to get involved with trains. But beware: They are not so easy as they will look. This topic is filling many books and if you are able to understand german you will find in Amazon some good books about this topic (but with many physics and formulas). I hope my english is good enough to understand what is meant, because I'm not very good in it ;).
  6. Hi, Yes it is still rendering the triangles. Yeah, running with none errors, DirectX debug output is also applied. Cg Errors don't come. Watching to the parameter is showing none invalid addresses. But I'm think that I'm nearer to the problem: // The parameter address is valid. So I set the value, like this: cgSetParameter4f(_Parameter, 1.0f, 0.0f, 0.0f, 1.0f); for uniform float4 Color; // Then, before applying the pass, I update the pass parameters: cgUpdatePassParameters(_Pass[PassNr]); // Next I'm setting the vertex data and binding the pass to DirectX and draw the shape, after it I unbind the pass: Device.SetVertices(VertexBuffer); cgSetPassState(_Pass[PassNr]); Device.Draw(3); cgResetPassState(_Pass[PassNr]); I see it is also that what the manual says - but it doesn't still work. I also applying following: cgSetParameterSettingMode(ShaderContext.Get(), CG_DEFERRED_PARAMETER_SETTING); cgSetSemanticCasePolicy(CG_UNCHANGED_CASE_POLICY); But that doesn't work and no errors will come. Additionally you can see here the (wrapper) code for all implementation detail: bscgeffect.h: The effect framework main.cpp: The test implementation SphereShader.cgfx: The Cg Shader Thanks for help!
  7. Hello, I'm new to Cg Shaders from nVidia and have developed a small wrapper to handle these shaders. All will be apply as I want but there is one thing that let me not sleep: Setting a parameter. So first here's the history how the working with parameters will done: I'm using Cg Effects (cgfx) and load them with their techniques. So first I get my parameter handle after creating the context, effect and assigning techniques, this works sucessfull and the handle is valid: // Get effect data if(!ShaderContext.Create(Device)) return 0; cgSetErrorCallback(CgErrorCallback); // temporary if(!Shader.Create("Shader.cgfx", ShaderContext)) return 0; if(!Shader.AssignTechnique("Render")) return 0; // example: if(!Shader.GetParameter("color", Color, false)) return 0; The Color instance of the parameter class safes a CGparameter handle whoose valid. Next for rendering before I apply a technique I'm setting the values I want: … Color.Set4(1.0f, 0.0f, 0.0f, 1.0f); Shader.BeginPass(0 /* technique index */, 0 /* pass index */); Device.DrawIndexed(30); Shader.EndPass(0); … Setting the parameter will done like this: void Set4(const float x, const float y, const float z, const float w) { cgSetParameter4f(_Parameter, x, y, z, w); } The technique will applied with this code: const bool BeginPass(const UINT PassNr) { if(PassNr >= _Pass.size()) return false; cgUpdatePassParameters(_Pass[PassNr]); cgSetPassState(_Pass[PassNr]); _LastActive = PassNr; return true; } So when I want to assign the value to this test shader: float4 color : Color; struct VS_OUT { float4 Pos : POSITION; float4 Col : COLOR0; }; VS_OUT vs_main(float3 pos : POSITION, float3 nor : NORMAL) { VS_OUT Out = (VS_OUT)0; Out.Pos = float4(pos.xyz, 1.0); Out.Col = color; return Out; } float4 ps_main(VS_OUT Out) : COLOR { return Out.Col; } technique Render { pass p0 { VertexProgram = compile vs_4_0 vs_main(); FragmentProgram = compile ps_4_0 ps_main(); } } The parameter wouldn't apply. Has anybody an idea why this doesn't work? Thanks for help!