gsamour

Members
  • Content count

    221
  • Joined

  • Last visited

Community Reputation

140 Neutral

About gsamour

  • Rank
    Member
  1. Writing a game engine

    [quote name='crancran' timestamp='1323203094' post='4891205'] Agreed; however I'd argue there is a valuable lesson in writing fault tolerant code too. [/quote] Agreed [img]http://public.gamedev.net/public/style_emoticons/default/smile.gif[/img]
  2. Writing a game engine

    [quote name='turbello' timestamp='1323200709' post='4891189'] At least if I know how to make the user able to make the GameEngine object only once without a singleton. Is this even possible? [/quote] You'll be the only user, right? I'm sure you can keep yourself from making more GameEngine objects ;) [quote name='turbello' timestamp='1323200709' post='4891189'] Ok and thanks, I will progress on this forum but where? Should I post it here ir is there a special topic for WIP's? [/quote] Not sure about this, my guess is on this same post, but maybe posting progress would be off-topic...
  3. Writing a game engine

    [quote name='turbello' timestamp='1323149427' post='4890989'] The 'engine' I got from school I don't like because: - it don't have any performance at all / terrible names for datatypes ( maybe because we need to understand it ) example in header: Code I use: Object* m_pObject; Code the 'engine' have: Object* m_MyObjectPtr; - The WinMain we never wrote because this was already implemented in the engine. Almost no one of my class knows how WinMain works. These are the 2 things I don't like. I know the priority is to make the game. But I want to do more.. I am already 3weeks ahead with the lessons. [/quote] -How do you know "it don't have any performance at all" ? Are you getting high frame times / low framerates? -I can see how the variable naming can be a turn-off... -Why do you dislike the fact that the engine already implements WinMain? Does that prevent you from doing something? I think it boils down to this: you WANT to write an engine, and you dislike the existing engine because it's not yours... So you will write your own and can't be convinced otherwise (nothing wrong with that). No one can tell you what to do, but the suggestions you've seen are based on previous experiences. It won't be a wasted effort, because you will learn a lot. However, just be careful and follow a schedule to make sure you meet the requirement for the course instead of finding yourself implementing engine features forever. It's fun to work on "engine code", but at some point you will have to make a game with it. It sounds obvious but it's easy to forget. Good luck, I'm looking forward to seeing your game. If you want to, post your progress on this forum. It's always interesting to see how things begin and how they end up. I mean this in a good way (you're probably going to make changes to your original design/framework/etc). And this info can be very valuable to others. EDIT: I also suggest adding time for "engine bug fixing" to your schedule. Some bugs will be noticeable with simple tests, but other bugs will only show up until you start writing the real game. I've seen bug databases for some software products end up with hundreds of bugs.
  4. DirectX draw after minimize

    It looks like you've got a "lost device": [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb174714(v=vs.85).aspx"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb174714(v=vs.85).aspx[/url] You can test this by using IDirect3DDevice9::TestCooperativeLevel(). If the device was actually lost, then you'll have to send your resources to the GPU again (vertex buffers, textures, etc)
  5. Writing a game engine

    Out of curiosity, why don't you like the engine you got from school? Also, I agree with the comments. Writing an engine is not an easy task. I suggest you focus on the game and use what has been given to you. You say you can write an engine in one month and finish the game in the remaining months... let's assume for a moment that it's an accurate time estimate. That's one extra month you can use for making the game shine. IMO having a polished game will cause a bigger wow factor than having your own engine. It's also good practice for you if you break in to the industry. Unless you become an engine programmer, you will be using an engine written by another team (or company altogether). Even if you are an engine programmer, you probably won't be writing all the code yourself and will have to deal with code from other developers. So again, what is wrong with the engine you got from school?
  6. I did not spend a lot of time looking at the code, but I would say you're off to a good start Things to be careful with IMO: 1. I suggest establishing a coding convention, even if this is a hobby project. You have some variable names that start with upper case and others that start with lower case. And I see the same for functions. It looks messy. 2. You're not using indentation on your "if" statements. It's easier to read code if it follows appropriate indentation. 3. You may want to start looking into vertex arrays and VBOs. Immediate mode (glBegin()/glEnd()) is slower, and if you wanted to use DirectX, you won't find immediate mode in it. 4. I'm being too nitpicky with this one, but "Feet" is already plural. The word "Feets" doesn't exist. The singular version of "Feet" is "Foot". If someone else looks at your code, it's important for it to be correct / look good in all aspects. 5. By "Stomek", I think you meant "Stomach". Again, I'm being too picky, but it's important. Please take this as constructive criticism... I hope it helps
  7. [quote name='Blessman11' timestamp='1318533010' post='4872265'] only to have the compiler reject it. [/quote] What is the compiler error, exactly?
  8. Write Z-Buffer to BMP

    Hi, If you're already writing depth to a render target , then you can use one of the following functions to save it to file: D3DXSaveTextureToFile() [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb205433(v=vs.85).aspx"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb205433(v=vs.85).aspx[/url] D3DXSaveSurfaceToFile() [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb205431(v=vs.85).aspx"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb205431(v=vs.85).aspx[/url]
  9. Pointers/references in XNA

    AFAIK, instances of classes (objects) are considered reference types in C#. Which means when you pass those as arguments, you're already passing them by reference. [url="http://msdn.microsoft.com/en-us/library/490f96s2(v=VS.71).aspx"]http://msdn.microsof...2(v=VS.71).aspx[/url] EDIT: the wording might be weird. I meant: classes are reference types. So instances of classes are passed by reference.
  10. Can you post your WinMain() ?
  11. I'm pretty sure when you handle WM_CLOSE you should also call DestroyWindow(hwnd)... then you should handle WM_DESTROY and call PostQuitMessage(0) there. Here's my minimal WndProc: [code] LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CLOSE: DestroyWindow(hwnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } [/code]
  12. Also, are you using the DirectX debug runtime or release runtime? [check in DirectX Control Panel]
  13. Are you sure the game uses DirectX? Maybe it renders with OpenGL. In that case, gDebugger might help.
  14. When you run an experiment in PIX, say for example you get a single frame capture with F12... After closing the program/game, you'll see all the DirectX calls that were made in that frame. Go through them and find a DrawPrimitive() or DrawIndexedPrimitive() call and it should say whether it is drawing lists, strips, etc.
  15. Game Developer Conventions

    New York City has a few social game studios (like Arkadium) and some mobile game studios (for example Gameloft). ApochPiQ pointed out a good resource, gamedevmap ([url="http://gamedevmap.com/"]http://gamedevmap.com/[/url]). You can use that to find companies. If you want to meet game developers in that area, I suggest finding upcoming game jams or visiting NYU's Game Center ([url="http://gamecenter.nyu.edu/"]http://gamecenter.nyu.edu/[/url]). They have gamedev events every now and then. There's also NYC Game Industry ([url="http://www.nycgameindustry.com/"]http://www.nycgameindustry.com/[/url]). It looks like they get together for drinks once a month. And way2lazy2care's suggestion of IGDA is very good too. Local IGDA chapters also have events.