Jump to content
  • Advertisement

Jarred Capellman

Member
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

128 Neutral

About Jarred Capellman

  • Rank
    Member

Personal Information

Social

  • Twitter
    jcapellman
  • Github
    jcapellman
  • Steam
    Adrenaline

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Jarred Capellman

    Buiyng A Book

    I'll third that the red book is a very good resource for anyone whether you are just starting or a veteran.
  2. Jarred Capellman

    Video RAM size determination from OpenGL App

    If you're using SDL: const SDL_VideoInfo * VideoInfo = SDL_GetVideoInfo(); VideoInfo->video_mem (it's an unsigned integer of the number of bytes available)
  3. Jarred Capellman

    Socket Web Server - No Images?

    I got it to work! for (unsigned short x = 0; x < (unsigned short)results.st_size; x++) { bBuf = inputFile.get(); sendP(socket,bBuf); } I'm using that code for both binary and ascii files, yeah it's only 1 byte at a time but it works. There is one issue it's printing "ÿÿÿÿÿÿÿÿÿ" at the end of the file, I'll have to find the bug that's causing that, shouldn't be too hard. Thanks your help, this networking stuff is pretty new to me still and there wasn't any examples of a simple web server to look at.
  4. Jarred Capellman

    Does anyone else hate VC++.NET?

    Visual Studio .NET is by far Microsoft's greatest achievement, if it had tabbed projects (where you could alternate between 2 or more projects with only 1 window) it would be the next best thing to whatever God developed the world in :)
  5. Jarred Capellman

    Socket Web Server - No Images?

    After some testing it is going down the binary path. I updated the header fields, thanks for that info. The array holds the content-types, like "image/gif" or "text/html". A couple lines above the code I showed it matches the file extension to the content type that's defined in a seperate file. A lot like the AddType command in Apache's conf files. I'm getting Ethereal right now I'll report back on my findings.
  6. Jarred Capellman

    Socket Web Server - No Images?

    I'm opening it like this: if (!arrContentType[idx].binary) inputFile.open(fileName.c_str()); else inputFile.open(fileName.c_str(),ios::binary); if (!inputFile.is_open()) { sendErrorP(socket, "The file (" + fileName + ") you requested does not exist, check your url"); inputFile.close(); return 404; } stat(fileName.c_str(),&results); sendP(socket,"HTTP/1.1 200 OK\nConnection: close\nContent-Type: " + arrContentType[idx].contentType + "\nContent-Length: " + stos((short)results.st_size) + "\r\n\r\n"); if (!arrContentType[x].binary) { while(!inputFile.eof()) { inputFile.getline(aBuf,255); sendP(socket,aBuf); } } else { for (unsigned short x = 0; x < (unsigned short)results.st_size;x++) { inputFile.read(bBuf,1); sendP(socket,bBuf); } } inputFile.close(); sendP is just a wrapper for send so I dont have to have the size parameter, it just does a size of before it sends. [Edited by - DarkHacker on February 7, 2005 2:55:27 PM]
  7. Jarred Capellman

    Socket Web Server - No Images?

    Thanks for the tips. I've got it to have the correct width of the image now, but the height is really big and there still isn't an image just the default broken image. When viewed without the html its only a couple pixels wide and about half as long of a broken image in comparison when it's viewed using html. Wget says there's a read error at the first byte but it connects fine. The reason I was only doing 1 byte at a time was for debugging purposes, since I actually get a Mozilla error: "The image cannot be displayed, because it contains errors" when doing it with 1 byte. It's a very strange error.
  8. Jarred Capellman

    Socket Web Server - No Images?

    I'm sending the content-length and the content-type now, opening up any non text file in binary and then reading it one byte at a time. Instead of a timeout with an eventual "This image is broken" error now it appears like it's a broken image since it's displaying the can't find the image picture in it's place. Any ideas? [Edited by - DarkHacker on February 7, 2005 12:11:08 PM]
  9. I wrote a basic web server using Winsocket/BSD Sockets for my mmorpg and it displays html files perfectly with one exception, there are no images. What do I need to do in order to get them to be displayed? Is it a content type issue? Thanks in advance. [Edited by - DarkHacker on February 7, 2005 12:29:41 PM]
  10. Jarred Capellman

    OpenGL book

    I have the OpenGL Superbible, Opengl Game Programming, OpenGL extensions and the Red Book. The Red Book has by far been the most informative. When I wanted to get more indepth on a subject I would check my other books and if they didn't have the info I would just use google, news groups and this forum. This method has cost me quite a bit of time lost in writing engines that aren't designed very well. I have however, learned through trial and error some good design decisions and hopefully I'll be able to show off my new engine soon. To answer your question directly, think about how to solve a problem and then try and use your knowledge of programming, opengl etc to make it work. If you can't get it working use another resource like this forum or google. If you just read examples then you're only learning one person's solution (I'm not saying you are, it's just a general comment). Good luck.
  11. Jarred Capellman

    question on Linux/SDL lesson07

    It's most likely a KeyUp issue, if I have time later today I'll submit a revised tutorial #7.
  12. Jarred Capellman

    environment mapping

    For environment mapping of metal objects in my game I copy the screen into a 512x512 texture every frame (into the same texture) and then appy it to the metal object via multi-texturing. Obviously you have to create the texture before you render your 2D objects and weapon model or it will look really weird. On my system there isn't any performance cut doing it this way and it looks far more natural then then just applying a generic reflection map.
  13. Jarred Capellman

    Thread Help

    Thanks! I got a thread working now (it doesn't crash anymore), I'll report back when I have it working like I wanted and post code for other people who are looking to add another thread using SDL.
  14. Jarred Capellman

    New game for Linux and Windows in development!

    There's not a whole lot of information on that page, kinda defeats the purpose of having one no?
  15. Jarred Capellman

    Thread Help

    What I'm trying to do is add a seperate thread for loading my map data so the program can display a loading screen and later on I wanted to use it for making map changes seamless. Since I'm going to be using the thread in my LoadMap function only I thought I'd go about doing this: void LoadMap(string fileName) { //CreateThread //ExecuteDataLoadingFunction with the fileName passed to it in another thread so the rendering loop can continue //Then after the data is loaded start creating the GL Textures and VBOs based on the data loaded in the thread } How would I go about doing this using SDL's threading functions? I've tried on my own based on the docs at SDL's official page but it crashes my program.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!