• Content count

  • Joined

  • Last visited

Community Reputation

220 Neutral

About dAND3h

  • Rank
  1. Wait, I've just realised. If I make all of my modules dynamically linked, but then have the main Engine link statically, then that should work right?
  2. I think a visual representation of what I'm after will be useful:   -> means "knows about"   App->GameEngine->GameWindow->WindowsWindow                                                         ->MacWindow   What kind of structure would I need for "App" to create a GameWindow? i.e. if App includes GameEngine.h which includes GameWindow.h, but GameWindow.h is not linked at that point for App to know about it. 
  3. How about pimpl? You can hide class GameWindow inside Engine implementation     Well that's 1 suggestion I wasn't aware of, but I'm kind of after the answer: This is how it's usually done or you're thinking of this completely wrong etc. Bear in mind this is all in terms of a Modular design. 
  4. Hi Guys,   I've tried searching for a succinct answer but I guess I just don't know how to ask the question succinctly!   Anyway here's my current problem:   I have a project in my solution which is called GameEngine. This is set up to build to a .DLL.   I have another project in my solution called GameWindow. This also compiles to a .DLL. The GameWindow is responsible for creating a window and anything else which comes with that.   I have created a reference to the GameWindow project in the GameEngine project within VS2015.    Now, I have created a test project which is the entry point(.exe). Within it's main function I wish to create a window, but I only want this project to know about GameEngine .dll.   I've tried a few different approaches but always end up with linker errors. I guess 1 of the problems is I don't fully understand that process. But my main question is, how would something like this generally be approached?
  5. Thanks for the reply, so do I need to give my friend the entire redist folder? ...I still don't understand why it won't work for me though, I have everything installed and I just double checked the spelling in the release configuration.. Specifically, it is currently looking for the d3dx9.lib. I am also using the "additional Include Directories" within the C/C++ General option, should I perhaps be setting the include and lib directories from within the VC++ directories option?   EDIT: So I found out why it wouldn't work for me, I didn't add the library include to the release config....I have no idea why
  6. Hi, I am probably being dense, but whenever I try to build my directX game in release mode, it stops with a linker error: LNK1181.   All my paths are the same as in debug mode and I have the latest DX SDK installed. This leads me to the question, how do I make sure if I release my game that all the outside dependencies are included if they are not directly in my project? I am guessing thats what you would do during the install, but for directX, mostly everyone has, I don't know.   So if I was to pass this projects release folder over to a friend, how do I make sure they can play the game without needing to install the SDK? My first attempt was to copy paste the .lib files needed into the project, but i am not sure where to put them.    Thanks for reading    
  7. Oh my glorious code!

    system("cls")...oh how those days were glorious!
  8. I assume you have already found this? http://docs.unity3d.com/Documentation/ScriptReference/Mathf.PerlinNoise.html or are you using a custom solution?
  9. hmm, do you really need every new piece of "Terrain" to be completely random?    If not, you can create a set of pre computed heightmaps in a image program which you can then load a random set from.   In regards to your question, have you thought about generating a heightmap texture via shader code? If you are doing alot of floating point calculations this would greatly increase performance.  It would increase performace even more if you decided to only generate a new random heightmap after you have used one a certain number of times, and just apply rotations to bits of terrain to keep it looking like it is more random than it really is.   Regards
  10. C++ One enum name for more types

    public struct TileInfo { public bool walkable; public bool destructable; public static TileInfo Grass() { return new TileInfo () { walkable = true, destructable = false; } } public static TileInfo Water() { return new TileInfo () { walkable = false, destructable = false; } } }   Then, where I want info for a tile, I have a TileInfo variable in a generic tile class, which I set like:   TileInfo tileInfo = TileInfo.Grass();     This makes it very easy and decouples tile meta data into nice segments which you could possibly parse from a file.   EDIT: To then do the actual check with player is trivial, since all instances of Tile will have a set TileInfo data, we can just use:   if(tileInfo.walkable) { //allow player movement }   etc.
  11. Orthogonal projection of 2D map.

    Are you sure it is an exact mirror of the original? If you don't align the images in the spritesheet an exact distance (usually) then the actual texture will be slightly bigger than the sum of all the animation frames, meaning the frame width/height will be calculated incorrectly
  12. Equally, you can rotate "the object you are moving" 's UP vector until it points in the same direction as the terrains normal. Then do a cross product on the new UP vector and the right vector, which will give you the look vector.
  13. Hi, I am using ThreadLib from Ron Pentons MUD programming example. I have 2 threads in my program, one which recieves messages and one which sends messages. I create both of these threads(each has an infinite loop) and I also make sure to yieldThread() in my main loop. I end up with 50%cpu usage, isn't this a bit high? It does only run at around 13% on a better machine, but shouldn't it be closer to 0 than that?
  14. Hey thanks for the replies, I should probably say I am only doing an ascii console game using the SocketLib and ThreadLib libraries from Ron Penton's MUD programming so I assume my choices are limited here. It seems I am only allowed to send data as char* according to the send function within WinSock2.h, so I am not sure if this makes a difference? How can I send bits instead of chars? Is it possible to send custom structures using WinSock? I have posted a related question to this with regards to threading, I wanted it to be separate from this as it may or may not be directly related.
  15. Hey, I am wondering what the usual process is for sending key input from client, to tell the server they want to move "left" for example. Do I send a message each loop of the client that they are holding the key down? Or how is it normally done? If you didn't realise, I am quite new to networking