FXACE

Member
  • Content count

    245
  • Joined

  • Last visited

Community Reputation

182 Neutral

About FXACE

  • Rank
    Member
  1. Hello anyone! I wish to know: what difference between windows dynamic link libraries and linux shared objects? Does linux objects have entry points like DLLs (BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID data))? How to access public functions of lib.so? Thanks forward, for [b]any[/b] reply!
  2. Programming

    Shows a level of my knowledge in programming (games, graphics)
  3. Did you use shaders (if yes, post here what that shader does) or such things like "glEnable(GL_TEXTURE_2D)" at texture slot which was binded in? Does this "Texture" class support for loading bmp files?
  4. OpenGL GLSL Fog

    Hello Madd, 1. Why are you doing glFog<..> calls if you don't use "gl_Fog" structure in your fragment shader? BUILD-IN UNIFORM: [code] // // Fog // struct gl_FogParameters { vec4 color; float density; float start; float end; float scale; // 1.0 / (gl_Fog.end - gl_Fog.start) }; uniform gl_FogParameters gl_Fog; [/code] 2. (checked only your linear fog): In glFog<...> parameters (start,end) are in view space, while in your shader, looks like, screen space. 3. "mix" function description: float mix (float x, float y, float a) vec2 mix (vec2 x, vec2 y, float a) vec3 mix (vec3 x, vec3 y, float a) vec4 mix (vec4 x, vec4 y, float a) vec2 mix (vec2 x, vec2 y, vec2 a) vec3 mix (vec3 x, vec3 y, vec3 a) vec4 mix (vec4 x, vec4 y, vec4 a) Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of vectors x and y using the vector a. The value for a is not restricted to the range [0,1]. In this case, you will receive inverse of expecting result (flip "fog_color"<->"color")... 4. gl_FragCoord.z is already divided to gl_FragCoord.w by OpenGL and clamped to [0,0 .. 1.0] ([url="http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml"]glDepthRange[/url] parameters)... Hope, this helps you... Best wishes, FXACE.
  5. OpenGL Picking

    Well, I suggest you to use "color picking" if you planning (in near future) to pick objects with alpha testing. Best wishes, FXACE.
  6. Weird applications like Desktop Composition. Sometimes appears this issue even without these applications. It looks like when calling SwapBuffers(HDC) shows a result of previous (SwapBuffers(HDC) call, in other words - previous frame). There are two ways I know that might be able to solve this: 1. Add flag PFD_SWAP_COPY to PIXELFORMATDESCRIPTOR.dwFlags; 2. Do update screen twice per frame: [code] // [start of frame] DrawSceneToFBO(); /* back buffer */ GoToScreenFBO(); DrawBackBufferToScreen(); /* draws a quad with back buffer texture into screen */ SwapBuffers(hDC); DrawBackBufferToScreen(); /* draws a quad with back buffer texture into screen */ SwapBuffers(hDC); // [end of frame] [/code] (Looks ugly but works for me) Best wishes, FXACE.
  7. You can use [url="http://www.opengl.org/registry/specs/EXT/draw_instanced.txt"]GL_EXT_draw_instanced[/url] extension for that. Just send matrices (transforms of your cubes) to shader and a number of instance objects you need to render. Best wishes, FXACE.
  8. You need to update your projection matrix on "screen size change" event: (for example) [code] /* void onScreenSizeChange(int width, int height) { */ // width, height - new screen size glViewport(0, 0, width, height); // using classic OpenGL glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(width*-0.5,width*0.5,height*-0.5,height*0.5,-1,1); /* modify values here as you need */ glMatrixMode(GL_MODELVIEW); /* } */ [/code] So, when you apply this code, on any screen dimensions you will receive quadratic tiles. Best wishes, FXACE.
  9. I believe it more looks syntax call error than frame buffer problem. Your code: [code] gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, frameBufferID[0]); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); gl.glPushAttrib(GL.GL_VIEWPORT_BIT); // <--- You saved viewport bits gl.glViewport(0, 0, floorWidth, floorHeight); gl.glBegin(GL.GL_QUADS); gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3d(-1, -1, 0); gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3d(-1, 1, 0); gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3d(1, 1, 0); gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3d(1, -1, 0); gl.glEnd(); gl.glPopAttrib(); // <-- You restored previous attribute values (viewport bits) gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0); gl.glPopAttrib(); // <-- What it does restore??? gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0); [/code] Best wishes, FXACE.
  10. Recreating Polygon Offset in shader

    Maybe this will help you: [code] vec4 mv_vertex = mvMatrix * gl_Vertex; // mvMatrix = model-view matrix mv_vertex.z -= offset; // shift the value how much you are need gl_Position = projMatrix * mv_vertex; // projMatrix = projection matrix [/code] Does it? Best wishes, FXACE.
  11. [quote name='hplus0603' timestamp='1337408324' post='4941363'] First: if you think you'll get "unlimited" anything for $5/month, you are fooling yourself. It may be good enough for a web page, and/or a matchmaking/game listing service, but don't expect to stream a couple of terabytes of data a month on that system. Also, don't expect snappy web script responses on that web host shared with 1,000 other customers. [/quote] Yeah, that's a problem, because that would not be. How expensive hosting providers can deal with that? [quote name='hplus0603' timestamp='1337408324' post='4941363'] [quote] With this I can manage a NAT server [/quote] No, you cannot. A NAT introducer server (for NAT punch-through) requires careful control of the source and destination ports for both ends of the connection, as well as a persistent connection between each client and the server while introducing. HTTP gives you none of that. Especially if you want to use UDP, which HTTP can't do at all. (NAT introduction doesn't work nearly as well for TCP connections, either) [/quote] Well, when I said to manage NAT server I didn't mean it literally... (I really think about just right as you mentioned as "game lister") Best wishes, FXACE.
  12. Also, [url="http://www.w3.org/TR/2dcontext/"]HTML 5 canvas specification[/url] can help you. Best wishes, FXACE.
  13. [quote name='Antheus' timestamp='1337354403' post='4941192'] That's a web host. It's for serving HTML pages via PHP. Are you sure this is what you need? [/quote] With this I can manage a NAT server (which would have a list of active servers, created by users, where you can connect to)... Doing HTTP requests/response on application is not a hard work, I think. Besides, you can send/recieve binary data over HTTP (not just HTML pages), HTTP's header "Content-Type" tells what kind of data is incoming/outcoming, you can use a type which is specified in documentation or you can specify your custom type which would not be supported on web-browser (they usually notify this data as file to download, or just print them out to screen) but it doesn't change byte values. And this can be used to download game data from... But it's probably easy to crack. [quote name='Antheus' timestamp='1337354403' post='4941192'] Also - unlimited is never unlimited. [/quote] Yes, you are right. Maybe hosting service wants to tell you that HDD-space is their problem and how much space must be to handle your data. Also - I think that some servers of hosting services in real are not look as they are shown in advertising (pictures). [quote name='Antheus' timestamp='1337354403' post='4941192'] I'd be very careful of hosts that do not disclose exactly what the limits are upfront. Othewise they can easily bill you at the end of the month. Or, if they use shared bandwidth, then there are 1000 servers sharing a 10MBit link, meaning they'll often be inaccessible or very slow. [/quote] Yes, you need to read a contract carefully before accept, not to get into traps. And how much percent it would be true on how fast is it works (hosting provider's secret)... [quote name='Antheus' timestamp='1337354403' post='4941192'] It's also common for such "free" hosts to simply terminate your account if you exceed some unwritten quota. [/quote] Yes, they do that. But, they are warn before they do it, and ask you "do you need this host or not?". And if this host is not pinned "under construction", etc. That's if you are using a free account. But, as they say, in "pro-account" which would cost 5$/month, they would never do that (if it is not violating state rights). [quote name='Antheus' timestamp='1337354403' post='4941192'] It depends. Some just bill you for traffic, others disconnect your server, third don't care, your site just isn't accessible. [/quote] Hmmm, I just knew about billing a traffic. Can you give me more information about how they can disconnect a server if you can? But there is one way to shutdown a server is to write a letter of complaint to hosting provider on which this server is rent. And for hosting services is probably hard to check whether this reason described in letter is true or not, they will close server. Some people did success by this way. [quote name='hplus0603' timestamp='1337361644' post='4941226'] Honestly, if you focus on making a fun game that people want to play, you'll probably be able to solve those higher-order problems once you actually need to :-) [/quote] I just want to make a nice, funny, with WW2 theme, strategy game. Players would not play against each other. For example, you have a team (you and your friends) and play levels, pass all missions, where you can feel yourself like rambo, etc. Each mission is planned to be passed in co-operative. As this planned to be an internet game, I'm managing online voice speak (using microphone, delay between you say something and others would hear you is 0.4 seconds, because buffer is need to be filled before send), visualization instruments where you can explain your ideas, tactics and actions, because things like text-chat is useless, while you are trying to tell something to another player the moment has gone. And for little price from which developers and designers can live. Who would be interested to crack this game? There are two kinds of people: 1. who enjoy cracking applications. 2. who has a special order to crack applications (usually from black-side bussiness owners or company opponents)... Thank you guys for all replies. Best wishes, FXACE.
  14. Did you tried to draw this map with HTML5 canvas element?
  15. [quote name='hplus0603' timestamp='1337198102' post='4940744'] There exists a way to map from a static name to a dynamic IP; "dynamic DNS." The most well-known service is probably DynDNS.org. The way it works is that you set up your PC or firewall to update DynDNS.org whenever your IP changes. This maps a name called something like "yourgame.dyndns.org" to an IP address. You then set up a name redirect for your "real" domain -- "yourgame.com" -- to the "yourgame.dyndns.org" name. This is done with a CNAME record, and most good domain registrars should let you set one of these up. [/quote] That's would be a "subdomain", I think... [quote name='hplus0603' timestamp='1337198102' post='4940744'] If you want to run your game as a serious undertaking, the best thing to do is to pay for a hosted, or co-located, or virtual private server. This costs from $20/month and up, depending on bandwidth and CPU/RAM/storage needed. These machines run in well-managed data centers, and can generally have a static IP that you can map yourgame.com to. Providers include aws.amazon.com Elastic Compute Cloud, serverbeach.com, linode.net, interserver.net, 1and1.com, dreamhost.com, and many others. [/quote] I currently found [url="http://www.000webhost.com/558331.html"]http://www.000webhost.com/[/url] which costs 5$/month with unlimited bandwidth and storage. Thanks for detailed explation and ideas on how to do that, hplus0603, I really appreciate it! EDIT: I'm also wondering how to prevent DDoS attack from users (and how hosting services avoiding damages, if they can)?... Best wishes, FXACE.