Foobar of Integers

Members
  • Content count

    267
  • Joined

  • Last visited

Community Reputation

253 Neutral

About Foobar of Integers

  • Rank
    Member
  1. [java] Help with RMI

    I found a tutorial on the net that might answer my question, so I'm gonna play with that for the night.
  2. [java] Help with RMI

    I don't see what could be going wrong for you, but I exported the Eclipse project as a jar here and put it in the same directory as those .java files. Also, I don't want to just post the code here, it's too long.
  3. [java] Help with RMI

    It's a problem with the classpath, I think. Don't run it from the directory with the .class files, go up a directory and do java rmidemo/Server Don't forget to run "rmiregistry 1119" in another console before you start the server
  4. [java] Help with RMI

    It's a bit clunky to open up 5 rafb/paste windows, so here, I uploaded all the .java files: http://www.acsu.buffalo.edu/~dhf2/rmidemo/ Client and Server are obvious (they both have main methods, when I run this I open up three consoles, one I do rmiregistry 1119, the other one I start server and then in the third I start client. And NetworkImplementation is just the server's implementation of NetworkInterface.
  5. [java] Help with RMI

    So, I have a small RMI demo app which has a few classes, Server, Client and NetworkInterface (which is the interface that the Server publishes to the RMI registry) Server starts up, sets up RMI, just sits idly in a thread, which is exactly what I wanted. I run the Client, it's all fine, it has no problem connecting and executing the server's methods. Ok, so this brings me to my problem: In Server's implementation of NetworkInterface, (which takes a reference to it's parent Server object when you create it) the methods published to RMI call another method on the Server object, which just for test purposes increments an int inside the Server instance (private int _myData) Each time I run the Client, (without killing the server, mind you) I expect the _myData to increase by 1. However, each time, it just gets reset to the initial value. So the problem I'm having is, how can I make the RMI methods actually change some internal server variables?
  6. Why use low rez textures in distance?

    Is it unnecessary to use the low resolution texture if you generate mipmaps for your normal textures?
  7. code signing - do I need to do it?

    I wouldn't be surprised. At the very least it would repeatedly ask you if you're sure until you punch the computer.
  8. Not only are you loading 28 megabytes from your hard drive, which would take a few seconds at least, but you're asking the computer to allocate 28 megabytes of memory to you, and I imagine do some kind of processing on the data (put it in specific structures and such) before it's all ready to render. It's not gonna get much faster. If you're looking to load models during gameplay (For example, in a game that's supposed to have no load times with a large world) you'd want to look into threaded loading, but that's not really relevant to what you're trying to do here.
  9. please help me!!!All The steps to make a game

    Making games is actually very simple. I'll outline the steps: 1. Post a topic asking about how to make an MMORPG 2. Use Visual C++ 2005. On the top left of the interface there's a "Game" wizard. It will ask you what kind of game you want to make. 3. ??? (This step generally involves a trip to Vegas across the desert in a large red vehicle) 4. Profit! In all seriousness though, you need to be more specific than that. What kind of game? What are your goals?
  10. What are most popular games coded in?

    Actually, this is not well known, but C++ supports up to 32 colors in G++ if you use the -fextra_colors flag. They're apparently planning to add support for up to 256 with the next release! Also, professional MMORPGs such as World of Warcraft are not written in C++. They use Game Maker, as it is so much easier.
  11. glLightfv: cant move my light!!!

    I think I found your problem. (Or, at least, a problem) After putting an obscene amount of GL debugging in your program, I have found that OpenGL is generating a GL_INVALID_ENUM in main() on the line glutCreateWindow("Test Window"); there's no error right before that line, but one shows up after it and before the next line. I have no idea what could cause it. [Edited by - Foobar of Integers on January 22, 2007 6:04:18 PM]
  12. glLightfv: cant move my light!!!

    It doesn't even change the light's color? That's weird... Do other OpenGL programs that use lighting work on the same machine? I really doubt it's any hardware problem, but it's best to rule that out anyway. The only thing I saw in your code, other than not having the light setup in the same spot I suggested (which certainly wouldn't affect color) is that you never specified a material for your sphere. But that shouldn't prevent lights from changing color or moving, your sphere would just use whatever the default material settings are. I'll screw around with your code you posted, see if I have the same trouble. Edit: I added materials and all that nice stuff, it has the same problem on my machine.
  13. glLightfv: cant move my light!!!

    Try this: void glut_display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(look_phi, 1,0,0); glRotatef(look_theta, 0,0,1); glTranslatef(-pos[X],-pos[Y],-pos[Z] ); glLightfv(GL_POSITION, GL_LIGHT0, light_pos); glLightfv(GL_AMBIENT, GL_LIGHT0, light_amb); glLightfv(GL_DIFFUSE, GL_LIGHT0, light_diff); // set up your lights after you've moved the camera // to make it so that the light appears stationary when the camera moves. glutSolidSphere(10,10,10); glPopMatrix(); glutSwapBuffers(); } I've done this many times and this order always seems to work for me. I can give you working example code if you want (Though with SDL for windowing/input instead of GLUT, but that won't change much) Edit: I got bored, here's the example, compiled in Visual Studio 2005, I've also got it for Mac if you like. [Edited by - Foobar of Integers on January 22, 2007 1:01:08 PM]
  14. glLightfv: cant move my light!!!

    float myLightPos[] = {x, y, z, 0.0f}; that's your problem, I think. Set the last variable to 1.0f. When set to 0.0f, OpenGL calculates that light as a directional light, (think the sun as a directional light and a lamp as a point light) and X,Y,Z is the direction the light is heading, not its position. If you set it to 1.0f, the light is calculated as a point light, which I think is what you want for a light that's following your camera. With your light as you had it, no matter what you do, it was still pointing straight down, 0, -1, 0. Edit: Once you fix that, the proper order to make a light "follow" the camera is this: light1.setupToRender(); // position the light at, say, {0, 2, 0} to have it above the camera m_pCamera->setup(); // position the camera. It produces results like this That is with a point light at {0, 0.5, 0} setup with a spot direction of {0, 0, -1} and a spot cutoff of 20 degrees, to give a flashlight effect.
  15. GLSL: SinCos with lookup table?

    I would recommend having a 2x360 texture with the values for sine in y=0 and cosine in y=1 (or however you want to implement it).