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

Daywalker313

Members
  • Content count

    157
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Daywalker313

  • Rank
    Member
  1. Thanks for your reply but this is really bad now. I could define some keyword that I add as a comment to the shaders and parse the shader file manually to find out wheter the shader requires blending enabled etc. But it's not clean in any way. Does someone know how professional games that are using cg/glsl/hlsl shaders handle this issue?
  2. Hi there, I want to enabled/disable blending an the blend function with my cg shaders. The problem is, I usually have to change their states inside my code but how should my program know wheter a shader makes a material semi-translucent? I googled a bit and found the CgFX standard, but it seems like it's hard to implement and I'd like to continue with simple cg shaders. Is there any way how I could manage this or is it true that I have to know which shaders will require blending related stuff at compile-time?
  3. Hi there, I am currently learning cg shaders and took the simple per fragment lighting from the "Cg Tutorial" book. It works fine on my computer with a GeforceFX, however, on my laptop which runs in mesa software mode, no lighting except for ambient and emissive shows up. It compiles fine on the laptop and the shaders are working (ambient+emissive+multitexturing) but I do no get diffuse and specular components. cgc compiles without an error too. Here are vertex and pixel shader (I know they are ... far from being fast especially the static parameters in the fragment shader but it's just a tryout): Vertex: struct vertex { float4 position : POSITION; float4 color : COLOR; float2 texcoord0 : TEXCOORD0; float2 texcoord1 : TEXCOORD1; // for per-fragment lighting: float3 vertex_position : TEXCOORD2; float3 vertex_normal : TEXCOORD3; }; vertex main( float4 position : POSITION, float3 normal : NORMAL, float4 color : COLOR, float2 texcoord0 : TEXCOORD0, float2 texcoord1 : TEXCOORD1, uniform float4x4 modelviewproj ) { vertex OUT; OUT.color = color; OUT.position = mul(modelviewproj, position); OUT.texcoord0 = texcoord0; OUT.texcoord1 = texcoord1; OUT.vertex_position = position.xyz; OUT.vertex_normal = normal; return OUT; } Fragment: struct pixel { float4 color : COLOR; }; pixel main( float4 position : POSITION, float4 color0 : COLOR0, float2 texcoord0 : TEXCOORD0, float2 texcoord1 : TEXCOORD1, float4 vertex_position : TEXCOORD2, float3 vertex_normal : TEXCOORD3, uniform sampler2D texture0, uniform sampler2D texture1, uniform float3 light_position, uniform float3 camera_position ) { pixel OUT; // vertex data: float3 P = vertex_position.xyz; float3 N = normalize(vertex_normal); // shininess: float shininess = 0.4; // light color: float3 light_color; light_color.x=0.3; light_color.y=0.3; light_color.z=0.3; // diffuse intensity: float3 diff_int; diff_int.x=0.3; diff_int.y=0.3; diff_int.z=0.3; // specular intensity: float3 spec_int; spec_int.x=0.4; spec_int.y=0.4; spec_int.z=0.4; // emissive: float3 emissive; emissive.x=0.1; emissive.y=0.1; emissive.z=0.1; // ambient: float3 ambient; ambient.x=0.1; ambient.y=0.1; ambient.z=0.1; // diffuse: float3 L = normalize ( light_position - P ); float diff_light = max (dot(N,L),0); // Prevent going below 0 float3 diffuse = diff_int * light_color * diff_light; // specular (highlights): float V = normalize (camera_position - P); float H = normalize (L + V); float spec_light = pow ( max (dot(N,H),0), shininess ); // Prevent going below 0 if (diff_light<=0) spec_light=0; float3 specular = spec_int * light_color * spec_light; float4 texelColor0 = tex2D( texture0, texcoord0 ); float4 texelColor1 = tex2D( texture1, texcoord0 ); OUT.color.xyz = (texelColor0+texelColor1)/2 * color0 * (emissive + ambient + specular + diffuse); OUT.color.w = 1; return OUT; } Related extensions supported by mesa: GL_ARB_fragment_program, GL_ATI_fragment_shader, GL_NV_fragment_program,GL_ARB_vertex_program, GL_NV_vertex_program, GL_NV_vertex_program1_1,... So anyone knows what might be wrong, maybe too many textures passes or some unsupported instruction on mesa? Thanks, Daywalker
  4. Hi, for my final exams I'm writing and designing a p2p filesharing tool, focussed on the serverless approach using the XOR metric of Kademlia. I think I have quite well understood the theory of connecting nodes and searching for keys, but a question still remains: How to implement a XOR based network in a filesharing application where each user serves n different files with completly different hashes without relation to his own hash? In Kademlia each node holds data with similar hashes (called keys) as the hash of the node itself (called node id). Node XY has a lot of documents to offer, but the hashes generated from the document-names (via SHA-1) will most likely have nothing to do with the hash of the node with is a requirement for the idea behind Kademlia. So how do we find nodes that have file XY if we just compare the hash of the files with the (unique) hashes of the nodes to jump closer? Because the nodes whose hash (ID) is closest to the hash of the search string obviously won't have requested informations... Sorry for the bad explaination but it's quite hard to describe the situation if your native language is not english and I hope that someone in here knows the Kademlia protocol quite well ;). PS: Please don't forward me to emule or other software because the source is a pain to understand *g*. Thanks ~Daywalker
  5. Hi, I want to write a backup-program as project at school under dos which should support saving restoring FAT32 (+NTFS if there's some DOS version with stable support) partitions. Unfortunately I wasn't able to locate any tutorial covering the backup / restore process of whole partitions and not single files. Does anybody know how it's done in Norton Ghost or others and how I can read/write disks/partitions? Thx, Daywalker