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

szpaq234

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

106 Neutral

About szpaq234

  • Rank
    Member
  1. it was 1 am, now it's clear. Thx anyway
  2. I'm trying to render a square in SlimDX. Code: [CODE] public class Square { public Buffer vertexBuffer; public Square(Vector3 origin, float edge, Device device) { DataStream Vertices; Vertices = new DataStream(12 * 5, true, true); Vertices.Write(new Vector3(1, 1, 0)); Vertices.Write(new Vector3(-1, 1, 0)); Vertices.Write(new Vector3(-1, -1, 0)); Vertices.Write(new Vector3(1, -1, 0)); Vertices.Write(new Vector3(1, 1, 0)); Vertices.Position = 0; vertexBuffer = new Buffer(device, Vertices, 12 * 5, ResourceUsage.Default, BindFlags.VertexBuffer, CpuAccessFlags.None, ResourceOptionFlags.None, 0); Vertices.Close(); } public void Draw(Device device) { device.ImmediateContext.InputAssembler.PrimitiveTopology = PrimitiveTopology.LineStrip; device.ImmediateContext.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(vertexBuffer, 12, 0)); device.ImmediateContext.Draw(4, 0); } } [/CODE] However, only first four elements of DataStream Vertices are rendered. For square, it corresponds to 3 lines. I tried other PrimitiveTopology like TriangleList, TriangleStrip or PointList, they all behave the same - load only first 4 vertices no matter how big original DataStream is. I remember to create vertexBuffer with the same size as DataStream and tried to make it bigger as well.
  3. can someone help me with this ? MJP says that i need vertex shader to make this work. I tried this: [code] uniform extern float4x4 WVPMatrix; float4 VertexShader(float4 pos : POSITION0) : POSITION0 { return mul(pos, WVPMatrix); }[/code] but only thing i get is:"syntax error: unexpected integer constant. Once again: i have only sprites in my application (ID3DXSprite)
  4. how vs for sprites should look like ? i don't have any vertices in my application
  5. I'm using pixel shader in my game based on sprites and "starter" looks like this: [code] sampler2D textureSampler; float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 { float4 Color; Color = tex2D(textureSampler, Tex); return Color; } technique PostProcess { pass Pass1 { VertexShader = null; PixelShader = compile ps_2_0 MyShader(); } } [/code] I want to use pixel shader 3.0 to use VPOS input semantic but whne i use PixelShader = compile ps_3_0 MyShader(); whole screen has uniform color. Can someone tell how ps 3 should look like ?
  6. websites expired, I love the Internet
  7. Can you give me some pointers ? My idea was to make all objects in my applications derived from one class. I can't use virtual functions because then i will have override them in all derived classes.
  8. I guess you meant this: [code]int main() { pSon = new Son(5); std::cout<<static_cast<Son*>(pSon)->GetInt(); return 0; }[/code] That one worked. Heh, i did not get the meaning of casting. Maybe i have to go through it again. Thx anyway.
  9. How do I do that ? [code]#include <iostream> class Mother { public: Mother(){} }; class Son : public Mother{ private: int f_iA; public: Son(int _in){f_iA = _in;} int GetInt(){return f_iA;} }; Mother* pSon; int main() { pSon = new Son(5); std::cout<<pSon->GetInt(); //'GetInt' : is not a member of 'Mother' return 0; } }[/code]
  10. I figured out how to "z sort" my sprites (ID3DXSprite) so i don't have to worry about which sprites are rendered first. I just change the z value for coordinates. However, i noticed some stupid flaw in this method. Look at the attached image. On the picture on the left, upper fern is rendered later so it covers lower fern, everything is ok. On the right i changed the z coord of the lower fern to make it cover the upper one. At the edges of the fern i can see the ground. Somehow the upper fern is not rendered correctly. Textures are TGA files. Things that i think are relevant: [code]D3DPRESENT_PARAMETERS pp; pp.BackBufferFormat = D3DFMT_A8R8G8B8; pp.EnableAutoDepthStencil=1; pp.AutoDepthStencilFormat = D3DFMT_D16;[/code] [code]g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, 0x0000FF00, 1.0f, 0L ); g_pd3dDevice->BeginScene(); gameRender(); g_pd3dDevice->EndScene(); g_pd3dDevice->Present( NULL, NULL, NULL, NULL ); [/code] Thank you.