Log In  
Log In  

@TheTomster

Follow
Follow

Cart [#42556#] | 2017-07-17 | License: CC4-BY-NC-SA | Embed
7

Arcade wizard game made in 48 hours for GMTK Jam.

Press Z to jump, X to shoot magic missile. Down+Z to drop through platforms.

Smash all the gems with your magic to advance to the next level. When you shoot the missile, you're left vulnerable, so be careful! See how far you can get and set the high score.

P#42557 2017-07-16 21:17 ( Edited 2017-07-21 03:19)

Cart [#36417#] | 2017-01-22 | License: CC4-BY-NC-SA | Embed
12

A small apple farming sim.

Tab turns on the TV. Once the TV is on, arrow keys move, X displays the inventory, and Z uses the current item.

Tools:

Magnifying Glass
[3x3]

Examines the square you are facing. Brings up a full screen detailed view of whatever is in front of you. Useful for checking on your trees.

Apple Basket
[3x3]

Holds all of your apples. The red number on screen when your inventory is open is the count of how many apples are in your basket. Pressing "use" while this is selected will either plant an apple in tilled soil, or harvest apples from a grown tree.

Watering Can
[3x3]

Young seedlings need to be watered to grow. Pressing "use" while this is selected will sprinkle water on the square in front of you.

Hoe
[3x3]

Tills soil. Pressing "use" will till the square in front of you.

v0.9:


Cart [#36391#] | 2017-01-22 | License: CC4-BY-NC-SA | Embed
12

P#36393 2017-01-22 17:13 ( Edited 2017-01-28 05:28)

Cart [#34996#] | 2017-01-05 | License: CC4-BY-NC-SA | Embed
5

Someone over in Discord asked about some entity drawing code in Hug Arena, so I took a look a stab at explaining it. I realized the code in Hug Arena is similar to a technique I've used quite a bit, so I put together a small example cartridge demonstrating the technique.

The sample is commented code that demonstrates how to draw two types of objects that update the same way each frame, but draw differently.

In "Remains of El Dorado" I used this for most objects drawn in the game, you can check out that cartridge to see how this works on a larger scale.

P#34997 2017-01-05 14:26 ( Edited 2017-01-10 19:40)

Cart [#31991#] | 2016-10-29 | License: CC4-BY-NC-SA | Embed
24

Explore the lost city. Find the amulet.

The Remains of El Dorado is a roguelike game for PICO-8. You're seeking The Amulet of the Sun which will bring you great fame and fortune... if you survive.

Press C to charge a shot, press a direction while charged to shoot. Press X to enter the potion menu. Select a potion by pressing left and right, and press C to confirm. Aim your throw with the direction keys, and press C to throw the potion. Careful! Potions will explode on contact with a wall.

Remains is turn based. When you're in a tough situation don't forget to slow down and think about all of your options. Don't die with a potion in your pocket!

Potions

Potions are thrown around like grenades! On impact they will affect everything standing in the square they hit plus the 8 squares surrounding it.

Healing potions heal you if you're in the explosion. Enemies are unaffected. They also put out fires in the blast zone.
Fire potions are useful for attacking groups of enemies. They don't put out fires. The fire ants are immune to fire potions.
Ice potions are slightly harder to find than fire potions, but work on all types of enemies and put out fires.

Enemies

Three types of enemies inhabit the dungeon and will defend their turf.

Enjoy!

P#31992 2016-10-29 00:20 ( Edited 2017-07-05 18:39)

P#29641 2016-09-28 23:38 ( Edited 2016-10-19 15:40)

Cart [#28719#] | 2016-09-18 | No License | Embed
9

For the game I'm working on I built a super tiny tweening system for making it easier to move things around. This cart demonstrates a few different easing functions that plug into the system.

Tweening is a way of moving an object from point A to B. You specify where you want the object to go, and how long you want it to take to get there, and the tweening system takes care of the motion. I find it super useful for making games, especially for adding little bits of polish to your game. It's easier to just say "move the ball to x=104 in 60 frames" than it would be to calclate the required speed every time. You can also use an easing function to tell how it should get there, allowing it to accelerate slowly or bounce or spring back.

Tweens have four parameters: the property we want to update, the value we want to end up with, the length of time we want it to take to reach the target value, and the easing function. We'll store those values in a table, and each frame we'll look at each entry in the table and update the target property as needed.

The tween function begins tweening a property:

function tween(target, property, destination, duration, func)
  local tween_info = {
    target = target,
    property = property,
    base_value = target[property],
    change = destination - target[property],
    duration = duration,
    elapsed = 0,
    func = func
  }
  add(tweens, tween_info)
end

Each frame, we loop through that list and update everything. The update function removes any tweens that have reached their duration. Other than tracking this timing information, the tween_update function leaves most of the work to the selected easing function.

function tween_update()
  for t in all(tweens) do
    if t.elapsed > t.duration then
      t.target[t.property] = t.base_value + t.change
      del(tweens, t)
    else
      t.elapsed += 1
      t.target[t.property] = t.func(
          t.elapsed,
          t.base_value,
          t.change,
          t.duration)
    end
  end
end

So the easing functions are the ones that actually move our stuff… how do they work? Well the simplest easing function is linear, which is really no “easing” at all. It just moves the object from a to b at a constant speed. Here's what it looks like:

function linear(elapsed, base_value, change, duration)
  return change * (elapsed / duration) + base_value
end

So far in my game I've only needed one other easing function, In/Out Quadratic. This simulates acceleration and deceleration. It looks like this:

function in_out_quad(t,b,c,d)
  t/=d/2
  if (t<1) return c/2*t*t+b
  t-=1
  return -c/2*(t*(t-2)-1)+b
end

The cart also has a bouncy tween function that is super useful for menus and other UI.

The great thing is that by plugging in different easing functions you can reuse the same simple framework to accomplish many different effects. And tweening doesn't just have to affect movement. You can tween sizes, rotations, color… any numeric value you want to change over time.

P#28720 2016-09-18 00:40 ( Edited 2016-09-18 07:14)

X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-12-13 00:03 | 0.077s | 4194k | Q:80