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

Dimension10

Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

123 Neutral

About Dimension10

  • Rank
    Member
  1. Yeah, no kidding. I was so used to all of those tools and then they stopped working when i started using 2012.   The thing is, it has never worked. Ever since I first started. Even without the DXSDK.   One thing I AM trying to do lately is avoid the D3DX files. I would rather avoid dependency on the standalone SDK whenever possible, now that MS has shied away from it.     I'll try tweaking that setting real quick...   Oh wow. That did it! Thanks!   Of course, the intent is to be able to access the 1x1 mipmap level to output the color, will removing CPU readability affect it? If so, I think I have a workaround, but I would prefer all the speed I can get.     Edit: Okay, now I'm curious as to how you grab the front or back buffer. Do I have to create a swap chain first? And if so, would I still be able to get data that includes the windows GUI?
  2. Debug mode doesn't work, I guess it's because of VS Express? Debugging information could not be found or does not match.     But I tried several formats to no avail.
  3. I'm trying to create a texture for screen capture so I can grab the 1x1 mipmap to get the average color of the screen.   However, when I try to create the texture, it tells me I'm passing an invalid parameter (See error handling below), and I can't quite figure out what I'm missing here.   For those who know, it should be quick to spot. //Create Texture D3D10_TEXTURE2D_DESC tBufferDesc; ID3D10Texture2D *tBuffer = NULL; DXGI_SAMPLE_DESC iBufferSamples = {1,0}; tBufferDesc.Width = iScreenSizeX; tBufferDesc.Height = iScreenSizeY; tBufferDesc.MipLevels = 0; tBufferDesc.ArraySize = 1; tBufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UINT; tBufferDesc.SampleDesc = iBufferSamples; tBufferDesc.Usage = D3D10_USAGE_DEFAULT; tBufferDesc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_RENDER_TARGET; tBufferDesc.CPUAccessFlags = D3D10_CPU_ACCESS_READ; tBufferDesc.MiscFlags = D3D10_RESOURCE_MISC_GENERATE_MIPS; HRESULT tBufferResult = pDevice->CreateTexture2D(&tBufferDesc, NULL , &tBuffer); switch(tBufferResult) { case E_FAIL: ::MessageBoxA(NULL, "Attempted to create a device with the debug layer enabled and the layer is not installed.", "E_FAIL", NULL); return E_FAIL; case D3D10_ERROR_FILE_NOT_FOUND: ::MessageBoxA(NULL, "The file was not found.", "D3D10_ERROR_FILE_NOT_FOUND", NULL); return E_FAIL; case D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS: ::MessageBoxA(NULL, "There are too many unique instances of a particular type of state object.", "D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS", NULL); return E_FAIL; case E_INVALIDARG: ::MessageBoxA(NULL, "An invalid parameter was passed to the returning function.", "E_INVALIDARG", NULL); return E_FAIL; case E_OUTOFMEMORY: ::MessageBoxA(NULL, "Direct3D could not allocate sufficient memory to complete the call.", "E_OUTOFMEMORY", NULL); return E_FAIL; case S_FALSE: ::MessageBoxA(NULL, "Alternate success value, indicating a successful but nonstandard completion (the precise meaning depends on context).", "S_FALSE", NULL); return E_FAIL; case S_OK: ::MessageBoxA(NULL, "No error occurred.", "S_OK", NULL); break; }
  4. That's a good idea, perfect for my usage. though I worry about initializing devices and windows. How much initialization is generally required before I can create a texture and sample it down to 1 pixel?
  5. int main() { // Establish Arduino as a color controller on COM7. cColorController *Arduino; Arduino = new cColorController("COM7"); Arduino->setAdjust( 1, //Red Multiplier 0.8, //Green Multiplier 0.4, //Blue Multiplier 2.0 //Gamma ); // Create a Device Context handle to grab some pixels. HDC hdcScreen = GetDC(NULL); COLORREF CurrentColor; SetStretchBltMode(hdcScreen,HALFTONE); SetBrushOrgEx(hdcScreen, 0, 0, NULL); int ScreenWPix = GetDeviceCaps(hdcScreen,HORZRES); int ScreenHPix = GetDeviceCaps(hdcScreen,VERTRES); // Create a Buffer device to send data to. Todo: Buffer not working. HDC hdcBuffer = CreateCompatibleDC(NULL); BITMAPINFO hdcInfo; ZeroMemory( &hdcInfo.bmiHeader , sizeof(BITMAPINFOHEADER)); hdcInfo.bmiHeader.biBitCount = 24; hdcInfo.bmiHeader.biPlanes = 1; hdcInfo.bmiHeader.biHeight = 1; hdcInfo.bmiHeader.biWidth = 1; hdcInfo.bmiHeader.biSizeImage = 0; hdcInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); hdcInfo.bmiHeader.biClrUsed = 0; hdcInfo.bmiHeader.biClrImportant= 0; VOID *pvBits; HBITMAP bmpBuffer = CreateDIBSection(hdcBuffer, &hdcInfo, DIB_RGB_COLORS, &pvBits, NULL, 0); SelectObject(hdcBuffer, bmpBuffer); while(1) { //Stretch the screen down to a single pixel. StretchBlt(hdcScreen, 0, 0, 1, 1, hdcScreen, 0, 0, ScreenWPix, ScreenHPix, SRCCOPY); //Get this pixel's color, rather than call GetPixel for r, g, and b. CurrentColor = GetPixel(hdcScreen, 0, 0); Arduino->setColor(GetRValue(CurrentColor), //Send this color to the Arduino GetGValue(CurrentColor), GetBValue(CurrentColor)); //Todo: Have Arduino read COLORREF //Sleep(16); } ReleaseDC(NULL, hdcScreen); return 1; }
  6. "You could sample 1 pixel out of every 4x4 pixel square across the screen and cut your work to 1/16th of the StretchBlt method"   I figured that much. I was working on a method, actually, for creating a pixel density function so that the samples are more dense near the edges of the screen.   But I figured stuff like BitBlt and StretchBlt would grab a whole chunk of data while it's open, THEN extract what it needs.   I figure the only method I would really have for grabbing individual pixels is GetPixel(). But since it would re-access the device context each time, I figured that would be like shutting off the engine in your car every time you make a new turn.   I like your idea of keeping a few frames. It would also be interesting to dither the samples in a sense, like take a random pixel out of each 4x4 block, and keep the previous two or so frames.     Edit: And one more quick thing, if possible. How would I go about creating a buffer HDC? I tried creating one, and all I really got was a mess of digits that remained static. So as it is, I'm writing the average color to a pixel, and writing that pixel at 0,0 on my screen, then accessing the whole screen again just to grab that pixel.
  7. Right now, I'm working on a method for quickly grabbing the average screen color and spewing it out to my arduino to control my room's RGB strips.     I've been using mostly device contexts like GetDC(NULL) and then using StretchBlt to "stretch" it down to one pixel. But that seems like a ludicrous number of calls in total. I see about 15 fps and 6% cpu usage. (When grabbing one pixel, it's probably 100+ fps with <1% usage.)         But, I've heard there's a way to directly access the GPU's framebuffer. In which case, if GDI uses the framebuffer, I could grab the frame and have the GPU do the averaging massively parallel via CUDA, then send the returned color directly to the Arduino.   But that would depend strictly on if the windows GUI uses the framebuffer. (And perhaps how much initialization it would take to access it.)  
  8. So I'm working with DirectX, and I'm wanting to have most of my main configuration constants stored in an .ini file.   I used this method originally: http://www.codeproject.com/Articles/10809/A-Small-Class-to-Read-INI-File   I combined the two classes into a single class with a single header and .cpp file, with a couple of my own tweaks. Worked like a charm! It's nice beting able to choose file/section/key/value, and declare each file as its own object.     However, when trying to implement this into windows programs, it seems to work differently.     In the case here:   GetPrivateProfileString(szSection, szKey, szDefault, szResult, 255, m_szFileName);    I get errors because it's trying to pass char* pointers, but I guess the winAPI version looks for an LPCTSTR instead.    So if I change all char* to LPCTSTR, then memset and memcpy have issues, since they are looking for a char*           All that aside, is there an easy method for working with .ini files? I know they're considered outdated, but it's used heavily in the Unreal Engines, and I prefer that method of configuration over using the registry as M$ recommends.
  9. C++ may not be "required", but it's about as highly recommended as you get. Scripting languages have to run on top of some sort of interface, and that interface is usually programmed in a language like C++.   The point being: If you're a gameplay programmer, you'll probably be programming such interfaces, such as how UnrealScript translates to actual executable commands.   But if you know C#, C++ should be cake. The C languages are quite similar. And if a company is looking for C++ knowledge, I wouldn't count yourself out just because you only have C#. DirectX and OpenGL can use either.   But it would help you, overall, to get your feet wet in C++. Try the google channel "programminghelp.org". It's where I learned, and he's quite descriptive.
  10. So after learning a bit about DirectX, I understand that most of what goes on happens inside the message loop.     Is there any way to take everything inside the message loop and reference it to another file? I would rather not have all my game code crumpled up into one source file.     I tried creating a function, void Game(), which is called within the message loop. I declared it in a header file, and defined it in another source file that had the same #includes as the main source file. However, any of the creation, drawing, and present commands are unrecognized. I'm guessing it's referencing something within WinMain().   But the only immediate way I could see this being resolved is by including the main source file, which is a horrible idea. Either that, or inputting all the necessary functions as parameters.  (Which would either be tons of parameters, or a really large struct.)   But I see games and tutorials that are able to use a simple Game() function...         So if not, how can I do all my drawing somewhere BESIDES the main source? I would rather put the initialization as far behind me as possible.
  11. Okay, thanks. Initialization is the #1 part I'm afraid of. I'm watching John C Murphy's tutorials on YT, and it's an insane amount of stuff to remember. It seems like to be decently efficient at DX programming, you would need all of the initialization done in some sort of pre-made template, then access a "Game()" function of sorts to actually get the programming done. That way all of the actual game information can be consolidated elsewhere.   But the farther I go into this video, the less likely that seems possible.   Also, while the DX SDK is included with the Windows SDK, which is included with VS2012, it lacks the headers and library files needed for almost all of the tutorials online. Namely, d3dx11.h and DxErr.h. They are completely missing, so I had to download the SDK anyway.
  12. You are indeed correct. Though if your book said to subtract V (perpendicular) from ||V||, I sorta question the accuracy of the book.   I'm not sure what this book includes, but it might be good so supplement it with a math book, Khan Academy (khanacademy.org), or Wikipedia.   Some of the concepts, such as Linear Independence, Orthogonality, Inversion, Transposition, and Echelon Form, might come in handy in ways that aren't readily apparent, or are already included in OpenGL/DirectX.
  13. Hello all. I just now joined this site, and I had a few questions before I start getting my hands too dirty in game development.   (You can just skip over Goal and Knowledge. They're just there to give context.)   /////////////////////////////////////////////////////////////// Goal:   -I would like to design custom 3D engines, as well as GUI's to make game development more of a GUI experience. I used .werkkzeug for quite some time, and have become rather fond of the interface.   To me, creating my own sets of graphics methods is more interesting than the actual game development.   Knowledge:   -I know a lot of the concepts already, such as rasterization, shaders, normal mapping, tesselation, deferred rendering, etc. I'm especially interested in Voxel-based Global Illumination. What I lack is the actual implementation.   -I've been spending the summer learning C++, including object-oriented programming.   -I have some math under my belt: Differential/Integral/Mulltivariable Calculus, Linear Algebra, and two semesters of Differential Equations. ///////////////////////////////////////////////////////////////////////////////////////////     Okay, so here are my questions:   1) Which would you recommend: DirectX or OpenGL? Which is generally easier to work with, and what are the differences?   2) I notice that DX projects have some brutal initialization. It looks like 20+ headers and sources just to make a window. I understand some of the stages, but is this normally all done manually, or is it more common to start off with a framework, and add in what you need?
  14. For those of you who haven't heard of [url="http://www.theprodukkt.com/werkkzeug1"]Werkkzeug1[/url]: It's a realtime music/3d demo tool. For anyone interested in realtime 3d, It is definitely worth your time to mess around with it. It's a very visual/spatial oriented GUI. I'm new to 3d programming. Like, very new. But I'm very familiar with 3d terms and whatnot. Basically, I am wanting to create a program similar to Werkkzeug1, mostly in the following aspects: -Awesome GUI (operator stacking) -Channel-based tempo and synchronization support -Post-Processing effects -Render targets -Pixel shader algorithms -Highly-customizable operator variables -Procedural texture and mesh generation -Particles -Compiles to nice exe. -Preview boxes of course! However, the program itself is quite dated, being circa 2004. Here's what I would like to add: -Tabbed GUI -"Create your own operator" tab for creating, loading, and saving custom code to use as an operator. (I can picture this being useful for generating new effects) -Multiple render targets -Built upon DirectX10 (actual DX10 effects not necessary, but I would like support in the "Create your own operator" tab for more advanced effects -HDR support -Shader 3.0+ support -Shadow Maps, SSAO, and Voxel-based dynamic ambient lighting. -Multitexturing -Material-editing tab -Importing from JPG, X, 3DS, DXT, etc -Modular programming system, so these effects can be added as "plugins" to the main program. That way I can deal with the plugins one at a time, instead of compiling all those freakin effects into the main executable. (yeah.. may be on the difficult side.) To me, this sounds like an exciting project to really blast my way through getting comfortable with 3d programming. May be quite a chore for a beginner to tackle, but that's how I usually learn a new artform, by tackling a big, organized project right off the bat. I can take it one step at a time. So, what do you guys know, and what would you recommend I read up on the programming side of things? Such as: -DirectX and C++ programming (obviously, and trying to find the time to really work on those) -Operator Stacking and GUI programming Keep in mind... I do have a fairly good understanding of graphics tech...
  15. For those of you who haven't heard of [url="http://www.theprodukkt.com/werkkzeug1"]Werkkzeug1[/url]: It's a realtime music/3d demo tool. For anyone interested in realtime 3d, It is definitely worth your time to mess around with it. It's a very visual/spatial oriented GUI. I'm new to 3d programming. Like, very new. But I'm very familiar with 3d terms and whatnot. Basically, I am wanting to create a program similar to Werkkzeug1, mostly in the following aspects: -Awesome GUI (operator stacking) -Channel-based tempo and synchronization support -Post-Processing effects -Render targets -Pixel shader algorithms -Highly-customizable operator variables -Procedural texture and mesh generation -Particles -Compiles to nice exe. -Preview boxes of course! However, the program itself is quite dated, being circa 2004. Here's what I would like to add: -Tabbed GUI -"Create your own operator" tab for creating, loading, and saving custom code to use as an operator. (I can picture this being useful for generating new effects) -Multiple render targets -Built upon DirectX10 (actual DX10 effects not necessary, but I would like support in the "Create your own operator" tab for more advanced effects -HDR support -Shader 3.0+ support -Shadow Maps, SSAO, and Voxel-based dynamic ambient lighting. -Multitexturing -Material-editing tab -Importing from JPG, X, 3DS, DXT, etc -Modular programming system, so these effects can be added as "plugins" to the main program. That way I can deal with the plugins one at a time, instead of compiling all those freakin effects into the main executable. (yeah.. may be on the difficult side.) To me, this sounds like an exciting project to really blast my way through getting comfortable with 3d programming. May be quite a chore for a beginner to tackle, but that's how I usually learn a new artform, by tackling a big, organized project right off the bat. I can take it one step at a time. So, what do you guys know, and what would you recommend I read up on the programming side of things? Such as: -DirectX and C++ programming (obviously, and trying to find the time to really work on those) -Operator Stacking and GUI programming Keep in mind... I do have a fairly good understanding of graphics tech...