Universal builds and parallax

I've been trying to make my sideways scrolling game which I originally made for iPad be good for iPhone. I've been trying to make it work by following @BBEnk's tutorial https://www.youtube.com/watch?v=QzDAA1NrdxY
The thing is that it doesn't take parallax into consideration. I've also got things like the final score sliding in from the right at the end of the game and when I try out his method it doesn't move off to the right place when switching to iPhone > stretch. Does anyone have an idea as to what I should do here – or maybe a video?

Comments

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    anyone??

  • BBEnkBBEnk Member Posts: 1,764

    @monkeyboy simian

    Easiest way is to just stretch the background images to fit, and or even scale them up a bit so they fit and don't look stretched, You can also leapfrog images to get same effect. I made a old template I was working on awhile back for a video I never made, anyway link below will show you two ways to handle this using my universal build. stretch, and leapfrog either should work for you.

    https://dl.dropboxusercontent.com/u/58782733/scrollTest.gameproj.zip

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited October 2015

    Thanks @BBEnk
    I'll have to spend some quality time with your template to understand this. I made my scrolling background at 1024. I'm not sure why you made yours 640 though. Should't it be 512? Or is that to account for the aspect ratio of the iPhone? By the way, I like your video tutorials – and thanks for doing them.

    I just checked your scene size and it's 3000. Mine's only 1124. I can't remember why I set it at this size as I've been working on this since April – it actually started out as a Buzzy Bee tutorial by Jamie Cross, so I'm guessing that I did whatever he said.

  • BBEnkBBEnk Member Posts: 1,764
    edited October 2015

    @monkeyboy simian

    The reason the actors are 640 is because when a actor goes -500 or +500 off the scene they are automatically destroyed, So if I move a image/actor thats 1024 completely off screen that would be -512 and it would be destroyed so I made them 640 so that never happens.

    I made the scene 3000 so I could see more but same would apply for destroying actors on opposite side, also setting your scene size bigger gives you a place to move unused actor's during gameplay.

  • BBEnkBBEnk Member Posts: 1,764
    edited October 2015

    I made a mistake on the template above nothing major but heres a fixed version.

    https://dl.dropboxusercontent.com/u/58782733/scrollTest.gameproj 2.zip

    Video:

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @BBEnk
    Thanks heaps for that – and the explanation.. I'll get stuck into it. I'll post back when I get it done..

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @BBEnk
    Just thought I'd let you know that I've made it work using your video tutorials. Your most recent one helped a lot with the parallax issue. I've got one nagging thing that I can't make work though.

    I've got custom fonts happening. My score appears in the top right corner of my landscape formatted game. I've applied the things that you've instructed to do – and the score works and repositions as it should. The hitch is that as soon as the score goes past single digits it fails to display the new digit i.e; when it goes to 9, it's fine but when it goes to 10 all it shows is 0.

    I've uploaded the demo from Armeline that I've based them on. Is it still going to be possible to apply your idea to the score in this position? I think it kinda works better visually in the top right corner – but if it's not going to be possible with your method should I just give up and put it in the middle?

  • BBEnkBBEnk Member Posts: 1,764

    He has a spawner in the actor that also needs the offset added, I made a few changes I added the a change attribute to set start position as always and I added the offset to his spawner and changed project to iPad and used my universal build to make it simpler, I put "ADDED" so you can find easy just two spot in right number.

    https://dl.dropboxusercontent.com/u/58782733/Real New Numbers iPad.zip

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    It worked! Thanks @BBEnk
    I tried something like that – I think I only had it on the spawning bit. I don't remember what I exactly tried, but I know I was messing around in the same place.

    I don't know how you know this stuff – it all seems so tricky to me. Do you have a programming background? You mentioned in one of your tutorials that you weren't good at math (I think). I'm pretty bad at math and this stuff seems so intense.

    I've been doing this since April – I hope that one day I can understand all of this stuff like you and those other Yodas in GS land. How long have you been using GS?

  • BBEnkBBEnk Member Posts: 1,764

    @monkeyboy simian said:

    It worked! Thanks BBEnk
    I tried something like that – I think I only had it on the spawning bit. I don't remember what I exactly tried, but I know I was messing around in the same place.

    I don't know how you know this stuff – it all seems so tricky to me. Do you have a programming background? You mentioned in one of your tutorials that you weren't good at math (I think). I'm pretty bad at math and this stuff seems so intense.

    I've been doing this since April – I hope that one day I can understand all of this stuff like you and those other Yodas in GS land. How long have you been using GS?

    I've been using Gamesalad over 4 years now, and believe me it was a mystery at first but stick to it you will learn fast it's really great software, and yes I was never good at math but Gamesalad has really started to change that.

    No I don't have a programming background but I am trying to learn some C#, The great thing about Gamesalad is you don't need to do any programming just logic and math.

    Just keep making games, and keep up with the forums you will be surprised what you can learn right here just by reading.

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited October 2015

    me again @BBEnk
    I've run into a bit of a hitch.. I know this is a long shot that you're going to be able to help with this – coz it's a bit tricky to explain or demonstrate. I've been trying to work this out but I'm stumped. I'll try and explain.

    If you see the grab I've put up, you'll notice the high score is 115. It's supposed to be 15. The weird thing is that it displays the correct high score when the main actor collides with all of the enemy actors except one. It also only happens when it goes into double digits.

    I've looked inside these actors and can't see any reference to that digit. I haven't applied your offsets to that digit – I was thinking that it didn't need it if it wasn't on the right side of the screen. Is this right? Do you have any ideas?

    PS: it also fails to display the final score digits

  • BBEnkBBEnk Member Posts: 1,764

    @monkeyboy simian
    Well the right side would have the offset if needed, but if you built starting with iPad and that looks like a iPad screenshot it would be 0, So should not make a difference. I can't really say whats wrong without seeing some code. But seems like you might have a code issue somewhere, try using your debugger and see whats happening with score.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @BBEnk I didn't even know there was a debugger. I'll have to try it out.. Thanks

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited November 2015

    @BBEnk
    Just thought I'd let you know that I seem to have fixed the problem. If I could just run something by you, it would help me understand a bit.

    So I have this game where there are flowers scrolling across from the right. My hero (a bee) has to touch/collide with the flower heads to get points.

    There are also venus fly trap type flowers which cause death to the hero. I also have a fire breathing dragon-fly which – when the hero touches/collides with the fire (a separate actor) causes death.

    I had a rule (which makes the death happen) in the fire actor. After going over every actor trying to find any connection with the left digit (which was duplicating every time the hero touched/collided with the fire – but no other actors), I swapped that rule which made the hero die over into the hero actor instead. This seems to have fixed it. My question is why? Is this possible?

    UPDATE I just tested it for longer than before and the error has occurred again. This is messing with my mind – more so.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    How can only one actor be doing this? My tiny mind is breaking – again!

  • BBEnkBBEnk Member Posts: 1,764

    @monkeyboy simian
    It's hard to say really without seeing the project, Your actor could be registering more then one hit when it touches, or any number of things really.

  • jay2dxjay2dx Member Posts: 611

    I find having the X warp on the scene works best when scrolling parallax stuff, this way it never gets destroyed! And I set the motion to the players motion + - etc

  • Village IdiotVillage Idiot Member, PRO Posts: 486
    edited November 2015

    @BBEnk

    I think I found out what was causing the problem. I went back to the last version of the game I had (I'm up to iteration 46 currently) where it was all working fine – including the things that you suggested for universal build and parallax – and the stuff about making sure the score with custom font worked etc.

    There was one thing that I changed that seems to have caused it to go all wrong. I moved my hero up in the layer order – above pretty much everything else. Including the one actor that caused the error every time the two of them collided.

    Is there a known issue with this that you know of? I've tested it about 15 times now and the error (first digit repeating once the score goes to double digits) hasn't recurred.

    @jya2dx What's X warp?

    PS: I nearly went out of my furry mind (again) trying to work this out. I'll test more – I hope to God (if he/she/it exists), that this is fixed.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    Does anyone know of this?

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    I'm guessing not.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited November 2015

    @monkeyboy simian said:
    Does anyone know of this?

    @monkeyboy simian said:
    I'm guessing not.

    I am guessing that 'this' is referring to actor/layer order? The answer is yes, actor order is quite important and many know of this. Also, behavior order within the logic stack is important as well.

    If you question is about 'x warp' -- I think @jay2dx meant "x wrap".

    If your question is about the existence of God. (You seemed to be expressing some ambiguity there.) That is probably outside the scope of GameSalad's charter. (But I can assure you that there are many who will are more than willing give you an answer!)

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @RThurman No existential dilemma here. And yes, I was banging on about the layer order issue. Thanks for the reply – that one seems kinda important to know.

Sign In or Register to comment.