Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About cmroche

  • Rank
  1. extern "C" is the trick here, sometimes compilers will try to work with modules compiled in other system but I've seen very little success with this in VC++. Essentially the names, when compiled in C++, are being mangled in compiler specific ways. When you try to link these through another compiler it is unable to find the desired exported symbol.
  2. cmroche

    Creating 3D game for PSP

    In some countries, particularly ones which have anti-circumvention laws, development for the PSP may be illegal unless you are capable of getting your hands on a Sony development tool; as a new developer you will probably find this impossible. I won't post a link here in case it is against forum rules, but just google for information on PSP development, you will find what you need. Essentially the homebrew scene is a GCC toolset which cross compiles to the PSP. You won't be working with your normal PC architecture, there are a few quirks specifically in the PSP hardware you will learn along the way. Do lots of reading first, it will help in the long run. Your choice of modeling software is yours alone. The hardware has no dependency on the model format or tools you use to create and import models. This will all be part of the code you create. My guess though is that you might find useful information in the Ogre3D project... I am not fully sure if it is easily supported on PSP but suspect that it will work. Two things off hand to note: 1) 16 bit depth buffers in the hardware only. 2) Non-preemptive threading. Learn to work with those limitations.
  3. cmroche

    Screen Coordinate Types

    All of our front end code, which generally are menu and 2D works, use float for coordinates. This is likely also because we use the same rendering engine in our menus as we do in the 3D portion of the games. There may be some advantages to using float, specifically the ability to use ortho perspective in 3D which could mean offloading more of the work, like rendering through Direct3D or OpenGL to the video card. I'm not going to say that using float is a requirement for efficient code, but given the homogeneous approach to rendering systems (especially if any aspect of the game will be in 3D) I think you would find advantages.
  4. You can implement a particle system in the main thread, there is no reason why you should have to run two threads to do this task, especially since you are synchronizing data so frequently between both contexts. Furthermore, a single threaded approach here would reduce complexity, development time and debugging time. Remember, keep it simple.
  5. We have used unit test at our studio, usually this is to test certain classes or libraries with the code to ensure they function as intended, they are one aspect of testing.
  6. cmroche

    Text input - control + left/right

    Consider using Direct Input to read keyboard data back. This is pretty much exclusively how we handle input at our studio, it may not work well with your IME stuff that you are doing, but it may be possible to still read WM_CHAR events for text input when required and use Direct Input to handle non text based input like CTRL + any button.
  7. A common backend system, such as an SQL Database would be helpfull to start with. I have implemented a similar setup before with some websites and this is the general idea: Client connects to the authentication system and attempts to authenticate. If authentication succeeds, the server generates a unique ID (should be unpredictable for security reasons) and inserts a record into a database with the user's name, the ID, and time of login. User then passes to the destination server, and when sending any requests to the server includes the unique ID to act as the session ID. The destination can verify the user is authenticated by looking up the unique id generated at authentication. This could further be improved, if speed is a concern, by maybe running a service on the destination system that would keep the session in memory. So instead of the authentication inserting to the database, it would send it to the destination service directly. You would also have to invalidate session after a set period of inactivity.
  8. 400 connections is a lot! This is not for a system with a weak heart, that is for sure. I am thinking for a development box this really might be an unreasonable number, you might want to look at distributing the load of those connections over a couple of computers. Anyway, keep in mind that sockets eat up memory too, and a lot of home routers cannot track more than a couple hundred connections. While it does sound like the situation is on your PC since you cannot open Internet Explorer, keep in mind that you might have further problems with this many connections on any home networking equipment you might have. While I am not fully sure of the purpose of these network streams, switching over to a UDP setup might help a bit too, since your system in theory doesn't have to track that state of so many connections, though I am thinking you would definitely be dropping packets if too many of those connections are actively transmitting.
  9. 90% of the time this happens to us it is one of two things: 1) Uninitialized values... fairly self explanatory, check for uninitialized values, and make sure you get into the habit of initializing your variables. If this is a common occurance, you may not be efficiently creating variables. 2) You are corrupting the heap somewhere. Usually invalid pointers or stepping out of bounds on an array, often this can happen because of problem number 1 too. A trick I learned is to enable a feature in Windows called "Global Page Heap". If you check the MS website for it, there is a simple debugging toolset you can download, and a command to give on command prompt. Basically this makes windows check all heap allocations and access in your game. If you are not using any special memory management techniques (such as memory pooling) this should work well. Also remember that can can make a release build, which behaves fully like a release build but does also include debugging symboles, so that when you experience the crash at least you can do some JIT debugging and see where it happened. Just turn debugging symbol output on in the release build properties.
  10. cmroche


    As the previous post said, most routers now-a-days silently ignore the ping and don't respond, makig it look like the router isn't there. If you get an ICMP error back, you might be able to assume there is an issue with the router, but again, some other routers will send an ICMP response to indicate an error and this is very normal. If there are any TCP services enabled on the router, in which it listens, like a web interface or telnet/ssh, you can probably use a TCP ping (which is actually just a TCP SYN request) and get a much more reliable response. If it is working, it ACKs, if something happens you either get no response or an ICMP error, but this too is not 100% reliable.
  11. cmroche

    sprite movement question

    I wil be hones and tell you I didn't read the articles you posted, most people probably didn't, so a bit more detail would have probably helped to clarify your question. I understand that you have an animation with x number of frames and you need to know what frame to draw at a given time. the previous post has the basic framework for this, at the start of an update cycle you need to grab the current time on the system. You will also need to know how many frames per second the animation should update. Usually 20-30 is good for very fluid movement, but in a 2D game it could be even less, tweak the values until you find something you like. If your time measurement is a cumulative number of seconds that has passed since the game started, finding the right frame could be as simple as this: iTimePerFPS = iCurrentTime / iAnimationFPS; iCurrentFrameIndex = iTimePerFPS % const_NumberOfFramesInAnimation; You now have a frame number based on the current time. For some types of animation this gets a bit more complicated, since the state of the animation might not be relative to the number of seconds since the game started, but instead the number of seconds since the animation started; if that is the case, store the time the animation started within the object representing that animation and calculate your frame index with that value instead of iCurrentTime. iElapsedTimeInAnimation = iCurrentTime - iAnimationStartTime; iTimePerFPS = iElapsedTimeInAnimation / iAnimationFPS; iCurrentframeIndex = iTeimPerFPS % const_NumberOfFramesInAnimation; Good luck.
  12. Most games I have worked on, we grab the current number of CPU ticks (epoch time as it is called) at the beginning of the game loop, and use that through the entire loop. Works well, and framerate independant. In some situations where we need to know the amount of time elapsed since the last time the loop was run, often used in interpolation, we just store the data in another variable and update it at the end of the main loop with our most recent value. While it is difficult to say without knowing what you are tyring to do, time synching client/server systems probably are not the best way to go around handling movement updates between two client system. Instead look at the articales at some of the predication algorithms used for online games, and some of the smoothing algorithms used (for when things fall out of sync). I imagine the way this works is periodically we send a position update, and and the positions changes we send the speed and direction of the movement and leave it to the other client to computer the new placement of the object, smoothing out the differneces when the client receives the periodic position update once again. Hope this helps.
  13. Let me start by telling you how much I hate SN Systems and debugging for either the PS2 (especially) and the PS3. It makes me wonder how they manage to get so many titles out the door... not to mention that the PS2 is very moody too. I have not done much development on the Wii yet, but I have been looking through our system guides for Wii development and the tools seem to be fairly decent to use, though there are some odd quirks when doing working with the nDev system. I am going to probably go with XBOX being one of the easiest systems to work with, the XNA framework alone, even in its infancy, provides a great interface, and access to all your standard MS development tools which can assist you with development on the XBox. Also, they support homebrew (with a very small yearly subscription).
  14. cmroche

    Dynamic music generation?

    I did a little bit of looking into this a couple months ago, just out of interest and I was curious to know if it could be done. I came across a few university papers on the topic, and it seems that there really isn't anything out there yet that can purely generate music that would consistently sound like music, so much as noise. While I am not fully sure of how feasible it is, as i have never done this myself, it seems like a better approach would be to work with an artist and generate a large library of beats and patterns which could be strung together to give the appearance of constantly unique audio. I am sure there are many ways you could tackle this, I wonder if maybe the Music Genome project might hold a few clues as well. Good luck.
  15. cmroche

    multi core multi threading

    http://msdn.microsoft.com If you come into the forums with a very stuck up attitude, you will find that you will not get much help. Both Google and MSDN provide very simplified, broken down, and easy to understand and re-use demonstrations of multithreading; if you are unwilling to do the research required to learn from these very usefull resources, you probably should not be in the industry.
  • 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!