Game Dev : hello world! 1/30

Lets goooo! You can try the hello world project right now!

Game Dev : hello world! 1/30

Ok so the first task for today is to get my tiny prototype set up in someway to easily share.
I know that my last post went on about just getting things done and doing them simply but the truth is I am also trying to document my development and thought process at the same time.
Since the problem being solved is slightly more complex, the requirement and tools might have some added complexity.
Anyways, I will set up this github repo for the tracking and displaying of games on each day.
I would prefer to not use Github since last month the suspended my account with no reason and no notice. I am solving the code issue in other ways.
I could set up Github to be the downstream of my locally hosted codebases but this is kinda the point of my game design challenge - to limit the scope!
I dont need a mirrored repo setup to move forward. Lets limit the scope of increasing the complexity here to just one thing: a place to store code that is visible and allows me to show games with github pages.


Hmm, I just learned of an "awesome pico-8" page. For some that dont know, an "awesome" page is a collection of software projects that allow you to view what the community has already created in that regard. You can easily find repos for awesome anything. Anyways, back to the flow.
I want to develop the game, test locally, write a blog post and include that days version in the blog post but having it hosted on github pages at a certain branch. I just need to find a way to export the game to a github page and have it pick up the pico8 game somehow. Ill need to read the export docs on pico8.
Or maybe even better I deploy to itch.io and then provide an embed link here. I think I prefer that to Github to be honest.


Ok, I have done some digging around and this is what I found. I can get a working version on Github pages but this will only ever be able to show the latest days version. I suppose I would want one for each day? Maybe I will do a directory for each one instead of a branch.
Anyways, none of this is actually me writing the game and learning that. I hope this is actually moving me forward rather then a distracting side mission.

I can also now upload it to itch.io, which is a platform for indie games and might be a better fit long term.

Now lets see how my blog likes the embeds from each site. Ideally I want you to be able to play the game from within this blog post

OK great these seem to work! What you see above is the starter project I have coded yesterday. Its bare bones and so far I am just exploring what is possible with the engine.
I will share the code openly. Youll find it very easy to understand, maybe even if you have never read code before. Its very minimal. See how much you can try to understand!


pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
function _init()
	cls(0)

--ship position
	ship_x=64
	ship_y=64
end



function _update()
	cls(0)
	handle_input()
	spr(4,90,90)
end


function _draw()
	ship = spr(003,ship_x, ship_y)
	draw_coords()

end

function draw_coords()
	print("ship_x:"..ship_x, 8)
	print("ship_y:"..ship_y, 11)
end


--movement
function handle_input()
	if (btn(0) and ship_x>2) then
		ship_x -= 3.0
 	end

 	if (btn(1) and ship_x<119) then
		ship_x += 3.0
 	end
 
	if (btn(2) and ship_y > 2) then
		ship_y -= 3.0
	end
 
	if (btn(3) and ship_y < 121) then
		ship_y += 3.0
	end
	
	if btn(5) then
		spawn_bullet()
	end
end

function spawn_bullet()
 bul_x = ship_x
 bul_y = ship_y
	spr(002,bul_x, bul_y-8)
end


__gfx__
00000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000ee000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000bbbbbbbb00065000040ee040000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000b00bb00b00055000040ee040000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000b00bb00b0005500004e88e40000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000bbbbbbbb0005500004e88e40000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000b00b000000000000099000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000aa000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000010001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000300000200000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
000100000000000000000000000000000170500000000000000001a05000000110500000000000000001f0500000000000000001e0500000000000000001b0500000000000270500000000000000000000000000


I now have the options of either github or itch.io. Thanks to NerdyTeachers.com for their guide on how to export it for Itch.io
I will proceed to deploy things to itch.io since it is a platform for games, You can get the code as well and there is less risk of being deplatformed like what happened the other month on Github. Apparently I wasnt the only one impacted

Anyways, today (as the first day of this challenge) will hopefully be one of the few days where most of the progress is on setup and config. House cleaning is inevitable, especially if I want to document and share the process but I have already had a sample of how easily you can overthink, solve problems that dont exist

See you tomorrow!