I am making a 2D platformer with the default kit. But I am looking for code for my character. My goal is that when you press the left button, you go left. Right button, you go right, up button you jump, and down button you crouch. Thats my plan, but I have no clue how to code it. Any ideas or examples?
Let me do a search for you in the community... here are some Flappy Bird examples
Taifun
Do you have a crouch image for the character?
Swap images when the down button is touched down, and swap it back when the down button has touch up.
anything?
look at the stuff in this link
Look and use the resources below to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials including Imagnity.com List Tutorial, Mirrored - @Saj
then
Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU
then
tell us what you experimented with.
How to move sprites is discussed in Creating Animated Apps
Good luck.
It looks like you failed to click the link I provided earlier... following that link you could have found several threads... what about you doing some research?
Taifun
thats what im doing, but sadly no luck.
I detect a methodological error here.
What have you done to break up a complex problem to smaller problems?
What issues have you identified that need to be dealt with?
What notes have you taken from your reading?
How many sketch apps have you coded and tested to verify how this platform works?
Thinking without writing down your thoughts is vapid.
Feel free to post partial progress here for discussion.
Don't expect your app to appear fully born like Venus emerging from the sea.
I didn't quite get the last part, but thanks for the help!
You might make more progress in this app if you switch from a bottom up design approach to a top down approach.
Search the web for examples of platformer games that include level editors.
Examine the files produced by those level editors to see how they represent the locations of the various items that appear in a level.
Consider the problem of how those relative locations would map into Canvas coordinates on varying screen sizes, zoom levels, Canvas sizes, window sizes, and character locations in the level.
Consider the problem of which scenery objects should be visible depending on the location of the character in the level, and the category of object (ground, ceiling, wall, enemy, projectile, etc.)
A game level is a data structure. Which data structures have you learned to use yet?