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

Raycster: improve sprite rendering and more #704

Merged
merged 7 commits into from
Feb 21, 2023

Conversation

Gadgetoid
Copy link
Contributor

  • Rip out scanline rendering of sprites and use stretch_blit_sprite and screen.clip instead, this isn't really faster but it's a little less painful to look at.
  • Remove tile visibility map, it did nothing much but introduce pop-up bugs
  • Add some very minor optimisations
  • Delete some dead code
  • Add and load "wasp" sprite

@Gadgetoid
Copy link
Contributor Author

Gadgetoid commented Aug 17, 2021

  • Add wasp sprites from @ali1234
  • Merge bug spray entities with "map_sprites" entities
  • Handle spraypaint as a sprite, so it's clipped behind walls
  • Handle collission between sprites/walls/wasps
  • Wasps follow player, collide with walls, take damage
  • Spray damages wasps
  • Wasps damage player
  • "Game Over" condition
  • Add player velocity to spray

TODO

  • Bug spray doesn't feel like it's coming from the can, doesn't start small enough and doesn't swell into clouds quite so well as it should
  • Add bug spray sprite directly into spritesheet
  • Fix floating point crashes
  • Wasp damage/death animation
  • "Wasps left" indicator?

- Rip out scanline rendering of sprites and use stretch_blit_sprite and screen.clip instead, this isn't really faster but it's a little less painful to look at.
- Remove tile visibility map, it did nothing much but introduce pop-up bugs
- Add some very minor optimisations
- Delete some dead code
- Add and load "wasp" sprite
* Make sprite textures an enum
* Swap between wasp/environment spritesheets
* Generate random wasps
* Add explicit size to "sprite" struct for scaling spray
* Add spritesheet offset and transform calculation for 8 directons of wasp facing
* Merge bug spray entities with "map_sprites" entities
* Handle spraypaint as a sprite, so it's clipped behind walls
* Handle collission between sprites/walls/wasps
* Wasps follow player, collide with walls, take damage
* Spray damages wasps
* Wasps damage player
* "Game Over" condition
* Add player velocity to spray
* Tweak spray to scale against MAX_SPRAY_HEALTH correctly and look like it's coming from the nozzle
@Daft-Freak
Copy link
Collaborator

Fixed the build 😄

@Gadgetoid
Copy link
Contributor Author

I would have totally got 'round to that, if I could just stop being ruthlessly obsessed with my blog CSS and HTML for ten minutes 😆

Thank you!

@Daft-Freak
Copy link
Collaborator

Hah, I'm definitely not using 32blit "maintenance" as an excuse to avoid fixing my own stuff.

BTW, I played some games did some testing with the current code to maybe move towards doing an actual release.

@Gadgetoid
Copy link
Contributor Author

I think we are rather overdue a release! I'll reserve some time one evening to try and draft up some notes.

@Daft-Freak
Copy link
Collaborator

Release notes are the main reason I didn't do it myself 😆

Also assuming you want to merge this before someone looks at #744

@Gadgetoid
Copy link
Contributor Author

Ooof I thought about that last week - not sure if we:

Add unit tests for actual proper coverage and spit the SDK wholly from the distribution of 32blit games.

OR

Add a list or manifest or submodules (or whatever other technique is in vogue at the moment) of projects to be cloned by the workflow and built against the SDK automatically as a means of CI.

The latter feels like it would be reproducing your build box, could be non-required test and used to detect the impact of (some) breaking changes more directly.

Kinda feels like we should do both 💀

@Daft-Freak
Copy link
Collaborator

I was mostly thinking that the examples should demonstrate some SDK functionality in a simple enough way. TBH they're a large amount of the "documentation" right now.

raycaster (and voxel) don't seem to be a good fit for this. (Also voxel has a giant data file that slows down the build a bit)

Anyway, should probably discuss this over there.

@Gadgetoid Gadgetoid merged commit 8c9cab0 into 32blit:master Feb 21, 2023
@Gadgetoid
Copy link
Contributor Author

Can progress this in some future project, it's been in PR hell for too long! Thanks for the assist.

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

Successfully merging this pull request may close these issues.

2 participants