havenrocket's Recent Forum Activity

  • I'm reviving this thread!

    Okay, here's the gist:

    I have a top down game that has six "zones." It works zelda style. Every zone is basically the same location with invisible sprites on the edges to swap out a custom background.

    First, we assume that each zone is 1024x1024px, our focus 400x300 or so.

    Next, we determine our colliders: BEACH2JUNGLE and JUNGLE2BEACH. These are invisible sprites that are 20px wide, and 1024px tall. If we set the image point to 0,0, and then set the collider's placement to 0,0 or 0,1014, it will give us a 20 pixel strip along the right and left edge of each zone. When you hit the zone with your character, the following happens...

    Player> On collision with BEACH2JUNGLE

       Beach.png destroy

       BEACH2JUNGLE destroy

       System Create Jungle.png at 512,512 (aligned as a background)

       System Create JUNGLE2BEACH at 0,1014 (aligned as an edge)

       Player set X to 100 (more specific than wrap...)

    And then...

    Player> On collision with JUNGLE2BEACH

       Jungle.png destroy

       JUNGLE2BEACH destroy

       System Create Beach.png at 512,512

       System Create BEACH2JUNGLE at 0,0

       Player set X to 900

    This allows you to walk back and forth between maps, scoots you ahead of the collision detector by 100px, destroys unused maps, and destroys the collision detector from the other map. Hopefully that all makes sense.

    Because even though swapping screens works well, I still have one crucial problem!

    What about my walls? Cliffs, rocks, trees, houses, even water? All the walls I've set up for one zone won't work for every zone. I'd have to destroy everything, and call up NEW walls with NEW coordinates...

    And that's where the problem lies. If I CREATE > Wall for one area, and put it in place, resize it to fit, and rotate it just so... and then try to create another Wall somewhere else, its restyling will affect the restyling of the first wall, too.

    Wouldn't it be easier to just make a .png of the zone, overlay it on top of your background, and then set it so you could move through the transparent areas? I've tried messing with the collision areas in the animations, but it says to not use more than 8 vertices.

    I tried clipping transparent edge, but that did nothing but trim the outer edges, which albeit exactly what it said it would do.

    Am I missing something? Is there a way to use transparencies?

    And if not... is there a way to give multiple instances of the wall object their own coordinates and size and rotations without overwriting all of them?

    Thanks in advance, guys.

  • KFC thanks, I get it now.

    Same example as above- a simple rotating slide effect...

    STEP ONE:

    Begin by making a global variable. (Mine is SLIDECOUNT, set to 0.)

    STEP TWO:

    Set up the time frame that you wish your slide to rotate. I want my frame to last for 3 seconds, then rotate clockwise for the duration of 1 second.

    System / Every 3 seconds

         ADD 1 to SLIDECOUNT

         System WAIT 1 Second

         SUBTRACT 1 from SLIDECOUNT

    This Action simply causes the SLIDECOUNT variable to change from 0 to 1 for 1 second every three seconds.

    STEP THREE:

    Now we just have to tell the system what to do during the one second that SLIDECOUNT is going to be equal to 1. We can do that using the System / Compare Variable option.

    System / SLIDECOUNT = 1

         SLIDECOUNT / Rotate Clockwise 1?.

    And that's it.

    When you run that, the system will wait for three seconds, start rotating your slide by 1?, and for the the duration of SLIDECOUNT=1, it will just keep rotating by a single degree.

    Lol... I was making it waaaaay harder than it needed to be.

    Nothing against the seasoned vets, but...

    You could use the Wait action.

    If CONDITION

    -> Toggle Boolean/variable

    -> Wait x seconds

    -> Toggle Boolean/variable back to original

    That way you will be able to use the variable to execute an action for a set amount of seconds.

    ... sometimes the psuedocode can be a bit vague. Structuring things closer to syntax really helps. I never would have imagined that it would have required multiple actions to achieve this particular task from KFC's psuedocode, which is grouped together like a paragraph, and leads one to believe that it could all be placed in one Action.

    I'm not complaining, just trying to explain why it seems like we're asking the same question five times! ^__^

  • Is there a cleaner way to do this? For i to 100 etc?

    For example:

    I have an image which I wish to rotate, However, the built-in rotate function only rotates along the exact center of the image, regardless of where my image point is set. (-200,0 for the sake of argument)

    So when I try to rotate manually, what I end up with is:

    System / Every Five Seconds

         IMAGE rotate 20 degrees clockwise

         system / wait 0.2 seconds

         IMAGE rotate 20 degrees clockwise

         system / wait 0.2 seconds

         IMAGE rotate 20 degrees clockwise

            etc.

    This makes the 60 degrees of rotation I was looking for, but it breaks it up into 3 movements. In order to get a fine animation, I would have to break it up further, rotating the image 10 degrees every 0.1 seconds. This would have six ticks, which is still not that great, especially since it would require six more lines of information.

    With BASIC, you could run a FOR i to 1 loop... But how on earth would you do it here? I know there's a for loop available here, but I can't make it work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is that when I create a tiledbackground with a ground graphic for the whole level (4000x768 for example) and I change its behavior to solid. The player sprite collides with the transparent, empty space of the tiledbackground. The engine should be able to recognize if the part of the tiledbackgrund is transparent or has actual graphics.

    Exactly. I was hoping I wasn't the only one scratching their heads at this.

    space Ape - Tiles are as effective as using dozens of the same sprite- the blank space of the png still causes a collision.

  • So, if somebody has already tackled this, maybe you could point me towards that tutorial/thread? I don't mind searching the forums on my own, but I've been at it for about two weeks without much luck...

  • Yep. That is definately not photoshopped.

  • Good question... I'm thinking using invisible collision masks (invisible sprites?) with the collision polygon set to your desired shape and then, as sqiddster indicated, put the pretty stuff on top.

    I too am up against this problem. So far, I've only been able to solve it using tons of sprites whose Opacity is set to zero.

    The ideal solution would be to make a png of a hill or wall or whatever, and use that- except when I bring the png in, the player collides with the whole image. I tried going into the animation editor and changing the collision area, but it only gives you 9 vertices to play with.

    I'll keep searching, but if anybody has discovered how to make the png collision map work, I would love to hear about it!

  • Howdy.

    My name is Cael Hath. I used to spend most of my time at caelhath.devianart.com, but... life happened.

    I have always been interested in games. When I was very young, my stepfather worked at PG&E in California, and he would bring his work home with him. I learned how to spell and write using the first few editions of Volkswriter, an unforgiving but very beautiful word processor that I found on his green-screened computer.

    He inevitably brought home an orange-screened computer, which is where I discovered a rather amazing game called Tetris. I also played a few games I doubt anyone would recognize- text-based Superman, text-based Star Trek, and of course Jump Joe, which I understand is called Janitor Joe in some versions.

    Because my family was strictly religious, my first Nintendo was destroyed, and I was never again allowed to keep the money I made from mowing my neighbor's lawns. However, my stepfather acquired a beastly, outdated green-screen machine in his yearly company auction, and with this, I taught myself as much as I could of BASIC, forgoing games in lieu of calculator apps which my mother used to determine the amount of taxes she was to deduct from her Avon customers. I also built clocks, timers, weather trackers and most importantly, a journal entry system that incorporated a password and my beloved Volkswriter.

    Years have passed, and time has not been all that I had hoped it would. My schooling backfired, and I discovered rather bitterly that everything I learned in college was already available online. My Associates degree was stifled by a vengeful communist that insisted I write a paper against my personal beliefs. I have nothing against armchair communists, after all, it all works out on paper, but this gentleman told me that he was going to take the paper I wrote and send it to the government as the basis for his personal campaign against something I care very dearly about. My advice to anyone seriously considering school is to chuck your morality, dreams and tact at the door, and attend your courses with every intent of destroying all that is sacred and beautiful in this world. Otherwise, you're wasting your time, and that of your instructor.

    My desire to create games is not as pure as my desire to write. Having said that, one could argue the purity of continuing to breathe air. I love games, and I love the fact that Construct2 has been created. I will never stop writing, nor will my desire to create cease to spill over into other mediums.

    With Construct2, I aim to create a number of games that I myself would wish to play. I could waste time by trying to analyze the market, adhering to every little whim that the gaming community desires, but in the end, if you cannot entertain yourself, who can you entertain? I would like to think I have played enough games to determine what is fun and what is not.

    My deep dark plot involves creating a host of games that will eventually fall into the hands of a creative, hardworking team, and that these games will fund my writing. Games today are analogous to writing in the forties and fifties. Back then, a writer could make a living off of his short stories. Look at Asimov, Heinlen, and all the other greats.

    These "old-school" and "portable" and "browser" games are no different. Granted, we can't all be Angry Birds, but I have played many a free game whose site has operated unattended for weeks at a time because the developer and creator of those games is somewhere in Germany buying a Fiero with the money he's made.

    I'm here because those who are happy are those who do what they love. I love to create, to entertain, to see the looks of surprise, fear, joy and emotion that my hands are capable of evoking. I once entertained a troop of missionaries who were prohibited from all forms of worldly media, simply with a notebook of stories. These were average high schoolers, no more godly than I, who resented their forced piety and would gather every Wednesday at five for an hour of stories they couldn't find anywhere else.

    Construct2 is more than just a game-maker to me. It's a chance to follow in the footsteps of the old writers of yesteryear, to make my way in a world that needs hope. Some of you will see me as commercially minded. I'm not offended by this. Creating media is my passion, and if you can't make money with your passion, you're wasting your life.

    I am very pleased to meet you all.

  • Try using an array that stores the data you need to check...an array will even let you alter the map and update the info as needed...look up up the various tutorials on the forums and the manual entry on arrays..they can be used in just about any way you can imagine

    Hope it helps...its basically what you are doing anyway....CS2 has a built in function for that...:-)

    Thanks Mystazsea.

    Arrays are a great tool, I just wish I understood them better. I've read the tutorial and several forum entries, but I still have no practical way of understanding them...

    For example, I could do something like:

    System / On Level2 Start /

         System Create S at 0,0 //create sand tile

         System Create G at 100,0 //create grass tile

         System Create W at 200,0 //create wall tile

         etc...

    But that's like a hundred lines of "System Creates" for five levels of 5x5 grids. 5 levels of 20x20 grids would be astronomical...

    I'm not looking for somebody to make my game, but any help on formulating the proper way to make such an array would earn somebody an Associate Producer credit...

  • 1. You'd have to test it and see, and then it would also depend on the device. Generally the size of the image doesn't affect speed. Image size does affect memory usage, and keep in mind that mobile devices have less memory than PCs.

    Yeah, this is true, you can't be sure of anything until you've tested it thoroughly. I'll have to believe that if angry birds can have a ton of unique maps, then so can I...

    2. You can do that approach. Load the text file with the ajax object and utilize the System text expressions to read parts of the text.

    Okay, so Ajax, eh? I had no idea... I will try to research this more.

    Thanks

  • This is a great thread. I am very curious about this as well.

    My preferred model is League of Legends- the game is free and everything that you pay for is something that you can get for free... as long as you're patient, or if you don't mind not having unlimited access to it. For instance, you can play as any of the characters, provided they're one of the several available that particular week. If you're patient enough, you can eventually earn enough points to unlock that character and have access to it all the time. Alternately, you can just pay five bucks for it and be done with it. Sadly, you can't unlock any of their alternate costumes- each one I suppose is a little less than five bucks as well.

    At any rate, it's one of the ways you can ride the line of being a developer with a community conscience and a person who is not living on the street. Computers and development time require at least a little nourishment in the way of financials. And we gotta eat, too.

  • I can't wait until I'm smart enough to understand servers. That's going to be an awesome day.

    Thanks for the info guys, I'll keep checking back.

havenrocket's avatar

havenrocket

Member since 22 May, 2012

None one is following havenrocket yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies