Civilwar

Member
  • Content count

    31
  • Joined

  • Last visited

Community Reputation

137 Neutral

About Civilwar

  • Rank
    Member
  1. Hello everybody,   I would like to know your opinion of the concept of my game. Basically, it is a multiplayer team game. Every player builds its own spaceship and then they fight until all ships of one team are destroyed. Now, spaceships are composed of blocks. Basic block is a cube of unit size, but you can rotate it, scale it and deform it to any hexahedron (e.g. paralleliped), so you are not so limited like in Minecraft. Every block has its function in ship -- there are energy sources, engines and maneuvering devices, shields, weapons etc. By adding blocks together you can create any kind of spaceship you like. Also, when the block is hit by enemy ship, it will stop functioning, so you must place blocks strategically, cover energy sources with shields etc. The dynamics of the ship is quite simple. I calculate the center of gravity of the ship and then find the force and torque of each engine. It's simple composition of forces.   The cool part of this concept is that everybody can build entirely different ship, small or big, fast or slow, whatever they like. It is also self-balancing -- if the ship has lots of shield blocks, it is more difficult to destroy, but it is also heavier, so in order to fly it needs more engines and more energy sources, so it will be bigger. And the bigger it is, the easier it is to hit. On the other hand, I am afraid that it will be difficult to construct spaceship that can be easily controlled. I would like people to focus on fight and destroying enemy ships, not struggling with gravity.   What do you think? Any feedback will be highly appreciated.    
  2. Hi, I used simple shader for mixing textures, but now I lost all lights. Shader overrides lighting. I just need to use lights like without shader, is there any way? Or do I have to program custom light in shader? Thanks
  3. 2 GLSL questions

    I think it works now, it was necessary to call both glActiveTexture and glClientActiveTexture.
  4. 2 GLSL questions

    [quote name='V-man' timestamp='1320949183' post='4882678'] [url="http://www.opengl.org/wiki/Vertex_Arrays"]http://www.opengl.or...i/Vertex_Arrays[/url] [code] glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, sizeof(MyVertex), &vertex[0].x); glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, sizeof(MyVertex), &vertex[0].nx); glClientActiveTexture(GL_TEXTURE0); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, sizeof(MyVertex), &vertex[0].s0); glClientActiveTexture(GL_TEXTURE1); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, sizeof(MyVertex), &vertex[0].s1); glClientActiveTexture(GL_TEXTURE2); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, sizeof(MyVertex), &vertex[0].s2); [/code] [/quote] You didn't even read the question, did you?
  5. 2 GLSL questions

    [quote name='Shintah' timestamp='1320939419' post='4882622'] ... but you need to bind the second set of texture coordinates to an attribute in the shader. [/quote] How??
  6. 2 GLSL questions

    [quote name='Shintah' timestamp='1320936936' post='4882599'] To get another set of texture coordinates you just have to create a new VBO with the new set of coordinates and bind it while drawing just like you did with the first set. Or pack another set into your vertex structure in the VBO you already have. Depending on which way you do things. [/quote] No no, I already have two sets in VBO. I just need to use both sets in shader. I have one large mesh and there are two textures in each point. To know how much of each texture use, I have one big "mask" texture and I set one texture to alpha value of mask and other one to (1-alpha) value, like this [code]gl_FragColor = mix(texture2D(texmat0,gl_TexCoord[0].xy), texture2D(texmat1,gl_TexCoord[0].xy), 1-texture2D(mskalpha,gl_TexCoord[0].xy).a);[/code] But, mask texture should have different texture coordinates then material textures, but now it shares one set.
  7. Hi again. [list=1][*]I know how to combine two textures using [i]mix[/i] function, but what to do, if I need to combine three or more textures?[*]I am using VBOs to display mesh. On vertex arrays, textures should be activated with [i]glClientActiveTexture, [/i]but it seems that this doesn't "transfer" texture to shader, it don't work. It only works if I use [i]glActiveTexture[/i], but then I can't have more then one set of texture coordinates. I need to have two sets, one for "visible" textures and one for the "mask" texture. Is it possible to pass two texture coordinates to shader? If so, how?[/list]Thanks for answers.
  8. GLSL - merging two textures

    It works! Endless thanks.
  9. GLSL - merging two textures

    [quote name='FXACE' timestamp='1320355110' post='4880284'] [code] gl_FragColor = mix(FirstTextureColor, SecondTextureColor, coeff); [/code] Where: FirstTextureColor is a color returned by texture2D(<first texture>,...); SecondTextureColor is a color returned by texture2D(<second texture>,...); coeff -> X% of second texture and (100 - X)% of first texture. Best wishes, FXACE. [/quote] Ok, but I don't know how to use it For example, how can I get coeff, eg. % of alpha in given point? Could you please write me whole shader? Thanks a lot.
  10. Hi, this will be a little longer question. What I have: Two grass textures [img]http://img819.imageshack.us/img819/1382/gra1.jpg[/img] [img]http://img207.imageshack.us/img207/4597/gra2t.jpg[/img] And one big alpha-white texture like this: [img]http://img694.imageshack.us/img694/874/alpha2j.jpg[/img] I need to map both textures on my mesh and it depends on alpha texture how much it will show first or second texture. I mean, if there is 70% alpha in one point, it will show 70% first grass texture and 30% second one. So the result should look like [img]http://img443.imageshack.us/img443/5193/mergedpu.jpg[/img] I think it shouldn't be so dificult, but I have no expirience with shaders, so I don't even know where to start. I'll be glad for every help.
  11. I fixed it, somehow. Actually I don't know what was wrong Thanks for help.
  12. [quote name='SiCrane' timestamp='1319895876' post='4878242'] Usually you send an id either before the structs or as the first part of each struct. Read the id and use that to determine how much to read. [/quote] Could you give me a code snippet? I tried it, but I received wrong data, so I thought it can't be used that way. Btw, I am using asynchronous sockets.
  13. Hi, I am using WinSock library for sending data over network, and I have a problem. I know how to send data in one struct and receive it on the other side, because there is constant size of structure. But what if I have more structures, each one with different size? Now I have one struct that contains locations of players and other with in-game messages. When I am about to receive struct, I don't know which one is being sent. Is there a "trick" how to do that? Thanks for help.
  14. Name for MMORPG

    [quote name='SimonForsman' timestamp='1317057536' post='4866143'] Start by making the game, it doesn't make any sense at all to pick the name before you even know what the game is about. [/quote] "I don't have a story" doesn't mean "I don't have a game". Also, I've written [i]exactly[/i] what the game is about.
  15. Name for MMORPG

    [quote name='Bigdeadbug' timestamp='1317049801' post='4866087'] Well a lot of games tend to get their title from their lore. Whats the name of the world its set on or some other crucial thing in its story? You can of course name it after some central part to the game-play (Rift is an example of a game that has done this) but i can't think of one from the info in your post. Also MMOGs then to put online or even world in their name so that people know from just reading the name if its an MMOG or not. [/quote] I don't have any story yet Edit: I asked Cleverbot to help me with the name. After complaining he said: Cuttlefish, Tinntinabulation, Console advert, Chartreuse, Skittles. This guy is kinda smart