Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

110 Neutral

About Chargh

  • Rank
  1. Chargh

    Staying connected in case of disaster

    It would be the dawn of the Linux age, penguins will be the next intelligent live form to roam the earth!!!
  2. Memory is not localized. Entire memory is accessible at any time. The mere concept of "application" or more accurately, process, is something that is arbitrarily defined by each operating system or runtime system. No such limitation exists when it comes to memory itself. So a question needs more detail - which OS, which language and what kind of sharing? [/quote] This is not entirely true, your application is most likely in its own virtual address space (that is why two applications with the same entry point address can run simultaneously). So the OS is able to address physical memory in a linear way however your application is bound to his virtual address space and an other applications virtual address space would have to mapped to your virtual address space resulting in a different address for the same data (say app1 has code at 0xDEADBEEF and wants to access address 0xDEADBEEF of app2 it will have to be mapped at an other address then the original address). This is not really a problem unless the data you are trying to access contains pointers to addresses within this mapped memory (or even worse inside app2's private memory, then there is no way to know what will happen the address could be perfectly legal and pointing to valid data in app1 resulting in unpredictable results).
  3. Chargh

    Sprites and D3D9

    Yes they are essential. You should try to structure your program like this: int WINAPI WinMain(...) { //create your window ... //create graphics Graphics g(hwnd); //create a way to check if this was successful or better move the initialization into a separate method if (!g.init(hwnd)) { //FAIL, I can't stress it enough if you are serious about finding the problem you have to rule out bogus function calls with error checking } //maybe a separate method to load the texture(s)? //your game loop while (gameNotClosed) { //update window //begin the scene g.beginScene(); //which calls d3ddev->Clear d3ddev->BeginScene() //draw sprite g.begin(); //which calls sprite->begin(), and try turning of alpha blending for the moment g.draw(); //which calls the drawing function on the sprite g.end(); //which calls sprite->end(); //EDIT: and ofcourse EndScene() g.endScene(); } return 0; } And ofcourse do not use the standard updatewindow function to acquire window messages, try searching the forums for "game loop" I think on windows you should use PeekMessage to acquire the messages but I haven't been on a windows platform for a while so I can't say for sure.
  4. Chargh

    Sprites and D3D9

    It has been ages since I last looked at D3D9 but I think that you should check out the following. 1. Error check texture loading, make sure its loaded! 2. I don't know to what extend d3dxsprite sets its own rendering states (try searching the help files that come with the sdk) but you might want to try to turn of lighting (again its in the help files). 3. I don't see any d3ddev->Clear(...), d3ddev->BeginScene() d3ddev->EndScene() and d3ddev->Present(...). Do you call them somewhere else? Maybe its a good idea to check out the tutorials in the help files, make your application mimic the the one that only draws a triangle and remove the triangle code and insert sprite begin, draw, end.
  5. Chargh

    Sprites and D3D9

    [color="#1c2837"] Graphics::Graphics(HWND hWnd) { d3d = Direct3DCreate9(D3D_SDK_VERSION); ZeroMemory(&d3dpp, sizeof(D3DPRESENT_PARAMETERS)); d3dpp.Windowed = true; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.hDeviceWindow = hWnd; d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8; d3dpp.BackBufferWidth = 1280; d3dpp.BackBufferHeight = 800; D3DXCreateSprite(d3ddev, &sprite); HRESULT hr = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev); } You call D3DXCreateSprite with d3ddev as a parameter. Then in the line following it you create d2ddev, since this is your constructor and I don't see you setting d3ddev to NULL it would be logical to assume that they crash happens in D3DXCreateSprite since you pass it a invalid pointer (unless you are using VS in debug mode which I think sets all uninitialized variables to 0). Also you should error check these functions (d3d != NULL, d3d->CreateDevice(...) != S_OK).
  6. Chargh

    Projective texturing artifacts

    Maybe you have better luck PM-ing karwosts?
  7. I use gedit (Linux notepad with syntax highlighting), and my home made make spinoff called 'nieuwbouw' which is dutch for 'houses that are just constructed'. When I was switching between Linux and windows because my roommates began to notice that whenever I used Linux there computers somehow disconnected and I got 1mb/s on our crappy internet connection, but when we where all running windows neither of us got above 100kb/s (4ppl). I used code::blocks back then which is kinda nice.
  8. Chargh

    Cenk Uygur and approval voting

    You can only vote for two guys? Dictator1 and Dictator2:P. I like our system where there can be unlimited parties (in theory but they need a number of followers in order to join the elections). Then we have 150 chairs that can be occupied. We vote for the amount of chairs every party gets. Then they need more then half of the chairs to gain a majority to create a government. So there will most likely never be 1 party in a government. Of course there is also a big role playing game involving the queen in order to decide who is going to work with who. And it can take quite a while from elections to forming a actual government (good example would be Belgium). Two guys doesn't seem much, how are those two guys selected?
  9. Chargh

    Get the Hertz outa here

    I don't know if it would work and if it did it is not doing what you think it is. It will only store the last time newHertz was checked. I would try it like this: int newHertz = 0; for (numsamples with i) { //NOTE THE += and not = newHertz += do calculation } newHertz /= numsamples; if (newHerz ....) male else if (newHerz .... female else none
  10. Chargh

    HTML5 2D Game Engine-Need Help Testing...

    Me too, I'm using Debian x86, Firefox 5.0.1.
  11. Maybe a tower defense game?
  12. Chargh

    A peculiar problem ...

    I see you point, but 1) the constant is correctly converted to a double value in the program (in which there are no problems executing these lines), and 2) even if I omit the value and simply write sprintf_s(buffer,24,"hello"); it still crashes :-/ [/quote] Did you change the line in both the exe and the dll? EDIT: Do you know for sure it crashes at that exact line? What tools are you using? Try using a debugger, the normal 'this program stopped working' can mean a whole range of things.
  13. Chargh

    A New DSL for Games

    The difference between a library and a language is great. if you had no experience what so ever to programming, and I gave you a language / IDE that you can learn in one week, to produce excellent 2D games (as an example), it handles all the complex stuff !If I told you I will make a C++ library to handle these things, and you have to call it alone, you will spend months getting good in c++ before actually learning the features of my library.This is not about creating stunning 3D scenes and shader effects. It is about providing the normal person a wan to make games without having experience in advanced languages. if we take DarkBasic for example (although this is not the best example), of coarse most game companies will prefer working with Direct X or Unreal Script to produce their games, but a team of two or three students will prefer DarkBasic ALOT to make a casual game during a summer vacation. [/quote] A language which will be easy to learn, ultra fast, and hide away all complex things. I don't see a use in a ultra fast simple language that gives you all the power you need but hides away all data structures in which you might want to use that power, I think implementing this game library in C++ and allowing it to be called from within a scripting language will give you all the power you need. GameMaker (if that's still around) is what you are looking for.
  14. Chargh

    A New DSL for Games

    I'm working on the exact same thing, or at least it started out as the exact same thing and there are a few problems that I encountered with this design. First of, converting it to C++ (or C since that was my idea) forces you to program a standard library which is basically a C++ game engine (a huge task in itself), simplifying it into your language means simplifying it in C++ (or at least write the code that simplifies it) first so why not use C++? So I went of to create a scripting language, which turned out to be so low level (since the speedup that games need require you to a lot of stuff which C++ already does (pointer, classes (with inheritance) and the whole rendering library will just be extra). I then went on to write a assembler (which is more or less complete) and now I'm writing the intermediate compiler which will allow me to go [compiler written in c++] -> [intermediate compiler in my language in interpreter (in c++)] -> [assembler in my language (in interpreter in c++)], and then implement the compiler and end up with a language which is a lot slower then C++ and will never have any use in games. So I would ether go about writing a scripting language (or maybe a real programming language) if that is what you want to do (I think its fun), or write a library for C++. If you want to know more about creating a language I can really recommend the red dragon book, I'm a big fan of using free resources on the internet to learn things but when it comes to this kind of programming I have not been able to find something comparable on the internet for free (without resorting to the ancient profession of pirating, but that isn't quite the same without the boats and parrots). chargh,
  15. Since many people pointed out the lack of lighting in the current video's the things you mention will make the demo look nicer. And since the searching it will be cpu bound and the steps you mention will be done on the gpu they might be 'free' I don't think that will make the demo faster, just nicer.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!