gopxl / pixel-examples

Examples for the Pixel game library
MIT License
3 stars 4 forks source link

Examples maintenance #3

Open bhperry opened 3 months ago

bhperry commented 3 months ago

Noted some issues with some of the examples while testing out the pixel v2 updates. Noting them here for future reference. We should go through and fix or remove broken examples.

Community:

General note:

Guide

Platformer

Not really a bug (I think), but sad that nothing happens when you reach the portal

Shader

Lights

bhperry commented 3 months ago

the Fails to run examples all output things like this:

# command-line-arguments
.\main.go:38:2: undefined: CenterWindow
.\main.go:45:21: undefined: LoadFileToString
.\main.go:60:2: undefined: EasyBindUniforms

Which as far as I can tell are all references that exist, haven't dug into it further.

dusk125 commented 3 months ago

It would also be nice to have a single assets directory that all examples can pull from. This would cut down on any duplicates and could give people adding new examples a repository of things to use instead of having to add their own.

bhperry commented 3 months ago

And along with that, would be nice to have asset loading utilities set up such that you can run them from arbitrary directories and it will know how to reference the correct relative assets path.

While testing these I kept having to cd into each subdir for the ones that load pictures. Would be really nice to be able to sit at the root and reliably go run community/<example>/main.go for all of them

dusk125 commented 3 months ago

Another thing I'm noticing that I'm not sure how we should address.

Since Pixel and its examples are separate repos, we currently have to release a new version of Pixel before we can add an example. We could potentially have pixel-examples grab whatever's latest from main, but that also means that we'd have to merge a Pixel PR first, then open the example PR that goes along with it.

bhperry commented 3 months ago

Another thing I'm noticing that I'm not sure how we should address.

Since Pixel and its examples are separate repos, we currently have to release a new version of Pixel before we can add an example. We could potentially have pixel-examples grab whatever's latest from main, but that also means that we'd have to merge a Pixel PR first, then open the example PR that goes along with it.

What I tend to do in these types of scenarios is open both PRs at once, and link one to the other as a dependency (just as a comment like required PR: <link>. Get reviews on both and merge together.

dusk125 commented 3 months ago

Yeah and I guess, how do you feel about having pixel-examples target pixel/v2@main instead of having to roll a new release before merging the example PR?

bhperry commented 3 months ago

I'm good with that