Samplay - Pulp game devlog journey

Hi every one just wanna have a fresh start an create a game vlog of my progress in my pulp projects. You can find some of my realisation on My games

I just start a new project where your a guy who gonna sluther some mob ! To kept being motivate i thought of start this game devlog that would be use for other projects also

Progress report 1 : 28-29 March 2024 : Fresh start.
Thought a lot of work i didn't have much time to get new game since Pulpmin release in early January.
Pulpmin trailer

That was 2 levels (over 9 tresor to find) of the 4 level i wanted to do, the next one would have be next with V1.1 and V1.2 but had much going on for doing this with my planification. Darn over 3month pass and i didn't have time to do it...

I need a fresh new start and kept be motivate on it !

Reuse and mixing ideas
I had some idea of reusing to of my previous game gameplay and growing on it..
Ski play

Centipulp and Skiplay would be surely use for inspiration for this new game.

Multi tiles player
Here's what i begin from.
A guy who have a hat, and weapon on his arms.
Each of is a tile link to the hero.

on enter do
	leftObject = "gun"
	rightObject = "bomb"
	topObject = "hat"

each of will be move in the update function depending of the direction

on update do
    /////code before for blocking solide black tile left and right///

    ///code for moving multitile, and remove it
    playerX = event.x
	playerY = event.y
	objy = playerY
	tell playerX,objy to
		swap topObject
	objx = playerX
	tell objx,playerY to
		swap leftObject
		if event.dx==-1 then
			if blockedSolid==1 then
				frame 1
	objx += 2
	tell objx,playerY to
		swap rightObject
		if event.dx==1 then
			if blockedSolid==1 then
				frame 1
	// clean old objects
	// localise old pos
	objx -= event.dx
	// remove old top
	tell objx,objy to
		swap white
	solidis = solid objx,playerY
	if solidis==0 then
		tell objx,playerY to
			swap white
	objx += 2
	solidis = solid objx,playerY
	if solidis==0 then
		tell objx,playerY to
			swap white


I didn't quite refactor yet... but for optimal performence you need to calculate where you tile are to remove it when it move (emit apply to every tile each time so i prefer to use it the less possible)

For the rest it's a shooter, but basically i think of separate it in several room where you will have to slaughter every mob...

But there is much to do yet.
Happy to have shared this start :smiley:


Progress report 2: 30 March 2024 : Exchange of fire and counting .

Added life gestion, enemy shooting, enemy counting on the screen and a bouncing enemy.

To simulate the player hit box you have to kept track of player x and y coordinate every time it move. Then it could be compare from other tile. If anyone have another way to kept track from other tile player coordinate i'm surely interested

UI element like number of enemy is use as tile not label. Label is always use at draw from player and draw is call every frame. So i had to get 1 to 99 in one tile that work like a counter.
Score perhaps is a label because it surely could get very high score

Finally i try on device, and it seem working ok delta somebug from outbound with negative life of player for example.

Progress report 3: 31 March : New enemies and autonomous tiles

Today i had a bunch of new enemy : moving blobs, teleporting wizard, diagonal shooter, other shooting a solidify able shoot.

All of those tile are possible to get to be copy and have autonomous behaviour.
For example here a multiple wizard fight :

As you can see when you kill all the enemy in the screen you got to a new level !

I'm thinking of new enemy
Had boss, have a good progress in the difficulty, i think the game calibration will be hard
Object system
Score Bonus system and a lot of stuff..

Had a second weapon that would be consumizing energize.
Thinking link that to cranking effort...

about programming it was quite challenging to have autonomous tile not been mixing with other tile from same type...

It's running good on device also for now

Progress report 4: 1 April : Bomb & Boss

I started to really want to see what could be the bomb wear by the player would be today : so i create another projectile land by the hero : a bomb.
It get sticky and explode after time in the four direction.
I also had new bouncing left and right enemy that can shoot front and diagonal shoot


I also had my first boss fight that is a grander tile and a mix of all the other shoot with several life for destroy it.
Reuse of script (with some tuning) and also use mimic function can get time..
I use the room script for initiate the boss life. as you can see the counter logo life boss is different than enemy counter logo

Also i have a die animation and a restart with score erase and life get back to start number(would have to make a highscore on screen or somewhere)

I can see more use of the bomb for new enemy and other stuff.
I definitely want to get crank usage for powering the second weapon (B-weapon) like bomb..

and so i can thing the game structure would be 10 level (one is boss) structure for several zone...

Progress report 5: 6 April 2024 : Feeling of bug and begin of the second zone

The last few day was pretty busy so i advance more slower than between the last progress report. Firstly since i remark that some crash could happen on device and i'm not quite sure what is it.
It's sometime an E0 Playdate Error e0 - Playdate Help and other time an update fonction saying the crash is due to a update at around line 3000 ... i'm not sure what it could mean..

One thing I thought was counting the moving tile per frame and shift the action to them next frame
It could release the console, i would have to implem it but i'm not quite sure yet.

New enemies for the second zone

Had a bunch of new enemy and new bullets : enemy bomb and a directional bullet

The directional bullet are link to the direction of the new enemy "arrow guy" and it stop to exist when it touch the player for now.
There is also new enemy that could mirroring your bullet when they are touch in there other frame
there is several different mirroring enemies that have different rithm of changing frame and shotting or not abilities.

I gonna looking for a way to differentiate zone, could be in screen or a mention of the zone and level in the ui...

I had some music and sound sketching for testing while dev . As i like music and sound creation so much it must be for me a little part of my creation process :slight_smile:

Progress report 6: 7 April 2024 : Mine and background tile

Like i said i wanted to find a way to have a background tile for differentiate the level.
So i had a global variable BackGroundTile that is call instead of all swap white as swap backGroundTile
This variable is setup with the name of the tile in the room script.

I added also mine that when shoot are activate as bomb and rock that only been affect by explosion.
Those "object" and the new enemy that i show i progress report would be a lot in the second zone (level 11-20)


Extra: I think found why had E0 error on device : sometime when a moving enemy is cercle it was calling recursively moving function directly so i had a wait surround it instead. The E0 was declare after a bit of game freezing so should be the recursive call..

Now there is sometime error unexpected in play and it's very random crash
It could be in any room at time... :
Update error: ?: -1: attempt to perform arithmetic on a nil value
stack traceback:
?: in upvalue '?'
?: in function <?:3743>

Progress report 7: 14April 2024 : the random crash investigation and optimisation

This week i did some investigation around this crash, it was very bothering me.
Until today i didn't find a begin of solution for this :

Update error: ?: -1: attempt to perform arithmetic on a nil value
stack traceback:
?: in upvalue '?'
?: in function <?:3743>

Firstly i was thinking it was only on when i try on the device...
and that was link to the number of sprite on screen moving because of the number of variable i use, for some randomize calculation for example i was doing like :

randres = 1
rand = random 1,10
randres /= rand

But i found a good surprise, random x,y is considerate as a number so i can do it in one variable !

randres = 1
randres /= random 1,10

So optimize all my random calcule for each tile which is quite existing in my code
One variable away of all the tile is still a good progress.

But it didn't get the bug out !

After i rework my shoot, that was using emit each time player try to shoot a new bullet (a new bullet to be shoot need to have no more bullet in screen)
So for someone clicking a lot on A button it could use some cpu (remember that an emit function is calling each tile of the screen !)

So i prefer use logical and calculate the max bullet time on screen (from shoot to the overside black wall) until a new bullet could be use.

That didn't work out.

Finally after some time of playing i notice it was most of the time when stuff where gonna explose on screen :
Sometime in my code frame where over the maxframe existing of my tile because explosion could have a recall from a wait base on the all tile...
So i had a lot of prevent when tile is now switching on explode to stop in the code by a done in the script in the case...

The crash happen less on less each time i prevent more now the game is playing well in fps (around 20) with the new optimization... like in this example on device it's 20fps
screen capture from device with fps counter


You can also see i implement a d-pad on the screen :
My playdate device A button is less clicky than before :smiling_face_with_tear: so i add down to shoot as well...

My A button of my last playdate had die so i send to Panic that replace it , it was quite fast ! maybe i'll need to do it again with this one but for now i just have to press it a little more than the useall so it's ok.

here's a in game sound video of zone 2 :

Quite happy with the music of this zone 2..
you can here in game sound, second zone music, game over and little of the basic loop of the first music of the game at the end

I want to stabilize the game as much as i can and continue doing more new level and a second boss soon enought