PixelRebirth's Recent Forum Activity

  • Okay, probably you may want to wait for some brainiac to explain it to you properly. And as I'm writing this I'm noticing mighty Ashley replying... I'll still reply anyway.

    I'd say you need loops where you want certain events/actions being executed many times a tick, instead of only once.

    I have uploaded a little example for you with a WHILE loop. We have a Global there called Outcome and we want it to have the value 0,1,2 or 3, which is Random(4) of course. But we also want to be able to dynamically exclude certain possibities. We define these with the Nono_a and Nono_b globals. The values set there are values Outcome must never have. So we cannot simply run Random(4), but we run it until the result will be different from Global Nono_a+b. And all this will happen in the same tick, thanks to the while loop.

    So if you run the example hit X and you will see the value will always be different from the ones defined in the Nono globals.

    I hope that was some help at all... maybe this example was horribly lame.

  • Why wouldn't it work? Do you have the same animation names and number of frames in both sprites?

    Look at this cap, press 1, 2 or 3 to change animations... as you can see it works just fine.

  • I don't think the grid behavior works too well for a Pac-Man game, since the sprite would only be able to move from grid space to grid space. That would be especially annoying if you were using it for the player sprite itself.

    I'm pretty sure there are many other ways to do the same thing, it's just the one that came to my mind. If somebody had a very simple solution I'd like to see that too.

    Anyway, I found one bug in my latest example. Has to do with the starting position of ghosts which can create infinite loops right on startup (my first example didn't have that bug). I've fixed this and added the ability for ghosts to handle a dead end (to turn around, this would have caused a infinite loop in both older examples).

    Also I've turned it into something a little different. Right now you can only draw your level, place ghosts and then run it to see what happens. I know it's far from a complete Pac-Man game yet. But I believe this could be really cool with features like being able to load different tile/sprite sets and save/load created levels of course. I'm currently thinking about turning this into a little side project of mine.

    No source for this sry, but maybe it's still interesting: DOWNLOAD

    [quote:22wev2cc]I m going to decrypt this code line by line until i understand the way you came to this.

    That's a very good attitude right there. Once you get the hang of it you'll come up with your own (better?) solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No I don't think it's a bug.

    Just put the Sprite in the event sheet where you have the family green now and it should work.

    The hashtable is in a container with the sprite, so it won't work the way you want it to when you're using the family this way.

  • Okay I put some comments in there and I was able to optimize it a little at least. Uses 4 events less now. Here it is.

    If you're fairly new to Construct you still may have problems to immediately understand what's going on in there. Just give it a little time, toy around with it maybe...

    Any more questions feel free to ask.

  • There's nothing wrong with that expression. It will just give you one of four different directions.

    But the way you're using it won't work for what you intend to do. Since the direction you get can very well be the very same direction you just had and therefore the ghost will move into the walls. (I don't think you need the "floor" in there btw)

    I'm basically using a loop in my example that checks all four sides of the ghost and will only allow directions which aren't blocked by any walls.

    Okay I will comment my cap. Just give me a little time.

  • Can't say I don't like it. But it looks a little blurry compared to the "pixelartish" style.

  • I have cooked up a quick example of basic ghost movement. May be not the most clever way to do it, but it works.

    I didn't really care to comment it, after all it's just 28 events. But if you need further explainations don't hestitate to ask.

  • You wouldn't happen to have a nvidia graphics card by any chance? Well anyway, I figured it out. It should work for everyone now.

    Try this.

  • This looks like a very cool concept Quazi!

  • I vote for pixel graphics! But I guess it's no surprise.

  • Okay I've restarted this from scratch since my cap was very messy again. I really need to get used to organize my events properly. Now I should be fine with this one at least.

    It's not a whole different deal now, but there are some significant additions and changes.

    When you destory skulls, new ones will emerge from below. So the playfield is always full. There's no timelimit anymore.

    However when the "hellmeter" (yellow/orange bar on the left)gets full, one random skull will turn to stone and therefore can't be swapped or destroyed anymore. When all 100 skulls turned to stone the game is over. You can lower the hellmeter by destroying skulls. Combos will get you much higher scores. You can also restore a skull by destroying something in the same line above it.

    Unfortunately the hellmeter will rise faster and faster the longer you play. So there's no escape after all.

    There are two problems I'm having atm:

    When I was testing the game a messenger window popped up and suddenly some skulls were moving out of the window into infinity.

    May have something to do with the game skipping some frames, therefore not detecting when the skulls reached their destination and keeps moving them upwards. At least that's what my simple mind came up with.

    The other problem has something to do with the box object. Somebody who tested the game didn't see the score and hellmeter boxes correctly, they were all bright blue and you couldn't read anything.

    <img src="http://img129.imageshack.us/img129/3064/scorewrongdn7.png">

    The bright blue box should look like the suicide button down there. Would be interesting to know if anybody has the same error.

    [quote:r1iufado]I love puzzle games. This one is very decent, but needs polishing and some dark music to go along with it. I hope to see a finished product.

    Yes this needs some fitting music. But all things audio will probably be the last thing to be added to the game. But don't get your hopes high, I'm not a composer.

    Here's the

    new version.

PixelRebirth's avatar

PixelRebirth

Member since 26 Mar, 2008

Twitter
PixelRebirth has 1 followers

Trophy Case

  • 16-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

23/44
How to earn trophies