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

bubu LV

Members
  • Content count

    894
  • Joined

  • Last visited

Community Reputation

1436 Excellent

About bubu LV

  • Rank
    Advanced Member

Personal Information

  • Location
    San Jose, California
  1. That github repo for Android comes from my modifications in OpenAL-Soft fork here: http://repo.or.cz/w/openal-soft/android.git (it includes NDK based makefile, so there is no need for cmake).   But you can use official OpenAL-Soft on Android by using OpenSL ES backend. OpenAL-Soft supports this backend for some time already and it works on Android just fine.   Just build the OpenAL-Soft library with Android NDK + CMake, make sure to include OpenSL ES backend. Of course this will limit you to Android 2.3 and up, but that is reasonable limitation.
  2. Modern OpenGL implementations compile following : if (cond) { x = A; } else { x = B; } to something like this: x = cond * A + (1 - cond) * B; (actually they have much better opcodes to express this kind of code to hardware)   So I would recommend you to use actual if conditionals - GLSL compiler in some cases could optimize code much better than you manually introducing additional multiply operations.
  3. You can always compile SDL to shared library - dll or so file. And use that instead of static lib.   As for initialization - only Android, iOS and PSP needs special code. Other platforms will work fine without SDL_main.
  4. If you are not worried about Android/iOS/psp platforms, then you can simply define SDL_MAIN_HANDLED preprocessor symbol, and SDL won't override main.
  5. First of all - get rid of glGetUniformLocation calls during drawing. Get those uniform locations after shader is linked, and store somewhere. Calling glGetSomething usually is expensive operation in OpenGL.   Also drawing only 36 vertices per draw call is very small number. You should be drawing much more to have high performance with large number of triangles. Look into Instancing. Another thing to look into is uniform buffer object - uploading all uniforms at once could be much better that calling individual glUniformX functions per each uniform.
  6. They are completely different beasts.   CLI array is not a "standard C++ array. They are managed arrays. It's like new [] operator in C++, but for managed heap. cli::array allocates memory in managed heap and garbage collects it to free the memory.  std::vector allocates its memory from regular C++ heap and frees it when it goes out of scope.   ^ is not for smart pointers. It is for managed pointers - they get garbage collected to free the memory.
  7. What? Only thing you need to cast is pData member of D3D11_MAPPED_SUBRESOURCE. It has void* type, but you need Color*
  8. You don't need to copy all memory just to access one element of mapped memory. hr=d3d11DevCon->Map(textureBuf,0,D3D11_MAP_READ,NULL,&mapResource); if (FAILED(hr)) abort();      struct Color {float r, g, b, a;}; Color* obj = (Color*)mapResource.pData;   if(mousePos.x>0&&mousePos.x<Width&&mousePos.y>0&&mousePos.y<Height) if(obj[(mousePos.y*(mapResource.RowPitch)/sizeof(Color))+(4*mousePos.y)+mousePos.x].r==1.0/*If object that we was pick mouse have 1.0 on red bit we draw little cloud*/) model.rysujOtoczk?(model.dolny,model.gorny);      d3d11DevCon->Unmap(textureBuf,0); textureBuf->Release();
  9. sizeof(Color) is 16. You are copying only 16 bytes. You need to copy Height * RowPitch bytes.
  10. Verify that calls to CreateTexture2D and Map functions are not giving you error. Basically assign them to HRESULT hr variable. and check that SUCCEEDED(hr) is true. Or enable debug runtime - either pass D3D11_CREATE_DEVICE_DEBUG flag for D3D11CreateDevice function, or go to DirectX Control Panel. That will show you errors in debugger output.
  11. DirectInput actually is not the most effective way of getting input on Windows. It is deprecated and nobody should be using it anymore. On Windows you should use regular input/polling functions with standard windows message loop (GetMessage/PeekMessage and DispatchMessage) to process Raw Input messages. That will give you less latency than DirectInput.   On Linux you'll be fine with X11. Of course you can access hardware directly, but as you said - you'll need root for that. To do that you'll need access /dev/input/* devices. Here's some info how: https://www.kernel.org/doc/Documentation/input/input.txt http://stackoverflow.com/a/3877020/675078
  12. Python executable is called "python", not "python3". Even for 3.x version. Open C:\Python33 folder in Explorer and you can see that by yourself.
  13. glutBitmapString internally uses glBitmap function that is not hardware accelerated on modern hardware. So using this function will make CPU do all the rendering.   I suggest you to look into rendering fonts using texture. Look here for generating texure: http://www.angelcode.com/products/bmfont/ Or you can render fonts directly from truetype font file: https://code.google.com/p/freetype-gl/
  14. W is local variable in sha_compress function - you need to pass it to RND function in argument.
  15. Currently by default it uses headers and CRT from whatever compiler you used to built it from sources. If you built clang using Visual Studio or WindowsSDK, then it will use link.exe and headers/libs from Visual Studio/Windows SDK. If you built clang using MinGW, then it will use ld.exe from binutils and headers/libs provided by mingw. Of course you can override this and use headers and libraries from whatever folder you wish. Overriding link.exe/ld.exe will require manually calling it - you'll use clang to generate object files, and will call ld.exe/link.exe to produce executable).