Ludum Dare 55 April 13–16, 2024

Anotomy of a Card in TIC-80

Another Ludum Dare has come and gone! This time I teamed up with Whaies and we created a game about summoning lawyers and other ... things ... to court. You can play it here.

video11.gif


Upcard write is written in the Janet Programming Langauge using tic80. I had a lot of fun figuring out the code for Cards. I wanted them to lift, rotate, and shuffle like the real thing and I think the solution I came up with in TIC-80 was pretty neat! Here's a technically rundown

Anybody familiar with TIC-80 will know the basic way to draw a sprite is with the spr function. You give it an index in the sprite sheet and [x,y] coordinates and your done. But what if you want to do something crazy like rotate the sprite?! For that we must somehow implement affine transformation.

The way everyone in the TIC-80 community has done this is using the ttri, textured triangle, function. I actually wrote about this a couple years ago! The basic idea is to use 2 textured triangles to draw a rectangle, and by manipulating the 4 coordinates using math you can do all sorts of fun transformations. Here's what that look likes like in Janet.

```

adapted from https://cxong.github.io/tic-80-examples/affine-sprites

(defn deg2rad [theta] (* theta PIOVER180)) (defn rad2deg [theta] (* theta ONEEIGHTYOVER_PI))

(defn aspr/rotate [x y ca sa] [(- (* x ca) (* y sa)) (+ (* x sa) (* y ca))])

(defn aspr [x y &named u1 v1 texsrc chromakey sx sy flip rotate w h ox oy shx1 shy1 shx2 shy2] (default u1 0) (default v1 0) (default texsrc TEXSRC_SPR) (default chromakey -1) (default sx 1) (default sy 1) (default flip 0) (default rotate 0) (default w 1) (default h 1) (default ox (math/floor (/ (* w 8) 2))) (default oy (math/floor (/ (* h 8) 2))) (default shx1 0) (default shy1 0) (default shx2 0) (default shy2 0)

(let [sx (if (= 1 (% flip 2)) (* -1 sx) sx) sy (if (> flip 2) (* -1 sy) sy) ox (* -1 ox sx) oy (* -1 oy sy)

# Shear & rotate
shx1 (* -1 shx1 sx)
shy1 (* -1 shy1 sy)
shx2 (* -1 shx2 sx)
shy2 (* -1 shy2 sy)
rr rotate
ca (math/cos rr)
sa (math/sin rr)
[rx1 ry1] (aspr/rotate (+ ox shx1) (+ oy shy1) ca sa)
[rx2 ry2] (aspr/rotate (+ ox shx1 (* w 8 sx)) (+ oy shy2) ca sa)
[rx3 ry3] (aspr/rotate (+ ox shx2) (+ oy shy1 (* h 8 sy)) ca sa)
[rx4 ry4] (aspr/rotate (+ ox shx2 (* w 8 sx)) (+ oy shy2 (* h 8 sy)) ca sa)
[x1 y1] [(+ x rx1) (+ y ry1)]
[x2 y2] [(+ x rx2) (+ y ry2)]
[x3 y3] [(+ x rx3) (+ y ry3)]
[x4 y4] [(+ x rx4) (+ y ry4)]

# UV coords
u2 (+ u1 (* w 8))
v2 (+ v1 (* h 8))]
(tic80/ttri x1 y1 x2 y2 x3 y3 u1 v1 u2 v1 u1 v2 texsrc chromakey)
(tic80/ttri x3 y3 x4 y4 x2 y2 u1 v2 u2 v2 u2 v1 texsrc chromakey)))

```

Sidenote: that this implementation does not use matrices, which maybe means "affine" is the wrong technical term?

With this function we can draw a sprite and rotate/scale it however we need.

upcard-writ-1.gif

Awesome!

HOWEVER, there's one problem. This rotates sprites, but how do we transform text? I didn't want to waste space in the spritesheet embedding letters, and TIC-80's print function definitely does not support rotating.

The Solution is to ~~abuse~~ use VRAM. The video ram in TIC-80 is "double banked", which means you basically have 2 screens which are drawn over each other to work with. Conveniently, ttri supports pulling the texture from various different places. Those are the spritesheet, tilemap, and the VRAM you're currently not drawing to. With this we can

  1. switch to
  2. draw out the entire card using boring functions. Don't worry about any sort of rotation or scaling at this point.
  3. switch to VRAM 1
  4. clear the screen to hide everything on VRAM 0
  5. use our custom ssprfunction with VRAM 0 as our texture source to draw our card with scale and rotation!

Here's the annotated card drawing source code in Upcard Writ

```

begin drawing in vbank 0

(tic80/vbank 0) (tic80/cls 0)

draw empty base of card, which is in the map

I palette swap based on its type... maybe more on that in a future blog post

(with-pallete-swap (match (character :integrity) :virtuous {5 14} :pragmatic {5 9} :sleazy {5 4}) (tic80/map 0 0 6 10 0 0 0))

only face up cards need to have their details drawn

(when flipped? # print out title (print-centered (character :name) 24 4 1 false 1 true) (print-centered (character :name) 24 3 7 false 1 true)

  # draw the cards picture if it has one
  (when (character :sprite)
(tic80/rect 0 11 48 32 (character :sprite-bg))
(tic80/spr (character :sprite) ;(character :sprite-args))
(tic80/rectb 0 11 48 32 7))

  # draw the cards "resources"
  # ... theres some annoying logic to split it into 2 rows
  (loop  [[i [mod ev]] :pairs (array/slice (character :evidence) 0
                 (min 2 (length (character :evidence))))]
(evidence-spr ev (+ 8 (* i 22)) 43)
(tic80/spr (match mod :+ 1 :- 2) (+ 3 (* i 22)) 43 0))
  (when (> (length (character :evidence)) 2)
(loop  [[i [mod ev]] :pairs (array/slice (character :evidence) 2)]
  (evidence-spr ev (+ 8 (* i 22)) 60)
  (tic80/spr (match mod :+ 1 :- 2) (+ 3 (* i 22)) 57 0))))

some other stuff happens...

eventually we switch to vbank 1

(tic80/vbank 0) (tic80/cls 0)

and Finally draw the card with rotation and scale!

(aspr ;(round (- (self :pos) [0 (self :height)])) :u1 0 :v1 0 :w 6 :h 10 :texsrc TEXSRC_VRAM :sx (self :scale) :sy (self :scale) :rotate (self :rotation)) ```

Phew! Here's the results (I've removed a screen clear so you can see both vrams).

upcard-writ-2.gif

If nothing else, maybe all this has inspired you to take a look at tic80, its pretty neat.

Regardless, thanks for reading!

Soul Pact Patch 0.1 Notes

Patch.png

Greetings fellow wizards!

Patch 0.1 is officially live! We, the Soul Pact Dev team have successfully patched all the game breaking bugs. And we encourage you to try the game out if you haven't already or if you already have, check out the changes! It'd mean the world to us! We plan on re-working the game after the jam and release it so please leave a feedback and rating. :)

Yours sincerely, Soul Pact Dev team

Patch notes for patch 0.1:

  • Main Menu Stability
  • Main Menu now functions smoothly without any glitches.
  • Settings Accessibility actually work,
  • Access Main Menu Settings fixed
  • In-game Settings working as intended
  • Adjust settings within the game without disruption, ensuring uninterrupted gameplay.
  • Music loops nicely
  • Enjoy uninterrupted music at Level 1, looping flawlessly throughout gameplay.
  • Tutorial is visible now
  • Tutorial functionality restored, providing a comprehensive learning experience.
  • UV textures repaired
  • Textures for clues have been fixed, enhancing visual clarity and immersion.
  • Player Collision Resolved
  • Player no longer clips through walls, ensuring a smoother gaming experience.
  • End scene now functions properly, providing a satisfying conclusion to the game.
  • Book Reading Experience is now working,
  • Books are now readable.

VIDEO WALKTHROUGH

By the way, I made a developer walkthrough video this Ludum Dare again, for my entry Evocation! It has my commentary on development process, includes all the endings and spells, and story explanation in the end ~ You can watch it on YouTube if you are curious. I think last time video playthrough helped a few jammers to check out the game (especially since HTML version is not that good >_<)

https://youtu.be/rh0n_WIMwF4

(check time codes in description!)

A short visual novel about little guys - Lucky Little Darlings!

Lucky Little Darlings - LDJAM - Ludum Dare.png

My friend and I have been making art of these characters for a while, illustrations, crochet, little figurines, etc. We love them, and joined forces to make a short narrative game with them as the driving force of the plot. LuckyLittleDarlingsShopBanner.png In the future, we want to make a longer game with a lot more characters and focus on puzzle gameplay. In the meantime, we put this together for LDJAM to kickoff progress and further development :^) Send your narrative game links so we can play them as well

Play it here https://ldjam.com/events/ludum-dare/55/lucky-little-darlings-the-game-jam-version

Spellbinder

Collect as many elements as you can to summon your great warrior!!

Снимок экрана 2024-04-16 в 05.16.58.png

Streamers have culled!

Thanks for these lovely vtubers for testing our game!

SaryahM https://www.youtube.com/watch?v=6ia1aQDZk3Y

Punniz https://www.youtube.com/watch?v=vSZBKKVvbfw

We had fun watching them and they seemed to have fun playing The Culling. You can check out their LD pages at @saryah and @punniz!

Size doesn't matter, BUT FISTS DO!!

A rum-filled iron-clad dwarf stands in the Demon Lord's way. Her army approaches. MOW THEM DOWN! https://ldjam.com/events/ludum-dare/55/throw-hands Jojo Meme.png

My impressions from the first jam (ᐛ)

Good time of day! Guys, Thank you very much everyone for your feedback and rating of the game "Ghostslayer"!!! This really makes happy!!!^^

2024-04-21_00-03-51.png

We appreciate your advice on the game, but this is our first Jam аnd the first Game, so no offense) We have a lot to learn, and we will try to implement even cooler projects in the future! I speak for myself as the Artist who created the game style :)

I really enjoyed being part of a team and working on the game for those 3 days! This is great!!! B)

Speaking of "Ghostslayer", in the coming days, I would like to publish posts on the topics of "Cut Game Content" and "Future Game Plans". I hope you really enjoy reading it! Here's another poster at the end) See you soon! ᕕ( ᐛ )ᕗ

Project link: (https://ldj.am/$384374)

Frameem1/em8.png

My strange take on a theme

I don't like summoning classes in RPGs. I was confused at the start of the jam, but then I realized that my game could be about summoning something strange. So, I decided to make a game about summoning an elevator.

https://ldjam.com/events/ludum-dare/55/the-grand-summoner-of-lifts

62bb2.png

Looking for what to play?

Look no further - welcome to our pizzeria! Its address is - My profile town on Games street Ludum number 55 Верная версия.png

Thanks for 20 votes! (Tiny post-mort)

Thanks for 20 votes! Glad so many of you seemed to enjoy ruining villager's days!

Animation.gif

All in all, I'm pretty happy with how Druid Island turned out. I did not have a strong idea for this theme. Honestly, I wasn't too interested. So I just picked an artstyle and ran with it-- following in the footsteps of my friend lootbndt.

Island generation wasn't all that difficult- I had it up and running in about 30 minutes. Some friends came online and I spent the rest of the night playing halo and trying to think of what to do with it.

Animation2.gif

Day 2, I made the waves move and the plants sway, added flower gathering and villagers and realized I didn't like it. I'd had to cut down the number of creatures you could spawn for scope, so the plants no longer really felt unique. So after maybe 6 hours total of work I stopped and watched most of Fallout. Pretty good show. Not a masterpiece, but I'd recommend.

Animation4.gif

Day 3, I decided to juice it to the gills, add archer enemies, and see if it felt any better. It did! Amazing what some screen shake and particle effects will do! So I grabbed a mallet, my mortar and pestle from the kitchen, mixed some sound effects at my desk, cranked out some music and ta-da! That's pretty much it.

So for the (maybe) 12 hours I put into it, I'm quite happy. I think maybe I'll take this artstyle and see what else I can do with it. I quite enjoyed the turn based characters jiggling all over a bitsy grid. Maybe a soulslike?

Streaming Playing Jam Games Now!

Come on the stream and !submit your games. I'd love to play yours.

https://www.twitch.tv/saryahm

Screenshot 2024-04-21 092902.png

LD Score Chasers - Qualification Begins

The qualification period for the next Ludum Dare Score Chasers tournament has started!

Score chasers is a tournament where people compete to get high scores in games submitted to this Ludum Dare. This includes things such as completing a game in the lowest amount of time, getting high scores in a game, or other ways a game can be competed in. The tournament is taking place on Saturday, April 27th, 2024 4:00 PM UTC on https://twitch.tv/ategondev.

Anyone is free to join the tournament! In order to qualify you need to submit an impressive score in any game submitted to the jam. To submit you can join our discord at https://discord.gg/FhP4jaZ7KS and post a screenshot of your score in the entry submissions channel.

If youre interested in just watching the tournament feel free to join as well to get notified about things such as when it goes live and to chat with contestants + other people watching

Hope to see you there!

If you have a game you think fits the tournament you can share it in our game pitch thread for competitors to look at https://ldjam.com/events/ludum-dare/55/$394070/ludum-dare-score-chasers-game-pitch-thread (please dont join our discord to advertise your game, post it instead in the pitch thread

5fa03.png

I only start loving the theme AFTER the game jam has finished

Is it only me? Or does the theme always sound terrible at the start, and even worse if I don't manage to deliver a game. But after submitting a game, I kinda forget about the theme, or end up loving it.

Anyways, I'm excited to catch up on giving feedback this afternoon!

Streaming your Ludum Dare Games! - Day 4

Im about to go live over at https://www.twitch.tv/ategondev playing some games from the jam! Feel free to stop by and watch me play your game