Yanen's Forum Posts

  • I built this for a game i'm working on yesterday. It's based on some of the code in this video here: youtu.be/cNVX0Qp7JL8

    The generator is a rough translation of that GMK to C2. It's nothing fancy, but maybe someone can learn from it/tear it apart for their own use. It's also a little unusual (and probably backwards) in that it doesn't use any arrays.

    Demo here

    CAPX here

    Feel free to drop comments, and if anyone can use it for something, don't hesitate

  • Thanks for the heads up on that. I think that some of that should be pretty useful (i'm playing around with the direction setting blocks now)

  • I think that's what it's called anyway. Basically, i have some randomly generated terrain (based on an old cave generator i was playing around with), but i want to make it "look good." I want to make it so that the outer blocks on the generated terrain are one frame, while the inner blocks are another one.

    Keep in mind that this terrain generator was originally used for making top-down caves. I'm trying to turn it into one for a sidescroller idea i had (essentially it's going to be a rotary version of Scorched Earth, where the generated terrain rotates under your character).

    I've seen this done in terrain generators before (like the Midpoint Displacement one, where it's used to sprinkle grass on top of the dirt), and it seems to work pretty good, but i can't get my head around what parts of the array i'm supposed to target to do it. Does anyone have any ideas about this? Is this like totally infeasible from the way this generator is designed?

    Here's my capx: dl.dropbox.com/u/64045180/yanen_artillery_generator.capx

  • I had this happen to me in R95 too. I fixed it by adjusting their positions so that they were whole numbers (like i had a button that was 280.002, 180.2550 or something, and i just trimmed off the decimals)

  • Good lord that's an elegant implementation, lol

    Makes me ashamed, because it shows how bad mine really was <img src="smileys/smiley36.gif" border="0" align="middle" />

    Thank you very much for that Yann. It's going to take me a while to go through it, but i'm sure I can glean some knowledge from your events that will help me

  • wow, that's a lot of arrays, i doubt why it's lagging, i was thinking we should to use other workaround...

    Does it lag for you? On my comp it's been fine so far, but i don't doubt that all those arrays are taxing.

    and Yann- thanks for that. I'll look into it. I'm not an expert with the cube, so there's probably some issues with it still lol

  • Hi again,

    I've been hard at work on my Rubik's Cube program (capx here: dl.dropbox.com/u/64045180/Rubiks/rubiks.capx), and now that i've got the cube all constructed and rotating/flipping, i've run into another snag.

    Basically, i'm trying to add color to the squares. Each cube square is a text box object. Right now, they're numbered for debugging purposes. I'd rather not just have the text say "Green" or "Red" or whatever, so i was thinking of using a sprite object.

    The question i have is this: is there a way to search all the text boxes on the current layout for a value? I was thinking that i could perform that search, then somehow pin the colored sprite objects to text boxes containing certain numbers. For example, the number "1" would have a red sprite attached to it- and that sprite would position itself on top of whatever textbox had the "1" in it.

    Anyone know of any way to do this? Also, am I thinking about this completely wrong? Is there an easier way to do it? I thought of using arrays, but i'm not sure how that would work exactly

  • k, so i think i made a mini-breakthrough here.

    What was giving me the most trouble before was figuring out how to make the buttons rotate the cube without "losing" one of the sides. I just realized that you can store the side that would otherwise be lost in another array. Still not sure if i'm doing it the most efficient way, but that's ok.

    the file: dl.dropbox.com/u/64045180/Rubiks/rubiks.capx

  • So right now i'm trying to build a 2D Rubik's Cube for the game i'm working on. I'm hitting a wall as far as rotating the cube. I've been looking through code examples from Java and C+ to try to figure out what mathematical principle it works on, but none of the stuff i've found has really helped.

    Here's a link to my project: dl.dropbox.com/u/64045180/Rubiks/rubiks.capx

    Right now i'm basically using 6 arrays to store all the information about the cube faces. I numbered each cube face 1-54 in the hopes that i could figure out some kind of mathematical way to make it work. Haven't found one yet, lol

    Does anybody have any pointers for me as far where to start? Any books/tutorials that you know of that would be useful to me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ohhhhh, hadn't thought of that at all. Thank you guys so much. lol, spent the good part of last night beating my head against the wall trying to figure it out. :D

  • I've been playing around trying to get this cave generator to work in Construct 2: scirra.com/forum/procedural-generation-for-beginnerspdf_topic43387.html

    So far, I've been able to get the first example (from tutorial 1) working, but the second one is really giving me a hard time. I've tried to follow the tutorial as closely as possible, but I think I may have made some mistakes. Particularly, i'm not sure what the equivalent of the value "miner(2)-1", and similar, is in C2. I've been using "miner.At(2)-1".

    Here's a link to my capx file: dl.dropbox.com/u/64045180/random_gen.capx

    I'm pretty new to Arrays, but i've worked through several of the tutorials and i thought i was on the right track. Does anyone see anything obviously wrong about the method i've used?