Indiana Jones Dixiklo Engine

by dixiklo
See inside
Notes and Credits

Move ---------------------------- Left / right
Jump ---------------------------- Space
Climb / leave platform ----- Space + up / down
Crouch / stand --------------- Down / up
Roll ------------------------------- Move when crouched
Punch / use ------------------- W (press on platforms to exit level)
Whip ----------------------------- A (tip needs to touch swingable objects - aim with arrows, keep pressed when swinging)
Shoot gun ---------------------- S (aim with arrows)
Only draw gun ---------------- D (aim with arrows)
Enter door --------------------- Up
Pause / view inventory ---- Enter

Click the arrow keys in the top right to switch arrows/WASD.
Click the head in the top right to toggle automatic backup.
(If it's on, you get three tries per screen before being sent back)

An example game using this engine:

I probably shouldn't have, but I continued working on this engine. Updates: Pause function, text engine (by @Jconway1), door transition, sword fighters take multiple hits, added wolf, improved pushObject. And now, let's use this in a game! :)

========== Credits: ==========

Levels are called "worlds" through which the player can move through screens horizontally and vertically, which changes the WorldX and WorldY variables.
Every level is started at WorldX = 50 and WorldY = 50.
Every screen has a designated costume name, for example, the costume "test4950" is used for the world "test" at the screen with WorldX "49" and WorldY "50".

The "floors" and "borders" sprites need a costume for every screen or they will stay on the last one they used; other level sprites will be hidden if they don't have a costume for the current screen.
The "borders" sprite is used everywhere the player cannot pass through while "floors" is used everywhere the player can walk on, so there's usually lots of similarities. Note that bullets and the "PushObject" will pass through "floors".

The "whipObject" needs a small bit of code to work for any screen. Just set the "set indyX" and "set indyY" for the current screen to where the whip should swing (it needs to touch whipObject). Check how I did it in test4950 to see how to handle multiple swingable objects on one screen.
Note that the sprite design I used in this project isn't necessary, however, it's helpful for players to consistently have one recognizable design throughout a game.

"PushObject" is fairly easy to use, just copy the script for the screen you need it in and create costumes in the same pattern I used for test5149.

"InstaFall" should be self-explanatory, use this sprite wherever the level doesn't go any lower or a fall would be fatal.
"InstaDeath" is similar, but it acts a floor, e.g. when the player can't get out of a pit it should be on the floor.

"LevelDoors" basically teleports the player to a WorldX, WorldY at X and Y coordinates when he presses up touching the sprite.

"LevelExit" doesn't need to use this design either, but again, it can be good to use a consistent design.

"Map" might require the most work to use.
First, add all the level names of your game into its "mapWorldNames" list (the order is important!). Then, add the X and Y coordinates of each level's destination on the map into "mapWorldX" and "mapWorldY" in the same order. Lastly, add each level's starting position into the lists "mapStartX" and "mapStartY".
For a level to show up on the map screen, it needs to be in the "unlocked levels" list.
You can, of course, change the design of the costumes here, but make sure that your map destination costumes start at number 5.

The enemy sprites are fun to work with.
For "enemyBird", scroll down to find the last script in the left column. This script handles bird spawning. You can choose to copy the scripts I used, which will keep respawning birds, or edit them to suit your game.
"EnemyWindow" also has its spawning parameters in the lowest script in the left column.
"EnemyMonkeyBusiness" can only be used once per screen (no clones) and has its parameters in the usual place. You can use the "look" and "attack" blocks however you want, and you can combine them with the "jump" block like I did. Oh, and the monkey is invincible. It's just there to annoy the player :P
"EnemySword" is a spawned enemy again. You can choose whether he should be waiting like in enemies5150 or attacking directly like in enemies5250 by changing the costume the clone starts with.
The same goes for "EnemyWoof".

Shared: 27 Feb 2017 Modified: 12 Mar 2018
Favorite this project 105
Love this project 117
Total views 1907
View the remix tree  13
More projects by dixiklo