Update: The game has been completed!
Here's the game in pdx and .json format for your enjoyment
(Warning, contains violent content, viewer discretion is advised)
Pulp Game v3.6.pdx.zip (89.1 KB)
(Note: pdx file updated with fatal error fix)
Pulp Game (jam) Dev Log:
I love video games. I couldn’t tell you exactly how many game ideas are bouncing around in my head, but i can tell you that it’s a lot.
One such idea that i had had for a game is to make a sort of recreation of Squid Game using Pulp just for kicks.
When the theme SCARY HEARTBREAK was announced i thought this idea would fit this theme perfectly.
I guess i need to get going on the character design…
It's lacking detail, but i can add that later (if i have time). The feeling is there I think.
while i do that, i need to brainstorm what games i can put it. This may be overly-ambitious, but i think there are lots that i can feasibly do (…. but i’m not going to spoil what they are here in the dev log, so you'll just have to play the finished game to see for yourself )
my Idea is that the players will have a set of challenges, each of which is in a different room. Each room has its own logic for its game.
This will be a lot of PulpScript to manage and can get really messy, so i was thinking of the right way to manage this. I’d like to have each room have its own logic, so that each room effectively works as a separate (mini)game with its own rules.
There’s an “on loop” event handler which is called every frame, but unfortunately it’s not called on rooms…. sad trombone
Luckily for me, Shaun provided a really simple and elegant solution for the problem, which is just 5 lines of PulpScript that i put in my main “game code” (in fact these are the only lines of Pulpscript in the “game” section:
on loop do
tell event.room to
call "loop"
end
end
-> This does exactly what I want: every frame runs the current room's “loop” event! Now i just need to put all of each mini games' logic in the room’s “loop” event handler!
Now I'm ready to go creating the individual rooms. This should be fun
Stay tuned for more updates!
More Dev Log:
The game is complete, so I thought I'd reflect on some of the challenges and approaches that I took.
Challenge #1) Handling NPCs
I want to be able to interact with the NPCs and for them to move during the game events to make the game feel less static. For this I ended up just having a generic NPC sprite that I used for everything, and i had a few functions inside of it that i could call within the individual games. For instance, to move the sprite, I used the code below. Inside of the game room, I just need to define NPC_dx and NPC_dy, and then emit "move_NPC", which will move all NPCs in the room the direction i want. Finally i have another function "move_NPC_head" that will simply move the sprite above the body along with it.
NPC Code:
on move_NPC do
// code for moving NPC
target_x = event.x
target_y = event.y
// MAKE SURE TO DEFINE DX AND DY BEFORE CALLING THIS FUNCTION!
target_x += NPC_dx
target_y += NPC_dy
// make sure NPC doesn't move off screen
occupied = solid target_x,target_y
if target_x<0 then
occupied = 1
elseif target_x>24 then
occupied = 1
elseif target_y<0 then
occupied = 1
elseif target_y>14 then
occupied = 1
end
// swap tiles to move NPC to another space
if occupied==0 then
NPC_sprite = event.tile
// make current space empty tile
tell event.x,event.y to
swap NPC_swap_tile
end
// move NPC tile to target space
tell target_x,target_y to
last_tile = event.tile
swap NPC_sprite
end
call "move_NPC_head"
end
end
I don't want all of the bodies and heads to look identical, so i can create alternate body sprites and give them the following PulpText:
on any do
mimic "NPC_body"
end
Done! Here's what the result looks like in practice setting NPC_dx to +1 or -1 depending on who's winning the tug-of-war and setting NPC_swap_tile to the rope tile:
Note that this was during development, so you can see a number (here the value tracking how hard each team is pulling) in the upper-left for testing/debugging. You can add this easily with the "label" command, but it only works within the player's "draw" event:
on draw do
// FOR DEBUGGING, DELETE AFTERWARDS
if event.room=="tug-of-war" then
label "{pull_counter}" at 0,0
end
end
Challenge #2) saving progress
In my game, I'm using game states which i track with the "gamestate" variable. This is how, when you enter the areas that you visit repeatedly, the game knows what the dialog should be, and where to send you next.
I update the game state after each minigame, and i use this as a convenient way to save the player's progress. On my transition screen which the player is sent to in between game states i have :
on exit do
store "gamestate"
end
-> this saves the game state to the device, which I can check again when the game starts.
I also need to restore the state, so on "start" i have:
on load do
restore "gamestate"
end
Now the game state is stored on the devices memory so that if the player dies or leaves the game It'll pick right back up on the game state that they left off on!
Finally, on the title screen that the player starts on, I have the following PulpScript:
on exit do
if gamestate!=0 then
ask "Would you like to continue where you left off?" then
option "continue" then
// do nothing
end
option "new game" then
gamestate = "start"
end
end
end
end
-> This will give the player the option of continuing from where they left off, or optionally reset the game state to start from the beginning of the game.
I hope you guys enjoy the game!
-Drew