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

EngineProgrammer

Members
  • Content count

    92
  • Joined

  • Last visited

Community Reputation

295 Neutral

About EngineProgrammer

  • Rank
    Member

Personal Information

  • Location
    Oudenaarde, Belgium
  1. Hey everyone, I'm just having some fun with reinventing many wheels. [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] I just love to understand the low level programming! So here is what I want to do: basically I want to make my own pixel drawing system. I want to create a pixel class which stores a color. After I make an array of [640][480] which will be my "screen". When I gave all pixels a color I want to draw every pixel on the screen. How can I draw all pixels on the screen? SetPixel is a very slow method so I want to avoid that. Is it possible to directly connect my pixels to the screen pixels? How does the GDI communicate with the screen pixels? How can I communicate with the screen pixels without using the GDI or SetPixel? Is it even possible? Kind regards, Jonathan
  2. OpenGL

    Thanks for the help, I've made a colorshader last year, but I didn't understood a single line of code what I was writing. Shaders are quite hard to understand for me. How does DirectX render his transformations? I just made a matrix class that can translate, scale and rotate. Tested it and it works. Don't mind how I use the methods. It's just a testing project. [CODE] Matrix matTranslate, matRotate, matScale, matWorld; matTranslate.SetAsTranslate(-0.7f, -0.4f); matRotate.SetAsRotate(80.0); matScale.SetAsScale(0.5,0.5); matWorld = matRotate * matScale * matTranslate; Matrix::SetAsWorld(hDC, matWorld); Rectangle(hDC, -1, -1, 1, 1); [/CODE] This is what I use for my transformations: [CODE] Matrix::Matrix(): eM11(0.0f), eM12(0.0f), eM13(0.0f), eM21(0.0f), eM22(0.0f), eM23(0.0f), eM31(0.0f), eM32(0.0f), eM33(0.0f) { } void Matrix::SetAsTranslate(float x, float y) { eM11 = 1.0f; eM12 = 0.0f; eM13 = 0.0f; eM21 = 0.0f; eM22 = 1.0f; eM23 = 0.0f; eM31 = x; eM32 = y; eM33 = 1.0f; } void Matrix::SetAsRotate(float radians) { eM11 = (float)cos(radians); eM12 = (float)sin(radians); eM13 = 0.0f; eM21 = (float)-sin(radians); eM22 = (float)cos(radians); eM23 = 0.0f; eM31 = 0.0f; eM32 = 0.0f; eM33 = 1.0f; } void Matrix::SetAsRotate(double degrees) { float radians = (float)(degrees/180 * M_PI); eM11 = (float)cos(radians); eM12 = (float)sin(radians); eM13 = 0.0f; eM21 = (float)-sin(radians); eM22 = (float)cos(radians); eM23 = 0.0f; eM31 = 0.0f; eM32 = 0.0f; eM33 = 1.0f; } void Matrix::SetAsScale(float x, float y) { eM11 = x; eM12 = 0.0f; eM13 = 0.0f; eM21 = 0.0f; eM22 = y; eM23 = 0.0f; eM31 = 0.0f; eM32 = 0.0f; eM33 = 1.0f; } Matrix operator*(const Matrix& ref1, const Matrix& ref2) { Matrix mat; mat.eM11 = ref1.eM11 * ref2.eM11 + ref1.eM12 * ref2.eM21 + ref1.eM13 * ref2.eM31; mat.eM12 = ref1.eM11 * ref2.eM12 + ref1.eM12 * ref2.eM22 + ref1.eM13 * ref2.eM32; mat.eM13 = ref1.eM11 * ref2.eM13 + ref1.eM12 * ref2.eM23 + ref1.eM13 * ref2.eM33; mat.eM21 = ref1.eM21 * ref2.eM11 + ref1.eM22 * ref2.eM21 + ref1.eM23 * ref2.eM31; mat.eM22 = ref1.eM21 * ref2.eM12 + ref1.eM22 * ref2.eM22 + ref1.eM23 * ref2.eM32; mat.eM23 = ref1.eM21 * ref2.eM13 + ref1.eM22 * ref2.eM23 + ref1.eM23 * ref2.eM33; mat.eM31 = ref1.eM31 * ref2.eM11 + ref1.eM32 * ref2.eM21 + ref1.eM33 * ref2.eM31; mat.eM32 = ref1.eM31 * ref2.eM12 + ref1.eM32 * ref2.eM22 + ref1.eM33 * ref2.eM32; mat.eM33 = ref1.eM31 * ref2.eM13 + ref1.eM32 * ref2.eM23 + ref1.eM33 * ref2.eM33; return mat; } void Matrix::SetAsWorld(HDC hDC, const Matrix& mat) { XFORM form; form.eM11 = mat.eM11; form.eM12 = mat.eM12; form.eM21 = mat.eM21; form.eM22 = mat.eM22; form.eDx = mat.eM31; form.eDy = mat.eM32; SetWorldTransform(hDC, &form); } [/CODE] The calculations I've written on paper first with help from a book. So I didn't copied anything from the internet. I'm getting the hang of matrices very fast with this book, next chapter is linear transformations! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] But indeed, I'm using GDI and it's getting pretty classic. But I really don't want to use a single external library. Because it's too "easy" then.. [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] I'm not trying to be stubborn. Any suggestions how I avoid the classic functions? DirectX also must use a classic way or are they working very low level and code all their rendering themselves?
  3. OpenGL

    I will gladly post my progress but it will take a while, today I realized I better learn matrices through 2D and when I understand everything I'll change to 3D. I'm making my own matrix class which will be supported with the function SetWorldTransform. This function works with XFORM but I'm not using this one. It's better to write my own calculations self so I can learn from it. When I got it all calculated I just put everything into an XFORM and transform the world. So when I understand the matrix and transform concept I go to 3D. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Or is there a better way to transform my object(rectangle, bitmap, etc)? I know matrices needs to be used to transform such an object, but I mean, is there something else to transform my world with?
  4. When looking at 3D projections and transformations I was thinking on 3Dsmax, which has multiple viewports. So I've tried to get my own viewport with logical units -1 to 1. Now I wonder if I'm using a modern way of setting up a viewport. I have found these functions on msdn but I have no idea if these are still used nowadays. [CODE] hDC = BeginPaint(hWnd, &ps); GetClientRect(hWnd, &client); SetMapMode(hDC, MM_ANISOTROPIC); SetViewportOrgEx(hDC, client.right/2, client.bottom/2, 0); SetViewportExtEx(hDC, client.right, client.bottom, 0); SetWindowOrgEx(hDC, 0, 0 ,0); SetWindowExtEx(hDC, 2, 2, 0); Rectangle(hDC, 0, 0, 1, 1); EndPaint(hWnd, &ps); [/CODE] This code sets up my window to 2 logical units, from -1 to 1. So like DirectX uses his viewport. And I've changed the viewport extends so when I scale the window, the objects in the window are scaled also.
  5. 4D "can" be visualized in 3D: [url="http://en.wikipedia.org/wiki/Tesseract"]http://en.wikipedia.org/wiki/Tesseract[/url] The fourth dimension can called whatever you like, some people say it's time, some people say it's space and some say it's an object in itself. Here is a nice link about how you project the 4D in 3D: [url="http://steve.hollasch.net/thesis/chapter4.html"]http://steve.hollasc...s/chapter4.html[/url] Four-dimensional geometry: [url="http://steve.hollasch.net/thesis/chapter2.html"]http://steve.hollasc...s/chapter2.html[/url]
  6. OpenGL

    [quote name='Bacterius' timestamp='1354853787' post='5007989'] [quote]It's all learning purpose. You say that I first need to work with the CPU, how do I do that? How can I choose which one I can use to get my project running? I know the difference between both tho, cpu only does 1 thing at the time while a gpu does multiple things at the same time. But no idea when I'm using a cpu or a gpu.[/quote] If you're not sure, you're definitely using a CPU [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] You only "use" the GPU (at least the current generation) by programming little programs called shaders (in HLSL, or GLSL) which perform very specific tasks (e.g. transform vertices, or shade pixels). All the rest is done by the driver automatically. You don't actually write complete software on it. Everything that you code in C++ or C# or Java or whatever language, really, is done on your CPU. [/quote] Damn, I messed up my mind then. Thank you for clearing this out! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  7. OpenGL

    Thanks everyone! Radikalizm, I'm not trying to make a commercial software renderer [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] DirectX and OpenGL can't be beaten so I won't try to. It's all learning purpose. You say that I first need to work with the CPU, how do I do that? How can I choose which one I can use to get my project running? I know the difference between both tho, cpu only does 1 thing at the time while a gpu does multiple things at the same time. But no idea when I'm using a cpu or a gpu. DracoLacertae, thanks for the examples! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] So drawing lines isn't that hard to get in 3D [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] Before I get on to it, I bought a math book which covers every mathematics what game programming concerns. So I hope to get a line or a 3D polygon on my screen today! uglybdavis, nicely done! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  8. OpenGL

    I would like to write a small copy of DirectX.[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] How do they handle the vertices and rendering of 3D models? How should it be handled for an optimal framework/engine? If my GPU can handle all the math, how can I render my 3D model with it? I still need to use some math from your first post or don't I? I'm looking up coordinate transformations and it's quite fun. [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img] And how about particles? Like when I have 1 million particles. How should I best handle them? Do I need to do all calculations and rendering on the GPU? Or are there better/faster ways? You are helping me already but I'm still a bit confused about how it all works with the gpu / cpu thing. I want to get an optimal render system for low poly models with materials, shaders, lightning, bouncings, etc. I know the pipeline for the graphics rendering but I can't go any further than the first step at the moment. For example I want to be able to load a whole environment like COD with all players, bullets, effects in it. Kind regards, Jonathan
  9. [quote name='gooncorp' timestamp='1354616824' post='5007028'] heres a death information system im working on it will have even more data when we are through a lot of this data will be sent via xml to a website where the player stats are saved thanks for checking it out [media]http://www.youtube.com/watch?v=z-FVrIwb2CI&feature=youtu.be[/media] [/quote] Your intensity of the bounced lights is on 100%? Way too much even for metal. Try to make it changeable. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Have watched some video's and I must say, really good work! Keep it up!
  10. OpenGL

    I'm looking up some information what GDI exactly is and this is a quote from wikipedia. [quote]Simple games that do not require fast graphics rendering use GDI. However, GDI is relatively hard to use for advanced animation, and lacks a notion for synchronizing with individual video frames in the video card, lacks hardware rasterization for 3D, etc. Modern games usually use DirectX or OpenGL instead, which let programmers exploit the features of modern hardware.[/quote] What makes DirectX a fast graphics renderer? How you decide the speed of rendering? I just want to get low-level what programming concerns. I really want to get the knowledge into my head how it's done. GDI only limited to 2D, how do I get the 3D in my program then? I'm assuming I need to calculate every pixel and draw them manually, please correct me if I'm wrong. I want to achieve real-time rendering. Dragging a 3D model into your window and be able to translate, scale and rotate in your project. But that is not for now, first the baby steps. But I can't do this alone sadly enough. Need some help from people who have experience in this because I can't find almost anything that helps me. maybe I'm not looking in the right place. [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img] Kind regards, Jonathan
  11. OpenGL

    A billion percent thank you! In Win32 there are some standard functions for example: SetWorldTransform, SetGrapicsMode, etc. and structs like XFORM. Should I make any use of those functions and structs or should I rather make my own ones? Kind regards, Jonathan
  12. OpenGL

    Hey everyone, has been a while I've programmed but I'm back. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] I know that re-writing existing code is useless. But I don't mind to re-write some code, I want to learn how it's done. I want to make a 3D polygon and draw it in C++, without using DirectX or OpenGL. I've been looking around after source codes or tutorials but haven't found a single tutorial that helps me. Very simple example of what I want to do: [CODE] m_Polygon = new Polygon(vertex1, vertex2, vertex3, vertex4); // where the vertexes have a X,Y,Z m_Polygon->Draw(); [/CODE] So I want to draw the 3D polygon in my 2D screen. Can someone help me with this. [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img] Thank you and kind regards, Jonathan
  13. Wooooaaaah that looks awesome!! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  14. Hi everyone! I'm digging into open source engines to understand their memory management but the more I look in it, the more confused I get. For example Unigine ( it's a nice engine ) uses different headers for all kind of allocations. [CODE] struct FixedChunk; struct FixedAllocator; struct HeapChunk; struct HeapPool; struct HeapAllocator; struct SystemAllocator; struct Allocator; struct Memory; [/CODE] Why are they using so many structs(all in different headers)? An allocator is an allocator so why don't they just write 1 struct: Allocator. and use it for everything. I don't get it why they uses so many structs. So if someone could explain this for me, thank you! ~EngineProgrammer
  15. [quote name='Radikalizm' timestamp='1349654444' post='4987804'] [quote name='EngineProgrammer' timestamp='1349653462' post='4987801'] Win32, DIrectX, OpenGL: Win32 is the standard library of C++. It's only supporting windows. DirectX is the best choice, even it's not supporting cross-platforming yet. With the possibilities of this library you can create any application you have in mind! OpenGL and DirectX were racing neck on neck a few years ago but they update of DirectX made OpenGL run behind. But it's an easy language to use. [/quote] Why do you drag Win32 into a discussion of graphics APIs? Win32 is not the C++ standard library for windows, Win32 is the basic Windows API which exposes Windows core functionality to developers. The latest OpenGL release also made it basically on par with DirectX again, so there's no issue there. I also wouldn't expect DirectX to ever go cross-platform (at least not in a way condoned by microsoft), but that doesn't mean an engine shouldn't support DirectX even if that engine will be cross-platform. [quote name='EngineProgrammer' timestamp='1349653462' post='4987801'] If you want to make it open source, be sure to really have everything bug-free, error-free. You don't want the clients to complain about your engine, even it's open source. [/quote] There's no such thing as bug-free or error-free software [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] [/quote] Sorry for my misunderstanding about Win32. I meant the header file <windows.h> with Win32. And that can also be used to write a game engine with, so I dragged it into this discussion. About OpenGL, my programming lecturer said 3 weeks ago that OpenGL is running behind DirectX and he is looking updates about programming stuff every day so I assume he is right. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Though I should have checked first on their sites before posting it here. My apologize. But still, I've programmed with OpenGL last year for a month, I think it was child coding to be honest. But in a year allot can happen of course. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] There is no such thing as a bug-free and error-free game engine? Yes there is... With enough checking code, and a good team of programmers. [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] But yes, it all depends on the client who uses your engine. If he can't work with it properly failing stuff will happen indeed. But that's not the fault of the engine but of the client. Still, a good engine would be prepared for moments like that and be sure to have enough error checking. But my experience in programming isn't that much, I just try to help others with the knowledge I have at the moment. If you can give me an example of an unfix-able piece that you can't keep error-free, please tell because I want to know. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] ~EngineProgrammer