• Advertisement


  • Content count

  • Joined

  • Last visited

Everything posted by ProblemBaby

  1. Hey I never get impressed of the results from all sprite/tile tutorials on the net. I want to learn how to draw good looking sprites ala Final Fantasy, Castlevania, Mega man etc.. any books or online tutorials to recommand?
  2. I would like to know if it is possible to get good accuracy when drawing blended single color quads to a texture without using floating point. My card only supports max 8-bit alpha for an FBO and 8-bit just isn't enough. So can someone tell me if there are any other techniques i could use in compensation for the lack of a 16/32bit alpha channel? Thanks.
  3. Hello I'am doing VoIP, but besides that I sometimes have to do file transfers. I want to make sure that the files are sent as fast as possible BUT without causing VoIP packets to get delayed which is the case now because packets containing file data are stocked in the queue. So what I would like to do is to give higher priority to just some packets that I send (the audio packets), but It doesn't seem possible. So are there any other effective ways to solve this? I'am using UDP. Thanks
  4. Thanks for the reply. I don't know the exact implementation in ENet but it only seems to deal with the case when queues are stalled because the peer is late with it's acknowledges? If I send a file one packet at a time... send a packet, wait for an acknowledgement, and so on. I guess it could work since the send queue never gets so filled, but my plan was to send as much as possible and then having the peer request missing packets in the file. So I want to somehow know how much I should send at one time to make sure that it can deal with the next bunch of audio packets that will arrive a little later.
  5. Hello I know that similar questions has been answered earlier but you can't seem to get it right. if have a plane at (0,0,-1) with a normal (0,0,1) and try to project two points (-0.1f, +0.1f, -1.0f ), (+0.1f, -0.1f, -1.0f ) I would expect them to come out the same or maybe am I missing something? anyway I get (which can't be correct): -0.14,0.7,-1 +0.14,0.7,-1 Here is my code for testing... struct VECTOR { float x, y, z; }; VECTOR VecSub(VECTOR a, VECTOR b) { VECTOR v; v.x = a.x - b.x; v.y = a.y - b.y; v.z = a.z - b.z; return v; } VECTOR VecCross(VECTOR a, VECTOR b) { VECTOR v; v.x=a.y*b.z-a.z*b.y; v.y=a.z*b.x-a.x*b.z; v.z=a.x*b.y-a.y*b.x; return v; } VECTOR VecNormalize(VECTOR a) { float l = sqrtf(a.x * a.x + a.y * a.y + a.z * a.z); a.x /= l; a.y /= l; a.z /= l; return a; } int main() { VECTOR p1 = { -0.1f, +0.1f, -1.0f }; VECTOR p2 = { +0.1f, -0.1f, -1.0f }; VECTOR n = { 0, 0, 1 }; VECTOR u, v; VECTOR p1d, p2d; u = VecSub(p2, p1); v = VecCross(u, n); u = VecNormalize(u); v = VecNormalize(v); printf("%0.5f %0.5f %0.5f\n", u.x, u.y, u.z); printf("%0.5f %0.5f %0.5f\n", v.x, v.y, v.z); printf("%0.5f %0.5f %0.5f\n", n.x, n.y, n.z); p1d.x = p1.x * u.x + p1.y * u.y + p1.z * u.z; p1d.y = p1.x * v.x + p1.y * v.y + p1.z * v.y; p1d.z = p1.x * n.x + p1.y * n.y + p1.z * n.z; p2d.x = p2.x * u.x + p2.y * u.y + p2.z * u.z; p2d.y = p2.x * v.x + p2.y * v.y + p2.z * v.y; p2d.z = p2.x * n.x + p2.y * n.y + p2.z * n.z; printf("\n"); printf("%0.5f, %0.5f %0.5f\n", p1d.x, p1d.y, p1d.z); printf("%0.5f, %0.5f %0.5f\n", p2d.x, p2d.y, p2d.z); return 0; } Thanks in advance
  6. Projecting a polygon onto 2D plane

    Thanks for the reply and the correction. Since you told me that the values i thought was strange is correct I start to think that I don't what I thought i was doing=) I thought it shouldn't rotate at all in this case? since its already looking down the Z-axis? I want to be rotate a plane facing in any direction and have it facing towards positive Z. How can I accomplish that? Thanks
  7. Hello I want to know how a starcraft battle.net-like server program could be designed. I guess all users connects to the server using TCP/IP and when a game actually starts they switch over to peer to peer and UDP? (If everyone is behind symmetric NAT a relay server is required as well?) on battle.net it is possible to write message to anyone online so I guess the connection to the server stays alive until the user quits battle.net? And I guess this also can help to keep track of players losing their connections to the internet? I have no idea about number of users but for example.. is it realistic to have a server program maitaining 1000000 users everyone with its own TCP/IP connection using berkeley sockets? are there any alternatives? Thanks in advance
  8. Starcraft-like server design

    Thanks for your reply! Quote:Also I hope you're joking with "1000000" users on a server If I want every user to be connected to the master server (network of servers) to be able to send private messages to any user at any time or to find out stats of other players for example. How many connections per server computer is realistic now a days? Thanks
  9. hello currently i have the depth buffer disabled and draw all sprites in order, back to front. There are quite a lot of overlapping sprites so i was thinking that maybe i could gain some speed by enabling a depth buffer and draw all sprites front to back instead and by doing so don't render a lot of pixels that in the end will be covered by other objects anyway. my question is basically if this would help to speed up my game? or is it already some kind of mechanism that makes this for me even with the depth buffer disabled? another thing that comes to my mind was if I use this technique will I still be able to use alpha blending? can I do some kind of reversed blendFunc? thanks in advance. EDIT: I should mention that iam using OpenGL ES 1.1
  10. Visual Studio 2008 Resource Editor

    Hey Iam currently making a map editor for my game and have some problems with the resource editor in Visual Studio 2008. The thing is that some of my items didnt get their names correctly.. for some reason my Open got the id: ID_FILE_SAVE40007 (of course I would prefer ID_FILE_OPEN). so I tried to change the ID box in the property window to the right one but even after doing so the defines in the resource.h doesnt update. Is it something I can do about it? I guess I will make more mistakes in the future and if I can't change to a more appropriate my program I will get crazy about all misleading defines. Please Help! Best regards
  11. gravity & balance

    Hey I'am playing around a little with physics and have some trouble to understand some concepts... I've a square formed object (in 2d) with its upper left side nailed and it will not move. Now I want to figure out what gravity will do to the other three points of the square. Can someone help me out? thanks in advance
  12. Hello I'am playing around a little with a sphere in a 3d world my code is heavly based on this ( http://www.gamedev.net/reference/articles/article1026.asp ) document. The only thing that makes me troubled is when I collide with 2 polygons at the same time. for example the case when iam falling down into a V-shaped hole, I end up sliding around forever in the bottom. So what iam wondering is if someone have a nice solution for collision between more than 1 polygon at a time. thanks in advance
  13. Collision Detection for a sphere

    Thanks for your reply I will fiddle around a little with your idea in mind.
  14. Rotation

    I want to simulate a ball rolling on a floor in 3D but can't find out how to set up the rotation for this... can someone help me?
  15. Rotation

    Works perfect! Thanks
  16. Iam writing a mixer and its using linear interpolation. My question is even if the sound is about to be played at a higher freq then the mixingfreq, will linear interpolation make it sound better? I tried to listen for differences but couldn't hear any, so what do you think? are their cases where it sounds better or can I optimize my mixer so that it only applies linear interpolation to samples that plays under mixing freq? Thanks
  17. Hey I was just wondering if it is possible to somehow get rid of the log in this peace of code. I know I can make a LUT but i would prefer an algo that computes next y depending on the previous. for (i = 0; i < c; i++) y[i] = log10((double)i / (double)c); thanks
  18. is it possible to optimize this?

    Thanks for replies! I will try it as soon as ive time and see if I can use it! it's for a synth. I want to optimize the envelope calculations.
  19. dB

    Hi I want to know the relationship between a dB and an actual sample in the computer! So for example if Ive a 16-bit sample and I want to change the volume by XdB what does the formula look like? Thanks!
  20. dB

    Thank you very much! I got it to work;D
  21. Lines in 2D

    I've some problems drawing my lines in 2d... I set it up like this: glViewport(0, 0, ClientRect.Width, ClientRect.Height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, ClientRect.Width, ClientRect.Height, 0, 0, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); And when I try to draw a horizontal line at y(0) it doesnt appear it seems to be drawn at y(-1), but it works if I add one unit to either of the y-coordinates // Doesnt work glBegin(GL_LINES); glVertex2i(0, 0); glVertex2i(100, 0); glEnd(); // But this three makes a straight line at y(0) glBegin(GL_LINES); glVertex2i(0, 0); glVertex2i(100, 1); glEnd(); glBegin(GL_LINES); glVertex2i(0, 1); glVertex2i(100, 0); glEnd(); glBegin(GL_LINES); glVertex2i(0, 1); glVertex2i(100, 1); glEnd(); This is only true for horizontal lines, When I draw a Vertical line like this: glBegin(GL_LINES); glVertex2i(0, 0); glVertex2i(0, 100); glEnd(); it works as supposed! Its the same for points (if I draw them at y(0) they don't appear) but if I specify 1 it appears at 0 I don't have problems with other primitives. Very weird I think! And Ideas? Thanks
  22. Lines in 2D

    Thanks for all the replies Sorry for the late answer! First I tried to translate down the Model View half a pixel but that didn't work for all primitives so I changed it to 0.4f and it seems to work. Though I still think it's weird how the effect of the translation differs. Anyway thanks for the help!
  23. So I want to make a class for linked lists. When I define it I want to make something similiar to what the standard vector-class does! ListClass <int> list; // where <xxx> = is the type Then be able to access the elements like this: list[x] I've no clue how to make the first thing mentioned! I succeeded halfway with the second thing by overloading the operator [] but I can still only retrieve data! like... (for an int linked list) a = list[0]; // OK! list[0] = 20; // (gives me error, which in fact makes sense, but how should I make it work?) Please help me out cheers
  24. Thanks I'll try it! How about the first thing? Specify the type, any ideas?
  • Advertisement