Chargh

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

110 Neutral

About Chargh

  • Rank
    Member
  1. Staying connected in case of disaster

    [quote name='Servant of the Lord' timestamp='1314113817' post='4852816'] 4) If Microsoft's (and Apple's) authentication servers go down, will Windows Vista and Windows 7 copies act as unauthenticated, and lock itself down thinking it's pirated, because it continually can't reach the authentication servers for months on end? Will everyone be forced to move to Ubuntu? [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img] [/quote] It would be the dawn of the Linux age, penguins will be the next intelligent live form to roam the earth!!!
  2. [quote name='Antheus' timestamp='1313858675' post='4851648'] [quote name='Misery' timestamp='1313850744' post='4851603'] I wonder if it is possible that two or more applications can have access to the same part of memory. Lets say I have one program that allocates and fills part of memory with some objects. And I would like another program to be able to read, modify and write this part of memory.[/quote] 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. Sprites and D3D9

    [quote name='falcon93' timestamp='1313841932' post='4851569'] Do I have to use the clear, beginscene, endscene and present even with Sprite? I started off by fixing the Clear method and choosing it to clear with black, but it gives me strange results. In fullscreen my application background is black, but when I run it windowed it is white? And I notice it gets really laggy when I run Clear? [/quote] Yes they are essential. You should try to structure your program like this: [code] 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; } [/code] 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. 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. Sprites and D3D9

    [size="2"][color="#1c2837"][code] 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); } [/code] [/color][/size]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. Projective texturing artifacts

    [quote name='SIIYA' timestamp='1313834282' post='4851540'] Hi, I know this topic is a bit old, but have you ever solved this problem? I have similar problem and cant find solution. Thanks [/quote] 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. 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. Get the Hertz outa here

    [quote name='johnboy007' timestamp='1313423805' post='4849432'] [code] void Update () { if(listener.enabled) { AudioListener.GetOutputData(number, 0); for(int i=0; i < numSamples; i++) { int newHertz = Mathf.RoundToInt (Mathf.Clamp (number[i] * 2, 0, AudioSettings.outputSampleRate) / (AudioSettings.outputSampleRate / numSamples)); if(newhertz >=100 && newHertz <= 150) bMan = true; else if(newHertz >= 170 && newHertz <= 220) bWoman = true; else bGender = false; } } } [/code] [/quote] 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: [code] 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 [/code]
  10. HTML5 2D Game Engine-Need Help Testing...

    [quote name='KanonBaum' timestamp='1313362558' post='4849156'] Nice menu but every button took me back to the menu. [/quote] Me too, I'm using Debian x86, Firefox 5.0.1.
  11. Maybe a tower defense game?
  12. A peculiar problem ...

    [quote name='Dragonion' timestamp='1313359699' post='4849138'] [quote name='Brother Bob' timestamp='1313359081' post='4849129'] The only thing I can see that is wrong with the code you show is the format specifier and the value being passed. You pass an integer, but the format specifier is a floating point value. That, in itself, should just produce garbage output (it's undefined in theory, but in practice that is what you're likely to get), but the problem is that it's a double precision floating point value, and your integer is likely not the same size. Most likely you're passing a 4-byte integer and sprintf_s reads an 8-byte floating point value from where the values are passed. You need to ensure that the value passed is really a double precision floating point value. [/quote] 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 [code]sprintf_s(buffer,24,"hello");[/code] 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. A New DSL for Games

    [quote name='oamsath' timestamp='1313335493' post='4848993'] [quote name='Sudi' timestamp='1313334667' post='4848988'] Really? I don't get your point. To write a game you have to understand how a programm works and how to implement certain mechanics. There are already alot of languages out there and to be honest from a user point of view i don't really see a difference. Certain languages have some cool extra features but in the end its all about creating objects and run functions on data. What you want to create a game is an API that allows you to quickly create certain behaviours. But that is already there its called a game engine. This engine implements interfaces to quickly load/display graphics, play sounds, process user input, send data across the network, save/load data from memory. Now you can create such APIs in all avaible languages. I don't really think there is a need for another language just for games. It doesn't make any sense. If you really want to make it easy for a person to create a game then ask that person which language he/she is comfortable with and then create an API in that language. Another way you could approach it which would really be easy for a beginner is a graphical way. basicly you have precoded stuff and you link it together. just like with unreal engine 3 it graphical scripting interface is really simple to grasp and makes it easy for someone to implement behaviour. [/quote] The difference between a library and a language is great. [list][*]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.[/list]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. A New DSL for Games

    [quote name='oamsath' timestamp='1313332861' post='4848977'] This new language is a DSL. this means that it will contain features specific to games only. Screen, Texture, Sound, and Model will be data types just like int, float, and double in other languages. The main focus will be on two things: 1- Easy to learn: I intend to have a learning curve of maximum one week. It will be very easy for starting programmers to develop good games with it. 2- Fast: this language will not be translated to executable files, but will be translated into C++ using OpenGL library for drawing, and then calling MingW compiler to build the executable. [/quote] 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. [quote name='Sirisian' timestamp='1313284176' post='4848824'] <clip> You don't think their GPU implementation will be much better than a 15-20 fps CPU version? That's kind of pessimistic. I mean the shading alone on the GPU will open up most every deferred/forward rendering post-processing effect. It's just a different way to populate the g-buffers. HDR alone would probably help along with demoing specular objects. The reason for the repetition at the moment is mostly just speculation. The problem I see with atomontage is that his effect for rendering voxels when he lacks the detail is to blur them. This ends up looking really bad even in his newer videos. The UD system even when they went very close to objects has a very nice interpolation. [/quote] 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.