Yanen's Recent Forum Activity

  • 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?

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

Yanen's avatar

Yanen

Member since 25 Feb, 2012

None one is following Yanen yet!

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies