Page 1 of 3

My first Game - Android Platformer

PostPosted: Thu 18 Oct 2018, 11:49
by jack
Hey I'm Jack, 16 years old and from Germany.
I've been playing the last few years a bit with HTML/CSS/JS, Photoshop, Cinema4D, ValveHammerEditor, Stencyl, ... and a few days ago I've discovered GDevelop. :)

For a long time I would like to make a game that other people, or at least my friends really like to play. I think a platformer for Android with 1 or 3 buttons should be a good choice. I completed the official tutorials on the website and it is really nice so far. But I'm not sure if it will succeed, because I think the cool things like shoot, teleport, elevator, double/wall jump, remaining lives, collect and use keys, use coins for updating skills, start and level menu, etc. are not so easy or really complicated and (of course) there are no detailed tutorials for all that. I have no idea how I can build the things I definitely need to the game makes sense and fun, and the language doesn't make it any easier.

Currently I have 2 problems.
I use 64x64 graphics and they are getting worse in the game. Is this normal because of different resolutions of devices or so? Is 64 okay for my project?
https://i.imgur.com/qUrohbN.png

If I add a player sprite, GDevelop automatically adds a hitbox. It is 1px larger than the graphic in all directions. Unfortunately not in all directions, top 0px, bottom 2px.
That's why my player is not standing on the ground but has 1px gap. I can fix it with Custom Hitbox but is it a bug?
https://i.imgur.com/HcLgJx5.png

Re: My first Game - Android Platformer

PostPosted: Thu 18 Oct 2018, 12:13
by Wendigo
Hi Jack and welcome to the forum. :)

Problem 1 can be solved by disabling "smooth the image" in the the resources screen.

Problem 2 is a known bug which hasn't been busted yet:
https://github.com/4ian/GDevelop/issues/519

Re: My first Game - Android Platformer

PostPosted: Thu 18 Oct 2018, 17:11
by jack
Dankeschööön :)

What is the white and black frame in the editor?
The black one is "Mask" and has the size 1200x600 which I have selected. But both are definitely not the area that I see in Preview, HTML and apk. The control buttons are on the GUI layer, the camara event is not the problem. But.. in the Platformers demo I have two black frames and there the positions are correct. :o
https://i.imgur.com/X0XDS0A.jpg

Re: My first Game - Android Platformer

PostPosted: Thu 18 Oct 2018, 19:17
by Lizard-13
Check the project settings, at the end there are options to change the window and camera size to fit the screen. What GD is doing right now in your game is changing the camera size so the graphics don't get stretched when it fills the screen horizontally :)

Re: My first Game - Android Platformer

PostPosted: Fri 19 Oct 2018, 20:16
by jack
Okay after restarting GD the frame has the settet size, and he was white because the background color was dark.
The solution for the correct position on the right side is an anchor behavior for the control button on the right side, as shown in the demo.
Image

Re: My first Game - Android Platformer

PostPosted: Sat 20 Oct 2018, 01:08
by Rikazu
Yep, since it automatically resizes the screen size (which is different from the initial screen size on the editor when you designed the UI), an anchor is needed.

Re: My first Game - Android Platformer

PostPosted: Sat 20 Oct 2018, 10:51
by jack
How can I manipulate, delete, etc. a sprite object with "Platform" behavior?
I want a bridge that collapses when I stand too long on it.
(player is in collision with bridge - Delete object bridge) works only without behavior, but then I can't stand on it.
I found the action "De/activate a behavior" but it does not work
How can I use a delay between the trigger and the action?

Thanks for your help :)

edit: okay i added an invisible player hitbox with Y + 1, now it works.
But how does delay/setTimeout() work?
I think I need this very often when I don't want it all to happen right away.

Re: My first Game - Android Platformer

PostPosted: Sat 27 Oct 2018, 12:18
by jack
I want to build a simple coin animation without different sprites, with manipulating size and position.
Size - Scale unfortunately does not work with pixel unit, so I tried using an object variable.
Image
Of course it can not work that way. I also tried a scene timer, but I don't know...

Re: My first Game - Android Platformer

PostPosted: Sat 27 Oct 2018, 14:15
by Lizard-13
I guess it actually works, but your code will keep the value around 95 always.
If the value is slightly > 95 subtract -TimeDelta() and increase scale, the next frame the value will be slightly < than 95, add TimeDelta() and reduce scale. So it does the smaller-bigger animation but very fast and subtle.

You need a direction tracker variable:
Scale.png
Scale.png (15.51 KiB) Viewed 1858 times

Re: My first Game - Android Platformer

PostPosted: Tue 8 Jan 2019, 13:13
by jack
Hi Guys
I wanted to continue working on my game and now I have a problem with version beta58 and newer.
"Add a force (angle)" no longer works with physics behavior.
I have an object that moves and falls off a platform when I jump on the platform and a second object that I can push down with the player. Both does absolutely nothing since the update.
I also tried the two new options force "Instant" or "Permanent" and Physics2.