Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About grazing

  • Rank
  1. grazing

    Rendering Multiple Meshes.

    EDIT: Just seen it's working now have fun!! If you comment one of the renderMesh function calls out will it draw the other mesh? If so are they at the same location if you comment one out ? if so is one mesh bigger than the other? If so, ensure that the position (transform/translation) of the two matrices are different so you are not rendering one inside the other. And as NicoLaCrevette pointed out, ensure you are setting the WVP matrix in the shader also (this editor got all messed up while I was formatting my response and I forgot to add it to my MS Word copy of my reply Many different possibilities!
  2. grazing

    Rendering Multiple Meshes.

    g_p_MatWorldViewProjInShader->SetMatrix( ( float* )&matWorldViewProjection ); g_p_MatWorldInShader->SetMatrix( ( float* )&matMesh1World ); <--- you set the world matrix for mesh 1 here and render both mesh's using this .. g_p_fTimeInShader->SetFloat( ( float )fTime ); g_p_LightDirectionInShader->SetFloatVector( (float *) &g_lightDirection); g_p_LightDiffuseColourInShader->SetFloatVector( (float *) &g_lightDiffuseColour); g_p_MaterialDiffuseColourInShader->SetFloatVector((float *) &g_materialDiffuseColour); renderMesh(pd3dDevice, &g_Mesh1); renderMesh(pd3dDevice, &g_Mesh2); [/quote] You need: renderMesh(pd3dDevice, &g_Mesh1); g_p_MatWorldInShader->SetMatrix( ( float* )&matMesh2World ); renderMesh(pd3dDevice, &g_Mesh2);
  3. grazing

    Networked Game Structure

    ... [/quote] hplus0603, don't take this the wrong way but I love you. A million thank yous! I'm sure we've all been at a point like this but I've been stumped while attempting to process this situation in my brain for a few days and couldn't quite wrap my brain around it until now. Thank you again.
  4. grazing

    Networked Game Structure

    Neglected, thank you for your response I figured something like that would be needed due to the desire to move from a "single gateway" to a secondary sever, to avoid "login server/gateway" crashing and the connected clients dropping as well. hplus0603, first thank you for the detailed post. You gave me more ideas about how to add/implement things that I have done differently, thank you for that. But my question is not about verifying, but how to route a new socket to said "sub-servers." But correct me if I'm wrong; from your post I've come to the conclusion that I will need to expose at least two/three servers. The login/gateway, the realm server, and the chat(global chat e.g. guild /global channels) server. (could combine the two into one but that's a minor detail for now.) And to do all of this (again please correct me if I'm wrong) but I will need to close and recreate sockets to connect to said servers. e.g. First Socket: Connect to login server, verify account. Obtain a Kerberos-style Ticket if the account is valid. Server sends the ticket to the client verifying the user name/password is valid, and a list of realms. Second Socket: Client closes first socket, recreates a new one that connects to the selected realm. Client sends the Kerberos-style ticket for validation. Server verifies. If valid, returns a list of all the characters. Client is now connected to [Selected Realm] and now all messages can be routed through the [Selected Realm] server to zones/global chats (guild, whispers, etc), no need to connect to specific zone servers as all messages can be routed to the proper Port a zone server is listening on (assuming all zones of a specfic realm are on one machine and the same machine as the realm server itself). So if the above is correct, would this mean that the login server exposes PORT addresses for all realms? e.g. Login_Server: mygame.com:7501 Realm_Sever: mygame.com:7502 Specific_Realm: mygame.com:7503-7600 (assuming 97 realms ... yeah I know just an example.) and to move from one to another I'd just recreate a socket and connect to the proper port address (with verification happening obviously) With this method wouldn't exposing the realm ports be a bit dangerous in so much that someone can blast the realms with all types of attacks? I'd like to keep the specific realms unexposed .. but I suppose this means using a gateway such as the "Realm Server" which would then be the target of said attacks if they were to happen anyways? _
  5. Hello! I'd like to start by referencing these two threads: http://www.gamedev.n...hrough-gateway/ http://www.gamedev.n..._1#entry1804154 My situation is I, like the above thread starters, have come to a point where I need to decide which path to go. I am using TCP with the servers (Login, Chat, Zones, etc) all running an IOCP. Of the two methods: a gateway or direct connection to said servers (chat, zone, etc) I must say I'm very fond of the gateway implementation, however I have a concern that if the gateway crashes, so do the clients. Referencing WoW or even EQ, you used to be able to connect and if the login server crashed, you would be fine long as you didn't log out. So my question is how did they do it? Without exposing too many sub servers, what would be the best solution? I'm having a hard time wrapping my head around how I would connect to the Login server ,verify the account, and then pass the verified client to the "sub server."(a sub-server is only exposed via a port on the Server Machine to a server higher up in the chain) For example ... login -> verified -> [???] -> connection to [Chat/Server List] -> [???] connect to realm selected. [Login] | V [Chat / Server List] | V [Realm]: -> [Zone] From the second link it is stated you cannot redirect a socket that is already active to a new server, so I would need to close the original socket that was used to verify the client, recreate the socket.and then connect to the sub server. Is this the proper way? How would one ensure that the client was actually verified in the first place? *scratches head* I hope this is something simple that I am making an elephant out of. Thank you for your time!
  6. Hi Tom, As others have mentioned, just worry about making an actual playable game first. And as I'm sure someone would / will point out; the compilers these days can optimize vastly better than most people can (even if they can write assembly themself). Make your layout, program your game, once it's playable run it through a profiler which will show you where the "bottlenecks" are. This way you can focus on and optimize areas that actually need it. Thus saving time, you actually stay motivated longer as you see results faster, and you avoid the foresaid pitfall above, "optimizing this, optimize that, optimize everything!" Good luck
  7. grazing

    So like, have any decent new books come out?

    I can't comment on his book but this part alone is still very valid. I'm not sure why everyone keeps saying "ignore DirectX9! go learn DirectX11" the fact remains there are still millions of users out there who play games and buy them that do not have Vista or Win7. If you're out to learn the latest and greatest and that's it; sure hit up DX11. But keep in mind, no DirectX9 support means any testers and potential buyers who are still using XP will not be able to play your game.
  8. It seems he could've went this route if he wanted to avoid making his engine. As others have said you need to decide what you want to do with your engine. Learning to implement the features that "other maintained engines" (UDK, Unity, etc) use grants you a level of understanding that others who just read the general idea of how such things work will never fully grasp, at least in my opinion. Programming is that way. Hands on "actually doing it"; there is no other alternative. Now if you are trying to make a game then ^-- look into a pre-existing engine. Is an awesome engine on the front page of gamedev.net (Unreal Dev. Kit) and it's free for the first 50,000 you make! Definitely a deal that one shouldn't pass up on if you are going the pre-engine path.
  9. So it's based on those who actually have this 'steam' installed. Gotcha. Thank you for the link though.
  10. According to the latest Steam hardware survey, users with both Vista/Win7 and DirectX 10/11 GPUs are now on 56%. Total Vista/Win7 is 71%/72%. XP is down to 20%. DX11 looks more like the reasonable choice every day. [/quote] You have a link to the survey? Wondering if it's a "poll." that was given e.g. the results will not be that accurate by a long shot. Only amongst those who voted.
  11. While DirectX 11 is the latest and obvious most "high tech" release of DirectX, as others have pointed out using DX10 or 11 will cripple your game on windows XP, aka it won't work. (DX10/11 is not supported on Windows XP) Now if you're focus is not to sell to the "masses" and just learning for now go for the latest version that works on your machine. Do take heed though and yes it is easy enough to write two rendering .dlls and attach your application to the proper one at load time based on the OS (slightly advanced topic) creating a game in DX9 is what I recommend as a starting foundation. It doesn't require half as many complexities as DX11 does in setting up or rendering and still teaches you the foundation. You also can learn to use Pixel and Vertex Shaders once you have a firm grasp which is basically what DX11 requires for everything to be rendered. So transitioning to DX11 once you grasp DX9 will be fairly easy. Going backwards ... eh possible but the DX9 -> 11 , again in my opinion is easier. Don't have to swallow as much to get your first app up and running etc etc etc. If you want to support Windows XP and plan on selling your game/app or having friends run your app if they don't have XP and you create it with DX11 well too bad for them. On the other hand this link: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Desktop_and_laptop_computers while the %'s have shifted since that was last updated, I'm sure Vista/Win7 have not taken over in a combined % over XP and if you refuse to create the DirectX 9 rendering .dll (read above) you are in essence cutting out at least 1/2 of your potential buyer base which is crazy. You'll have to learn DirectX 9 anyways to support them, so might as well start there.
  12. grazing

    FBX Models

    First off awesome responses so far thank you everyone ! Understood. But I was just pointing out when exported into ascii to view the contents it's not much different than .x in ascii. You can export FBX into binary To get an optimal performance format, the usual simple mechanism is to generate a file format that is just a dump of the raw data you feed to your internal Mesh/Texture/Shader/... data structures. To load these binary files, you don't do much else than a single fread() to stream in the header, followed by a fread() to read in the actual per-vertex data, and that's it. Because this method will not involve any kind of per-element parsing (e.g. ascii->binary) and is not filled with small-sized file loads (e.g. fscanf to get individual lines at a time), loading is an order-of-magnitude faster. [/quote] Awesome! I've wondered what magic was going on for such "per engine custom formats" hah nothing more than a simplistic read header read info based on header settings! Here I was fathoming some huge magical dragon .. haha. Someone mentioned 0.2s loading times for .fbx meshes. If that sounds adequate, then it probably is. If you're looking to stream in meshes at runtime, that's most likely not enough (0.2s == 12.5 application frames if running at 60Hz). [/quote] Agreed and understood, but my comment about the load of less than 0.2s was refering to ascii and debug release. I'm sure it'll be much quicker in a release build and binary format however your point is heard, some more food for thought for me. Thank you.
  13. grazing

    FBX Models

    Hi! Thanks for your feedback! It's really appreciated! But I definitely do agree with you. There are massive pro's to using FBX. Just trying to see if anyone with valid hard facts to "not use it" can shine some light on the con's. Some of the "bigger complaints" I've read is that it's not an "open" source. OK I understand this but how many people are using PhysX? It's not exactly an "open" source either. Yet ... too many to list AAA game companies are using this bad boy. Also they (Autodesk) mentioned that they would be making more "private" details more public in future releases of the FBX SDK. So I too agree and think this is the way I want to go. Not only because Autodesk is supporting and keeping it updated, all their modeling packages from 3ds max, maya, motion builder, etc use FBX natively. Recently attempted to export a Biped animated model to .x format and well lets just say it's not pretty. Thinking either way I go I'll have to spend several days 'fixing' an issue with the .x exporter or just wrap up and create my own .fbx loader with the SDK. And well all the pros listed above seems to be the FBX format loader is the way I should be heading.
  14. Hi, I've read several topics from years ago up until recently and I can't find what I call an honest answer. What are the drawbacks from using FBX internally in your program? E.g. load the FBX file like one would with .x or any other model format? I've heard countless comments of "it's slow" "it's not meant for that" etc. Can anyone point out why it's "slow" for loading or "not meant for use in a 3d game engine" over say .x format? You can save FBX as ASCII and look at the contents in notepad which don't look any more "complex" than .x. (yet no "don't use .x!!!") You can strip the file down during export to contain only the mesh, normals, UV mapping and animation so is it really "that bad" if you use a FBX model during "run time." Maybe these thoughts are from people who years ago (I don't know) had bad experiences with it. Also I used their FBX SDK (http://usa.autodesk....3112&id=7478532) (which they are maintaining and updating regularly) and creating a simple loader I can load a 4800 poly mesh in less than 0.2s in debug build. So *scratches head* Another question I have is XNA uses FBX, Unity has a default FBX importer built in (so you can just drop fbx models into unity and they'll work properly). Maybe I'm just misinformed .. Also browsing through some top games game content packs (the model viewers) e.g. for. WOW or TorchLight I see it's littered with FBX models. So uh ... these games are actually saving the FBX model to disc, loading them and then saving them again in another format? That doesn't sound very "AAA" company like ..(?) Maybe I'm missing something somewhere as I never dealt with this aspect and curious for some feedback from people who actually know what is going on, thanks!
  15. Hello, I'm having some serious issuse with creating a basic browser object in a Win32 window and creating a "sink" for it. I can get the browser up and running just fine, however when I attempt to implement the sink that is where things go ... bad. Here is a stripped down version: class CEmbeddedBrowser : public IDispEventImpl<1, CEmbeddedBrowser, &DIID_DWebBrowserEvents2, &LIBID_SHDocVw> { public: BEGIN_SINK_MAP(CEmbeddedBrowser) SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, DocumentComplete) END_SINK_MAP() void STDMETHODCALLTYPE DocumentComplete(IDispatch *pDisp, VARIANT *URL) { MessageBox(NULL, "DocumentCmplete in SINK_ENTRY", "!", MB_OK); } /* snip */ }; Now with the above, the page loads in the embedded browser, however when it is finished, I always get a memory access violation "Access violation writing location 0x00000014." in altcore.h at : HRESULT Lock() throw() { EnterCriticalSection(&m_sec); return S_OK; } This is obviously due to the BEGIN_SINK_MAP as the moment I remove the SINK_ENTRY_EX, the problem goes away. Now if I change the class to: class CEmbeddedBrowser : public IDispatch { public: /* snip */ }; and add HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) { if (dispIdMember==DISPID_DOCUMENTCOMPLETE) { MessageBox(NULL, "dispIdMember==DISPID_DOCUMENTCOMPLETE in Invoke", " ", MB_OK); return NOERROR; } return NOERROR; } The message box for the Invoke method is displayed properly. Can anyone give me some hints/tips /suggestions on what is going on? I have no clue why I am getting a memory access, I commented out everything that releases anything - and made all objects global so no local variables are "falling out of scope." EDIT: Here is the callstack in case it helps any app.exe!ATL::CComCriticalSection::Lock() Line 99 + 0xc bytes app.exe!ATL::CComCritSecLock<ATL::CComCriticalSection>::Lock() Line 314 + 0xa bytes app.exe!ATL::CComTypeInfoHolder::GetTI(unsigned long lcid) Line 4206 + 0x8 bytes app.exe!ATL::CComTypeInfoHolder::GetTI(unsigned long lcid, ITypeInfo * * ppInfo) Line 4056 + 0xc bytes app.exe!ATL::IDispEventImpl<1,CEmbeddedBrowser,&DIID_DWebBrowserEvents2,&LIBID_SHDocVw,0,0,ATL::CComTypeInfoHolder>::GetFuncInfoFromId(const _GUID & iid, long dispidMember, unsigned long lcid, ATL::_ATL_FUNC_INFO & info) Line 5001 + 0x17 bytes appr.exe!ATL::IDispEventSimpleImpl<1,CEmbeddedBrowser,&DIID_DWebBrowserEvents2>::Invoke(long dispidMember, const _GUID & __formal, unsigned long lcid, const _GUID & __formal, tagDISPPARAMS * pdispparams, tagVARIANT * pvarResult, const _GUID & __formal, const _GUID & __formal) Line 4653 + 0x20 bytes Thanks!
  • 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!