Everything About Coding
Hey everyone, here is episode 6 of our walk through. Hope you enjoy!
but if I set several objects on the stage, will I have to do an if for each combination possible? it would be almost impossible :/
AWESOME YOU HELPED SO MUCH
can you give us the code?
It's a big no-no, and is getting worse and worse with every episode so far. I really appreciate your efforts, mate, but no cheese for advocating awful coding practices.
In the render function, I changed the rectangle for the tree to thissr.rect(newTree.getPosition().x + newTree.getSize().x /4, newTree.getPosition().y, newTree.getSize().x /2, newTree.getSize().y /4);
Then in Tree.java in the update functionbounds.set(position.x + getSize().x /4, position.y, size.x /2, size.y / 4);
This makes the collision bounds of the tree to be just the base of the tree which makes it a bit more realistic since you would never collide with the top of the tree unless the tree was laying down.
The collision rectangle on the sprite could probably use a bit of tweaking as well to perhaps about 90% of the size of x.
rather than using a string movement, using booleans work much better
awesome, you help so much!
in GL20 – sr.begin(ShapeType.rectangle) is sr.begin(ShapeType.Line );
hey thanks for the tutorial it's awesomebut just when we press multiple keys it has glitches.
Is it possible for you to upload the source after each video? 🙂 Thanks
awesome video thx for making!
Awesome. You helped so much!
Hi I tried running this to my Android phone but the player doesn't appear just white screen. tutorial 4 it was working fine up until tutorial 5 when we use a different image "Sprite Image".
I found a way to avoid the glitchy collision, but sadly it sacrifices allowing the player to move diagonally and creating a custom method for the collision.🙁Does anyone fix it in a simpler better way?
I shall leave a comment saying……"AWESOME!"
With the collision detection, the left and up movements work as intended but the down and right don't. With the down movement, when it collides with the rectangle is goes down diagonally to the left. With the right movement it goes up diagonally to the right.
My tree showed up fine until the shaperenderer bit. Now the tree doesn't show up. The red rectangle is still there but there's nothing inside.
This is great!! Thank you very much and keep up the good work. I was able to follow and complete the whole thing, albeit slower than you, lol. I was just struggling to accept the bugs you mentioned at the end. I will try and figure out a way to correct it as a way to practice.
I wasn't able to do ShapeType.Rectangle, the only options are Fill, Line and Point. In this case Fill will fill in the rectangle, Line will fill the outline of the rectangle, and I haven't used Point so not sure about that.
Why is it telling me that my tree.png has to be to the power of 2? Howcome you were able to use an image that was 726×798, but my computer is giving me errors?
Great Job! Love the tutorials, been a great help for a noob like me!
awesome! You've helped so much!
thank you for everything! Continues! I'll support from France, Paris! : D
Your email address will not be published. Required fields are marked *
Copyright 2018 Magazine WordPress Theme