Phobos002's Forum Posts

  • <img src="https://dl.dropboxusercontent.com/u/21499454/screenshots/RFE/logo3_halved.png" border="0">

    ROCKETS <img src="smileys/smiley35.gif" border="0" align="middle"> EVERYWHERE (No point in censoring after the- oh, fine then.) is a game originally created for a GameJolt competition. Since then, I've rebuilt it from scratch and have added many new features and optimizations. This isn't finished, but it's getting there. I have ambitions on selling this online and start making money from the games I love to make (Steam maybe?). The music was created by Graham 'Pitfall' Baker and I plan to share 30-40% of the money we receive with him. :)

    [TUBE]opE3FO4PBFM[/TUBE]

    You can get what I have finished of the game on GameJolt or IndieDB. You can also view the games Steam Concept Page!

    What I would REALLY REALLY REAAAALLLLYYY appreciate would be if you were to give feedback, or suggestions on what I could fix or change. You could also share with your friends and ask them to share their opinion (I seriously want to make sure this is as awesome as it can be.)

    Thanks, and have fun! ;)

  • Here is a video I made for the Steam Concept page of my game "ROCKETS F*CKING EVERYWHERE":

    [TUBE]opE3FO4PBFM[/TUBE]

    Here is the Steam Concept Page!

    If I didn't make a thread for this already, I'll make one soon. :P

  • Hello! For my Ludum Dare Entry I made a game where you had to complete levels in a platformer in under ten seconds/without dying or else you had a chance of being shot in the face and losing progress.

    To do the TV effect I made all the layers except the Game layer have no parallax rate. This is annoying from a design perspective, because to change levels I have to change layouts, which can mess up the gun at the top of the screen. Also, if I wanted to change an effect on a certain layout, I would have to go through each layout and add the effect. Grumble grumble.

    I know there was a "Layout" plugin in CC that worked for the most part, and I was wondering if such a plugin would be possible in C2? It would make things a lot easier and open a lot of opportunities for mechanics for other developers. If it isn't then I guess I'm going to have to bite the bullet and find a more reliable method of level creation, or find a way to mimic that behavior.

    Thanks again! <img src="smileys/smiley2.gif" border="0" align="middle">

  • Nothing's generated, all the files are hand-written. You can copy-paste an existing effect and just tweak the files to make new ones, e.g. changing the name and id and changing the shader code.

    The shader language is WebGL's shading language. This is slightly different variant of GLSL that you traditionally get on desktop - it's based on GLSL ES, which is the mobile variant, plus the fact it's run in a browser and is often re-compiled behind the scenes for security reasons. This means desktop GLSL basically never copy-pastes and works - you'll need to carefully port it based on the limitations of WebGL shaders.

    Ah, thank you. I was originally trying to see if I could get shurcooL's Motion Blur Demo (WebGL based, but I had thought GLSL was used in WebGL. Silly me ^^') to work in Construct. I wasn't gonna use it without permission, but I wanted to see how well it would work in-game. He wrote two separate scripts (One for fragment shading, one for vertex shading.), so I have no idea how I would get those two to work together, even though I don't know how to use the language anyways...

    I'll certainty look into the language a bit more and see what kind of neat things I can create on my own, though. Thanks again!

  • Hello! I was curious if there is some kind of guide to creating effects for Construct? I've been really curious in learning GLSL to do this, but I looked in the effects folder and it looks like there are XML files that look like they were generated in a way ("Don't change the id, change the name instead"), although I could be mistaken. If I am mistaken, then this is really confusing.

    I've also tried copying a certain effect that wasn't built for C2 and changing the XML manually to fit it, but when I applied it in C2 I get all sorts of errors...

    Any tips or guides to lead me in the right direction is severely appreciated. Thank you :)

  • The CWeapons variable is what dictates what weapon in the array you have, so yes.

    If you're talking about picking up weapons on the floor, it loops through the array until it finds an empty slot to use and puts the info in there.

    I haven't implemented dropping weapons yet, but I would do it by creating the weapon pickup object with variables storing what array values it had, and clear the values in the array it used with '0'.

    Hope this helps

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hi there !very coolman

    did you make this work with an array ? can you explain to me how ?

    im triyng to make a weapon database like you that i can just select the weapons from, but i cant see how

    I have the array setup as a 10x4, but I'll only go over the first 2 y values as they're the more importaint for weapon selection:

    Cx1 = Weapon Name (Helps control actions when firing, like what bullets to use and how many, how much ammo to reduce, etc.)

    Cx2 = Weapon Ammo (How much ammo is left in inventory. You can use global variables if you want to have a common type of ammo to be used by different guns, however.)

    The 'C' stands for your current weapon, which you can increase or decrease by using the mouse-wheel. Doing this picks a different weapon in the array, first making sure the weapon you picked isn't "0" and ammo is greater than 0 (Otherwise skip to the next weapon and check that) and presto!

    If you need more help let me know, I'll do my best to explain it further. ;)

  • A Motion Blur effect would be tons of fun to use!

    I found a WebGL/Javascript demo made by 'shurcooL' and copied the shader info from the HTML source:

    <font size="1">#ifdef GL_ES
         precision highp float;
         #endif
    
         uniform vec3 tri0v0;
         uniform vec3 tri0v1;
         uniform vec3 tri0v2;
         uniform vec3 tri1v0;
         uniform vec3 tri1v1;
         uniform vec3 tri1v2;
    
         varying vec4 verpos;
    
         struct Line3
         {
              vec3 Origin;
              vec3 Direction;
         };
    
         struct Triangle3
         {
              vec3 V[3];
         };
    
         bool IntrLine3Triangle3_Find(Line3 line, Triangle3 triangle, out float TriBary[3])
         {
              // Compute the offset origin, edges, and normal.
              vec3 diff = line.Origin - triangle.V[0];
              vec3 edge1 = triangle.V[1] - triangle.V[0];
              vec3 edge2 = triangle.V[2] - triangle.V[0];
              vec3 normal = cross(edge1, edge2);
    
              // Solve Q + t*D = b1*E1 + b2*E2 (Q = diff, D = line direction,
              // E1 = edge1, E2 = edge2, N = Cross(E1,E2)) by
              //   |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))
              //   |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))
              //   |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)
              float DdN = dot(line.Direction, normal);
              float sign;
              if (DdN > 0.0)     ///Math<float>::ZERO_TOLERANCE
              {
                   sign = 1.0;
              }
              else if (DdN < -0.0)     ///Math<float>::ZERO_TOLERANCE
              {
                   sign = -1.0;
                   DdN = -DdN;
              }
              else
              {
                   // Line and triangle are parallel, call it a "no intersection"
                   // even if the line does intersect.
                   ///mIntersectionType = IT_EMPTY;
                   return false;
              }
    
              float DdQxE2 = sign * dot(line.Direction, cross(diff, edge2));
              if (DdQxE2 >= 0.0)
              {
                   float DdE1xQ = sign * dot(line.Direction, cross(edge1, diff));
                   if (DdE1xQ >= 0.0)
                   {
                        if (DdQxE2 + DdE1xQ <= DdN + 0.03)     // Low precision fix hack
                        {
                             // Line intersects triangle.
                             ///float QdN = -sign * dot(diff, normal);
                             float inv = 1.0 / DdN;
                             ///lineParameter = QdN * inv;
                             TriBary[1] = DdQxE2*inv;
                             TriBary[2] = DdE1xQ*inv;
                             TriBary[0] = 1.0 - TriBary[1] - TriBary[2];
                             ///mIntersectionType = IT_POINT;
                             return true;
                        }
                        // else: b1+b2 > 1, no intersection
                   }
                   // else: b2 < 0, no intersection
              }
              // else: b1 < 0, no intersection
    
              return false;
         }
    
         bool IntrLine3Triangle3_Find(Line3 line, Triangle3 triangle, float tmax, vec3 velocity0, vec3 velocity1, out float ContactTime)
         {
              float TriBary[3];
    
              if (IntrLine3Triangle3_Find(line, triangle, TriBary))
              {
                   ContactTime = 0.0;
                   return true;
              }
              else
              {
                   // Velocity relative to line
                   vec3 relVelocity = (velocity1 - velocity0) * tmax;
    
                   Triangle3 triangle1;
                   triangle1.V[0] = triangle.V[0] + relVelocity;
                   triangle1.V[1] = triangle.V[1] + relVelocity;
                   triangle1.V[2] = triangle.V[2] + relVelocity;
    
                   float ClosestContactTime = 2.0;
                   {
                        float TriBary[3];
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[0];
                             tri.V[1] = triangle1.V[0];
                             tri.V[2] = triangle1.V[1];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[1] + TriBary[2]);
                             }
                        }
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[0];
                             tri.V[1] = triangle.V[1];
                             tri.V[2] = triangle1.V[1];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[2]);
                             }
                        }
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[1];
                             tri.V[1] = triangle1.V[1];
                             tri.V[2] = triangle1.V[2];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[1] + TriBary[2]);
                             }
                        }
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[1];
                             tri.V[1] = triangle.V[2];
                             tri.V[2] = triangle1.V[2];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[2]);
                             }
                        }
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[2];
                             tri.V[1] = triangle1.V[2];
                             tri.V[2] = triangle1.V[0];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[1] + TriBary[2]);
                             }
                        }
    
                        {
                             Triangle3 tri;
                             tri.V[0] = triangle.V[2];
                             tri.V[1] = triangle.V[0];
                             tri.V[2] = triangle1.V[0];
    
                             if (IntrLine3Triangle3_Find(line, tri, TriBary)) {
                                  ClosestContactTime = min(ClosestContactTime, TriBary[2]);
                             }
                        }
                   }
    
                   if (2.0 != ClosestContactTime)
                   {
                        ContactTime = tmax * ClosestContactTime;
                        return true;
                   }
                   else
                   {
                        return false;
                   }
              }
         }
    
         void main()
         {
              // Shade all the fragments behind the z-buffer
              /*gl_FragColor = vec4(sin(verpos.x*50.0), sin(verpos.y*50.0), 1.0 + 0.0*sin(verpos.z*5.0), 1);
              return;*/
    
              /*Line3 line; line.Origin = vec3(verpos.x, verpos.y, -1); line.Direction = vec3(0, 0, 1);
              Triangle3 triangle; triangle.V[0] = tri0v0; triangle.V[1] = tri0v1; triangle.V[2] = tri0v2;
              float triBary[3];
              if (IntrLine3Triangle3_Find(line, triangle, triBary))
              {
                   gl_FragColor = vec4(triBary[0], triBary[1], triBary[2], 1);
              }
              else discard;
              return;*/
    
              Line3 line; line.Origin = vec3(verpos.x, verpos.y, -1); line.Direction = vec3(0, 0, 1);
              Triangle3 triangle0; triangle0.V[0] = tri0v0; triangle0.V[1] = tri0v1; triangle0.V[2] = tri0v2;
              Triangle3 triangle1; triangle1.V[0] = tri1v0; triangle1.V[1] = tri1v1; triangle1.V[2] = tri1v2;
              float ContactTime;
    
              /*gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
              if (IntrLine3Triangle3_Find(line, triangle0, 1.0, vec3(0.0), vec3(triangle1.V[0] - triangle0.V[0]), ContactTime))
              {
                   //gl_FragColor = vec4(1.0 - ContactTime, 1.0 - ContactTime, 1.0 - ContactTime, 1.0);
                   gl_FragColor.g = 1.0;
              }
              else gl_FragColor.r = 1.0;
              return;*/
    
              bool col = IntrLine3Triangle3_Find(line, triangle0, 1.0, vec3(0.0), vec3(triangle1.V[0] - triangle0.V[0]), ContactTime);
    
              if (col)
              {
                   float t0 = ContactTime;
    
                   if (IntrLine3Triangle3_Find(line, triangle1, 1.0, vec3(0.0), vec3(triangle0.V[0] - triangle1.V[0]), ContactTime))
                   {
                        float t1 = ContactTime;
    
                        //gl_FragColor = vec4(1.0 - t0 - t1, 1.0 - t0 - t1, 1.0 - t0 - t1, 1.0);
                        gl_FragColor = vec4(0.8, 0.3, 0.01, 1.0 - t0 - t1);
                   }
                   else
                        //gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
                        discard;
              }
              else
                   //gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
                   discard;
         }
    
         /*void main(void) {
              gl_FragColor = vec4(0.8, 0.3, 0.01, 1.0);
         }*/</font>

    Not sure if that is the motion blur effect, but it was the longest one, so I assumed it was. I tried to use this on its own, but I get an error message: "Assertion failure: Error linking shader program: Fragment varying _verpos does not match any vertex varying" I'm not a GLSL expert or novice even, so I have no idea what it's talking about.

    Thoughts? (Oh, and if we do get this working, we should ask him if we can use it, right?)

  • Oh christ, I just realized my horrendous mistake. This works, but I had a an issue with setting variables in the pData array at the start of the layout, so I didn't have any weapons to cycle through. Oops!

  • Hello! My problem is that I am trying to allow the player to select different weapons via the mouse-wheel. While loops are dangerous bastards, because if you do it wrong, your game will lock-up in an endless loop. That is what happens when I try doing this:

    <img src="https://dl.dropboxusercontent.com/u/21499454/screenshots/support/howto_selectweapons.png" border="0" />

    cWeapon = Current Weapon

    I had this working at some point, but it has stopped now. Is there a better way to do this? Or if not, how can I get this to work?

    Thanks in advance! ;)

    Here is the capx: -SNIP-

    EDIT: I forgot to mention that the loop has condition checking, so it skips over weapons you don't have yet. It works after I get a shotgun, but then I cant get the pistol back. Again, a better way to do this would be appreciated!

  • Awesome! I assume you're exporting via node-webkit? Do you need to implement some sort of DRM through IndieVania?

    What? I'm not using Construct 2 to make it. I'm using Construct Classic. :)

    And no, you do not need any DRM!

  • I'll check out the tutorial, but I did add a link. It's just that whenever I try to hyperlink anything, it always takes me back to the forum post. It's really annoying, although I'm not sure if you fixed it yet or not.

    Here is a hyperlink to Vanity on IndieVania

    EDIT: AHA! THE CURSE IS LIFTED!! I AM FREEEEE

  • Vanity on IndieVania

    This game is the project I have been working on for a few months, and I finally got it to a state where I can sell it in IndieVania! Although I still wish to expand on it, hence the beta status.

    I published it on April 1st, but I haven't gotten a single sale. I wanted to ask someone like NerdCubed to try it out, to promote the game and get feedback from him as well on what to add or fix. But I'm not sure if he would listen to me or how to get a proper contact with him (Besides the business email that I haven't gotten a reply to) Not sure how I'm going to handle that in a manner that doesn't make me look like a massive tool. ;)

    What should I do now?

  • A very important bump, because the game is now purchasable on IndieVania!

    indievania.com/games/vanity

    I don't know how I can promote the games existence very well. I was gonna ask NerdCubed to try it out, but I am unable to get a hold of him by any easier means.

    I also want to use IndieVania to get funds for Steam Greenlight, and get reviews on what I should improve on in the game in order to make it worthy for steam.

    Thoughts?

  • Oh uh, I have the latest version on IndieDB: indiedb.com/games/vanity

    It's probably fixed, but also some of the buttons aren't finished yet. They are in R14, but I wanna talk to Desura about publishing and stuff first.