Alright! It's time to pop the champagne cork and celebrate the new Q&A Forum!
Although I made this demo three days ago, I felt that since I never made a post about it, this would be the place to do so.
I experimented with reading and writing map blocks, and made a little tech demo. Currently you can pick up blocks, adding to the counter at bottom left of the screen, and place them, subtracting from it.
I may not have made the process as streamlined as I could, and it has a few bugs that I had to (sort of) cover up, but I made sure to comment every single darned line of code to make it more understandable.
http://www.slimesalad.com/forum/viewgame.php?t=6476
Blok: Movable Terrain Demo
Moderators: marionline, SDHawk
- Taco Bot
- Meat, Cheese, and Silicon
- Posts: 484
- Joined: Fri Jul 18, 2014 12:15 am
- Location: Santa Cruz
- Contact:
Blok: Movable Terrain Demo
Sent from my iPhone
- spheroidal_defence
- Red Slime
- Posts: 25
- Joined: Mon Aug 04, 2014 10:13 pm
- Location: CCCP
- sheamkennedy
- Liquid Metal Slime
- Posts: 1110
- Joined: Mon Sep 16, 2013 9:29 pm
- Location: Tama-shi, Tokyo, Japan
- Contact:
I love this demo. Besides it being simple I see a lot of potential for it to be used in a puzzle-like game.
Perhaps you could make a game that only allows the player to pick up a maximum of 1 box at a time. The game could have buttons so if you place the box on a button it would hold the button down and open doors or carry out other tasks. You could have bloodthirsty monsters which can be avoided by strategically placing boxes in a wall-like pattern to reach the goal. Maybe the character can't swim and must place boxes in water to make bridges. You could even add a little animation so when you pick a box up your character holds it above their head... I can see a lot being done with this. Id love to play a game like this, especially if the puzzles got very difficult.
Perhaps you could make a game that only allows the player to pick up a maximum of 1 box at a time. The game could have buttons so if you place the box on a button it would hold the button down and open doors or carry out other tasks. You could have bloodthirsty monsters which can be avoided by strategically placing boxes in a wall-like pattern to reach the goal. Maybe the character can't swim and must place boxes in water to make bridges. You could even add a little animation so when you pick a box up your character holds it above their head... I can see a lot being done with this. Id love to play a game like this, especially if the puzzles got very difficult.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
The style of indenting reminds me of sheamkennedy's avatar. It looks like this:
To remove the redundancy, you can loop over the 4 directions using the dir X and dir Y scripts here: http://rpg.hamsterrepublic.com/ohrrpgce ... dump#Maths
Also, notice that there's asymmetry between the controls when walking left, and when walking right. That's because when you're partway between tiles, hero X/Y return the tile to the up-left.
To remove the redundancy, you can loop over the 4 directions using the dir X and dir Y scripts here: http://rpg.hamsterrepublic.com/ohrrpgce ... dump#Maths
Also, notice that there's asymmetry between the controls when walking left, and when walking right. That's because when you're partway between tiles, hero X/Y return the tile to the up-left.
- Taco Bot
- Meat, Cheese, and Silicon
- Posts: 484
- Joined: Fri Jul 18, 2014 12:15 am
- Location: Santa Cruz
- Contact:
I tried to do that, but messed something up big time in the process (shows just how good of a coder I am).TMC wrote: To remove the redundancy, you can loop over the 4 directions using the dir X and dir Y scripts here: http://rpg.hamsterrepublic.com/ohrrpgce ... dump#Maths
I did notice that, and is there any way to fix it?Also, notice that there's asymmetry between the controls when walking left, and when walking right. That's because when you're partway between tiles, hero X/Y return the tile to the up-left.
Sent from my iPhone
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
I think that you can work around that by doing something like this:Taco Bot wrote:I did notice that, and is there any way to fix it?TMC wrote:Also, notice that there's asymmetry between the controls when walking left, and when walking right. That's because when you're partway between tiles, hero X/Y return the tile to the up-left.
Code: Select all
script, hero center x, who, begin
exit returning((hero pixel x(who) + 10) / 20)
end
script, hero center y, who, begin
exit returning((hero pixel y(who) + 10) / 20)
end
Last edited by Bob the Hamster on Fri Feb 13, 2015 6:15 pm, edited 1 time in total.