Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples maintenance #3

Open
bhperry opened this issue Aug 13, 2024 · 7 comments
Open

Examples maintenance #3

bhperry opened this issue Aug 13, 2024 · 7 comments

Comments

@bhperry
Copy link
Contributor

bhperry commented Aug 13, 2024

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:

  • amidakuji
    • Fails to run
  • go-jetpack
    • Nil dereference when running from wrong directory (loadSprite is doing something silly when err != nil)
    • Jetpack gopher is a little glitchy when it does run, doesn't stay in view.
  • parallax-scrolling-background
    • Fails to run
  • seascape-shader
    • Fails to run
  • tilemap
    • graphics disappear shortly after loading

General note:

  • community examples don't all use the main.go convention. Would be nice for all examples to have the same main entrypoint file.

Guide

  • 03_moving_scaling_and_rotating_with_matrix + 04_pressing_keys_and_clicking_mouse + 05_drawing_efficiently_with_batch
    • Blank green background, no sprites on screen

Platformer

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

Shader

  • exposure
    • Fails to run
  • fastblur
    • Fails to run

Lights

  • Lights not showing up
@bhperry
Copy link
Contributor Author

bhperry commented Aug 13, 2024

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
Copy link
Contributor

dusk125 commented Aug 15, 2024

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
Copy link
Contributor Author

bhperry commented Aug 15, 2024

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
Copy link
Contributor

dusk125 commented Aug 22, 2024

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
Copy link
Contributor Author

bhperry commented Aug 22, 2024

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
Copy link
Contributor

dusk125 commented Aug 22, 2024

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
Copy link
Contributor Author

bhperry commented Aug 22, 2024

I'm good with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants