• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

canned

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

128 Neutral

About canned

  • Rank
    Member
  1. What about using a temporary ID on the client? So, the client creates a fireball and sets its temp ID equal to TempClientID. It then increments TempClientID for the next fireball. The client sends the fireball information to the server (including the temp ID). In the server's response, it includes the real (server generated) ID to use (the response also includes the client's temp ID so you can tell which fireball the server is referencing) and the client then uses this new ID for the remainder of the fireball's lifespan.
  2. Yeah, I would definitely reccommend setting up a source control server. SVN is probably the way to go. Just open up your router and get registered at http://www.dyndns.org or some similar site - then your code is available no matter where you go, portable harddrive or not... Plus you reap the benifits of source control...
  3. I definitely didn't want this to turn into a war of the languages, though I should have seen it coming as anytime the two languages are mentioned in even the same city, sides are instantly formed and words are thrown like weapons. So maybe a better way to approach this is in the form of a poll. Instead of asking what people think is best, how about, what have people done and to what success? So the new question: In building a client / server game (MMO prefered, but any other form of client / server system works as well), if your client was written in C++, was your server also written in C++ or Java instead? Thanks for the input!
  4. I'm curios as to what languages people are using for their client / server systems. I assume most clients (game-wise anyway) are written in C++. But with that in mind, do most people program a server for a C++ client in C++? Or is Java at all popular? Obviously sticking with C++ for both the client and the server provides the benefit of code reuse. But is it easier to get a distributed server built out of Java? Or are there other benefits to Java? Or do people just stick with C++? Thanks for the input!
  5. I got it working. Turns out it was the Vertex buffer that I didn't quite understand! I had forgetten about the whole FVF idea. So I was treating the vertex buffer as if it were full of D3DXVERTEX3's when in fact, each vertex had much more data. Are there any helper funtions to extract different portions of FVF data from a vertex buffer? As it stands, I'm extracting the vertices with: memcpy(&vertices[0], &((BYTE*)pVertices)[faces[0] * bytesPerVert], sizeof(D3DXVECTOR3)); That seems a little messy, though it works. So if there's a cleaner way, I'd love to know about it. Thanks!
  6. The plane is a trapezoid that extends from the user. It has a shorter edge at the user and a longer edge in the distance.
  7. I've been browsing around the older posts on this forum about this very topic, but I am yet to find a solution to my problem. I'm drawing a plane that represents the range of the user for his melee weapon. When the user right clicks in this plane, I want a projectile to be fired at the point where he clicked. I'm using a mesh to draw the plane and the D3DXIntersect function to determine if and where the user clicked in the plane. I am currently able to successfully tell if the user is clicking in the plane, but the "where" part does not seem to be working correctly. It seems to me as if my plane is divided diagonally in half - when I click on one half, the projectile goes to roughly the correct location. When I click on the other half, the projectile launches as if I clicked on the opposite corner (if I click in the lower left, the projectile fires to the upper right and vice versa, yet if I click in the lower right, it goes to the lower right, same for the upper left). I'm calculating the "where" using the barycentric coordinates returned by the D3DXIntersect call. Once I convert these to cartesian coordinates, I translate them using the world matrix for the object. My code follows: D3DXIntersect(pLocalMesh,&vNear,&vDir,&bHit,&dwIndex,&u,&v,&dist,NULL,NULL); //Convert the barycentric coordinates to world coordinates BYTE* pVertices = NULL; BYTE* pIndicies = NULL; HRESULT hr=pLocalMesh->LockVertexBuffer(D3DLOCK_READONLY, (LPVOID*)&pVertices); if (!FAILED(hr)) { HRESULT hrIndex = pLocalMesh->LockIndexBuffer(D3DLOCK_READONLY, (LPVOID*)&pIndicies); if(!FAILED(hrIndex)) { D3DXVECTOR3 vertices[3]; short faces[3]; faces[0] = ((short*)pIndicies)[(dwIndex * 3) + 0]; faces[1] = ((short*)pIndicies)[(dwIndex * 3) + 1]; faces[2] = ((short*)pIndicies)[(dwIndex * 3) + 2]; vertices[0] = D3DXVECTOR3(((D3DXVECTOR3*)pVertices)[faces[0]]); vertices[1] = D3DXVECTOR3(((D3DXVECTOR3*)pVertices)[faces[1]]); vertices[2] = D3DXVECTOR3(((D3DXVECTOR3*)pVertices)[faces[2]]); //V1 + U(V2 - V1) + V(V3 - V1). D3DXVECTOR3 temp = vertices[0] + u * (vertices[1] - vertices[0]) + v * (vertices[2] - vertices[0]); D3DXVec3TransformCoord(&temp,&temp,&m_MatWorld); pvPosition->x = temp.x; pvPosition->y = temp.y; pvPosition->z = temp.z; pLocalMesh->UnlockIndexBuffer(); } pLocalMesh->UnlockVertexBuffer(); } If anyone has any ideas why this might not be working, please let me know. I was initially unclear how the index buffer worked, and it's possible that I still am. But outside of that, I can't seem to figure out where my error might lie. Thanks!
  8. Quote: please tell me if you get what i mean. i think you simply missing some fundamental c++ and the general OOP concept of polymorphism etc. I get what you mean. I understand exactly why it is happening and it makes perfect senese to me. I was just curios if there was a quick way to get around this. As it seems like there isn't, I've just created a NetworkCommandFactory object that, when taking in the raw data, calculates the type and builds the right type of command for the job. Thanks for the replies.
  9. I'm building a network protocol and I am using objects to contain the data that I'm sending and receiving over the socket. I have one parent type object, NetworkCommand, and several other objects that implement NetworkCommand, for example NetworkChatCommand. So, for the above two, NetworkChatCommand extends NetworkCommand, adding a string for the chat message. Furthermore, NetworkChatCommand overrides a virtual function from NetworkCommand, parseData(). This function is used to break up the raw data (when the client receives data, it places it in a NetworkCommand and then parseData is called to break it up into length, command type, and the other data). My Problem: When I receive data from the socket, I create a NetworkCommand and pass the data into it. I then can check the byte of the data which tells me what command type it is. Say the message is a Chat message. I want to type cast the NetworkCommand into a NetworkChatCommand and call the parseData function to break it up and extract the chat data. However, since I create the object as a type NetworkCommand, whenever I call the parseData() (even after type casting it), it is calling the function of NetworkCommand and not NetworkChatCommand. Is it possible to make something like this work? I could also have the parseData function in NetworkCommand figure out which command type it is and call the appropriate class's parseData function, but because they are child classes, I cannot call the functions. Also, I assume type casting the (this) pointer would have the same result as above (still calling the parseData function of NetworkCommand instead of the type-casted class). Any ideas on how to get around this? Or perhaps of a better approach in general? Thanks!
  10. Works For Me Too AMD64 3200+, Nvidia Geforce 4 4200
  11. Oops! Forgot to log in for the last post... So just FYI, the last post from Anonymous was from me (the original author of the question).
  12. I'm working on an MMORPG style game for a school project. It is a client-server model with a database as a backend. I'm wondering what protocols should be used for what. I know the UDP vs TCP argument is a common question and is discussed in the FAQ. I need to take it a little further than what is covered there. The game is ship based and will involve combat between ships. So, for ship movement and cannon ball movement, ie the twitch gaming portions of the game, I'm thinking UDP is the best way to go (as seems to be the common approach). So I'll use UDP and interpolation to handle that. As for the other elements of the game, I'm wondering if TCP is the best way to go, thus using both protocols. First of all, is it common that games will use both protocols, or do they often times pick one and settle on it. Is there a performance motivation to settling on one packet or using both. The other elements of the game: Users will dock at ports. The user then requests the port information from the server and displays it when its received. Port information is sent only on a request-basis and thus, a lost packet cannot merely be ignored in favor or a later update. Users will fire cannon balls in combat and will need to tell the server that such an event has occurred. Once cannon balls are fired, the cannons must be reloaded. Thus, if the user fired the cannons and the packet declaring this never made it to the server, the user's cannons would be unloaded and they would have to wait for them to reload again without ever reaping the benefits of the lost shot. There will be other similar events in the game. Is using both TCP and UDP for this game a good model to follow? Or would people suggest one over the other. Next, I have a few questions that are specific to the MMORPG genre. I'm not sure how to handle things like user inventory and statistics. Do you maintain a copy of the users inventory on the client side, only updating the server when the inventory changes? Or do you store the inventory on the server and fetch it any time the user requests to see their inventory? The quick answer that comes to mind for me is that it would be best to manage it on the user side and just update the server as necessary. This seems to achieve the least amount of server interaction and ensures that things happen in a timely manner on the client side. However, it seems more prone to hacking (Like the Diablo complex)... So how do games handle issues like that? I know validating any information that is given to the server is important, but are there any other tricks?
  13. Thanks! Got it working.
  14. I am tryign to implement a picking method similar to the one detailed at http://www.mvps.org/directx/articles/improved_ray_picking.htm He uses the ScreenToClient(...) function from the MFC libraries. This requries reference to your current window. Is there a way to get a reference to this on the fly? Say from a Direct3D device or otherwise? I tried calling GetCapture() as he does and I'm finding that it never returns anything, that is: if(GetCapture()) evaluates to false...
  15. What I described above could still work for you, assuming that your using dirext sound. It's not restricted to a game space. I haven't worked in depth with the Direct Sound API so I couldn't tell you how to do it exactly, but if you look at some of the tutorials on 3d sound, I'm sure you could figure out how to place the sounds correctly. Then just follow the model I suggested. And in fact, this should work with any sound API that supports 3d sound. So as long as you are using a sound card that has front and rear channels, you should be fine.