Log In  

Cart #32316 | 2016-11-07 | Code ▽ | Embed ▽ | No License
15

Changes 21/09/2016

  • Player can attack, killing zombies in two hits
  • Bugfix: Health bar is now accurate
  • Player animations (Attack, Die)
  • Zombie animations (Hit, Die)
  • Sounds(Music, player jump, player attack, zombie hit, player hit)

Changes 23/09/2016

  • Bugfix, after dying, the death animation does not trigger again when hit
  • You are given a message and the ability to reset the game after dying
  • Torches are now animated

Changes 07/11/2016

  • Enemy archers
  • Health pickups
  • Collectibles (main game objective)
  • New Music
  • New sounds

Sadly, I haven't added a boss, but this is what I would call the "finished" product, other than perhaps a nice boss fight.

P#28531 2016-09-14 21:38 ( Edited 2016-12-07 16:27)

Good start to an adventure platformer !

P#28549 2016-09-15 13:18 ( Edited 2016-09-15 17:18)

Cheers :D
Just added some other basic stuff:

  • Moving between screens
  • Enemies that can hit you (You can't die yet and you have no attacks though :D)
  • Messed around with some environment stuff, although the treasure chest doesn't do anything...

Ah well :D

P#28753 2016-09-18 16:43 ( Edited 2016-09-18 20:43)

Pretty cool, like the updates. Problem is when the player gets to the bottom level where the enemies are, there is no way to get back up to the castle.

You might animate the torches, will cost you one tile. Or you could be clever and do palette manipulation.

Great images, animation, and smooth controls for jumping. No stickiness at all.

P#28988 2016-09-21 22:25 ( Edited 2016-09-22 02:25)

Thanks :D

Not being able to get back up to the castle is actually purposeful. That little section is meant to be an intro, really. Then falling into the pit is kind of like "Here we go". But who knows. I'm not entirely sure what to do with the level design, yet.

Yeah! I was thinking about animating the torches! :3 Not sure what the best way to do it is really, but i'm probably going to need to type out a lot of coordinates of where the torches are, and I didn't feel like doing that until I'd nailed down what the level was going to be like

Or...do a big bit in the init() to check every map tile and save those coords? hmmmm

Also, I'm loving this whole Pocket CHIP & Pico-8 malarkey! And I keep seeing your n00b code and pixel stuff :D Its nice having this little community^^

P#29093 2016-09-22 19:01 ( Edited 2016-09-22 23:01)

Noob code !? How dare you ! I'll have you know sputter gasp wheeze ...

Yes, you are likely right. There is a VERY good chance my coding methods are nothing compared to others who write the correct way using object-oriented code.

Still - I can get the job done with my spaghetti-code and that's what I have planned for today. :)

One of the easiest ways I would animate the torches would be to scan the mapper area for the Tile ID # of the torch. Then give it a 50-50 chance of it 'morphing' into a different tile.

Preferably the one next to it. Lemme see ...

Once you have drawn a good torch tile, (make sure it is tilted a little to the right). Press Ctrl-C. = (equals key), Ctrl-V, and the key "H"

That will horizontally flip your torch so it is facing the opposite direction. That will save you a little trouble from having to doodle 2-torch tiles.

And, as mentioned in the runtime of your code, let's say your torches are at tile #127 and #128. Look for 127 or 128 from the mapper and randomly change it to 127 or 128 each game frame. Rinse. Repeat. :)

P#29101 2016-09-22 19:21 ( Edited 2016-09-22 23:22)

Don't flip your sprites manually if you don't have to. (or if you want to save room for more sprites.) spr() has optional flip flags that can do that for you with a little preparation.

P#29103 2016-09-22 20:05 ( Edited 2016-09-23 00:05)

Tyroney, can you flip a MAPPED tile ? That's what I think is not available. And, if it's not, then 2-images is the only way out I can see where you are modifying only the map data.

P#29107 2016-09-22 20:31 ( Edited 2016-09-23 00:31)

Oh, nonono. D: I didn't mean your code was N00b-ey. I meant I'd your project called 'No-Object Noobs demo' or something!

Well currently, my torches are fixed to the background sprite and placed like the rest of the map. So I could either do a couple of sprites of torch animation, with the background bricks still there, or I could make a standalone sprite and draw it as a sprite rather than a map tile. But in terms of placing the new animated torches, I'm either going to need to make torch objects and churn through them in runtime or maybe place map tiles with a certain flag and when I change scene (scenes being what I call a screen-worth of tiles. 16x16, I think?) scan each tiles there for that flag and replace the placeholder tile with the shiny animated ones...Not sure. But I think placing flagged tiles and scanning for them is probably the easiest way to do it. I might try that later. I am running a bit low on sprite space though :(

These are currently the torch sprites, and the walls they fit in with

P#29148 2016-09-23 08:51 ( Edited 2016-09-23 12:51)

Looks great ! If you really want to animate without using extra sprites, you could do a palette transfer. I think it's possible to do it globally so it affects all images on the screen.

If you're stacked on space, you might use some of your image tile space to store map data, in this case a 5x5 field of 8x8 tiles could represent a single 16-color pixel.

You could then use the MAPPER to record these 5x5 tile instances and build your game thissaways. The advantage of using your own custom mapper is the ability to inject invisible artifacts such as flags, traps, and scripts.

P#29150 2016-09-23 09:49 ( Edited 2016-09-23 13:49)

I actually might make my own mapping system like that if I do a sequel but I've realised that page two had all those wooden platform from an old version, that I won't be using anymore. So I've made my fire torch animation there instead :D Currently writing the code to place them.

P#29156 2016-09-23 10:35 ( Edited 2016-09-23 14:35)

Also, what's a palette transfer? D:

P#29157 2016-09-23 10:35 ( Edited 2016-09-23 14:35)

This is something pretty new for me, too. I know you can change it so one color replaces another when you plot a sprite thus:

PAL(5,0)

And an example program HERE:

https://www.lexaloffle.com/bbs/?pid=28612#p28611

What this means is, anytime you are going to plot color #5 say with a SPR() command, it will instead plot color #0.

I knew drawing a sprite with a black background would give me a transparent sprite, yet I still wanted a black outline around that sprite. So using this method, I made an outline with color #5, and made it APPEAR that it was color #0.

As far as changing the palette so it affects EVERYTHING on the screen automatically, I haven't learned that far yet. :)

P#29162 2016-09-23 12:57 ( Edited 2016-09-23 16:57)

Ahhh, adding an outline is pretty cool! Seems like a command that won't be very useful other than that though. Or maybe determining what team something belongs to by swapping out a certain colour for the team colours.

Torch animations complete!

P#29172 2016-09-23 15:26 ( Edited 2016-09-23 19:26)

No, you have it right,KQ|1N. You can use that command to change the color of any other plotted items.

Now if you can flip the H or V of a tile from your mapper, I would say awesome ! But ... I don't think you can, so that is the next best thing.

P#29174 2016-09-23 15:36 ( Edited 2016-09-23 19:36)

You mean flip for torch animations :/ Or just generally "Can it be done?"
I don't thiiiiink you can flip map tiles. Although you could use spr() and place the same kind of sprite on top of that sprite and use the spr() flip argument. Wouldn't work for black tiles though :/

P#29177 2016-09-23 15:48 ( Edited 2016-09-23 19:48)

Here's some thoughts in case any stick -

You could set flags on the torch tiles, leave them out of the map draw, then have a second map draw with palette rotation that changes a bit each time to make them interesting.

You could do like Jelpi does with entities, and run through the map and check for torch tiles, and turn them into entities which can be animated or whatever.

If you don't want to mess with the map drawing as much, you could run through the currently visible map, find any torches, and drop some particles on them in the appropriate place. (just a few random yellow orange or red pixels near the area of the flame should do it)

edit: whatever you do, you're going to be drawing torches separately or redundantly, so drawing/flipping with spr() makes sense, if you want to go the flipping route.

P#29179 2016-09-23 16:01 ( Edited 2016-09-23 20:02)

I still like my idea. Use 2 tiles. One is torch-1, Two is torch-2, then do a For/Next loop, scan for 'em in the mapper, change 'em to randomly 1 or 2 in the mapper, and return back.

No need to change palette or plot sprites.

Entities - I'm still learning that Tyroney ! :D

P#29180 2016-09-23 16:09 ( Edited 2016-09-23 20:09)

I've got it sorted now. What I ended up doing was...
The torch animation has 4 frames.

When you enter a new scene:

  • Scan each tile in the area you're working with to see if its a brick torch sprite, or a dungeon wall torch sprite, which I place the way I did before, just using the map editor.
  • Tell the torch objects where each of these tiles is
  • Replace dungeon wall torches with normal dungeon walls
  • Replace brick wall torches with normal dungeon torches

Then in my main update:

  • For each torch in the list...
  • run the animation (I've already set up animation objects and functions for everything animated to use)

Then when you leave the scene, before the new scene stuff happens

  • Check the XY positions of each active torch, and replace the torch sprites with the dungeon wall/ brick wall ass appropriate.

And, y'know. A few small steps to do with hiding torches and stuff...

It seems to be working nicely so far :D

P#29182 2016-09-23 16:33 ( Edited 2016-09-23 20:33)

Post your work when you get a chance ! Would love to see what you described in action.

P#29193 2016-09-23 19:09 ( Edited 2016-09-23 23:09)

The code or the actual game? The game at the top is the most up-to-date. Well, it was. Now I've got zombie-archers in the game but until I've placed them all, this version is the latest :D With torches...

P#29398 2016-09-25 17:17 ( Edited 2016-09-25 21:17)

Really dig the music! This will be a great game when finished! :)

P#29440 2016-09-26 16:12 ( Edited 2016-09-26 20:12)

Cheers :D I think I've got the space to add one, two or three bits of music. I've got a few things written on my PC but not transcribed into Pico 8, yet.

I've now added archers, knights, a bit more level design and improved hit-detection. Hoping some add some more stuff tomorrow and post the update (Y)

P#29619 2016-09-28 18:04 ( Edited 2016-09-28 22:04)

The music is particularly fitting, and I like how it changes leading up to the final rooms. This game sort of grew on me as I played more and more of it, as I found that the rooms were different enough to have some character and the castle was interesting to explore. It does bother me slightly that you can become locked in the final sections of the castle without finding all the chalices, since it requires playing a second time and doing a little trial-and-error. Still, the game was enjoyable enough. I only wish the hitbox on your attack was bit wider, since I found myself needing to move to the side before I could hit archers a lot.

P#32319 2016-11-07 22:00 ( Edited 2016-11-08 03:00)

It's a very cool game. I wish you could introduce some RPG elements, like for example slaying enemies could boost your XP; After earning enough XP you could level up and make more damages with the sword (needing to give less hits to slay an enemy) and maybe increasing the HP.

BTW is very cool as it is.

P#32331 2016-11-08 09:14 ( Edited 2016-11-08 14:14)

Very cool game. One thing I noticed (maybe a funny bug), in the first screen if you go to the left you fall in the void :)

P#32615 2016-11-18 19:58 ( Edited 2016-11-19 00:58)

Really good game, thanks.

P#33149 2016-12-06 22:50 ( Edited 2016-12-07 03:50)

Connorses:
Well, finishing the game in that end room without the opportunity to go back was purposeful, so then people are likely to replay and collect the rest, realising that they missed a couple.

If I do some updates, I might tinker with hitboxes. I think what it is is that when they face the opposite direction, the amount that I adjust by visually is slightly off compared to how much I adjusted in terms of their coded position. And If you're too close, it doesn't seem to register the hit, which is the bigger problem.

Cesco:
Ta :D
Adding XP would doable, but I'd probably want to avoid you becoming really overpowered, unless I made some enemies really tough to promote the need for leveling. Like making the gold knights completely destroy you if you haven't leveled up a bit.

Rafael Oliveira:
Lol, yeah :D It was such a rudimentary error on my part, because during testing, I just went to the right. It didn't occur to me to walk left. I have actually fixed this error on my version but I haven't uploaded it yet, since that's the only change I made :D

But generally, yay :D
I might come back to this game and add some stuff... (Like there should be a boss fight and locking doors in the room before the final cup).

P#33170 2016-12-07 11:27 ( Edited 2016-12-07 16:27)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 11:12:39 | 0.019s | Q:45