Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Template for a WebGL Guile Hoot game.

A topic by kestrel.wx created 30 days ago Views: 131 Replies: 5
Viewing posts 1 to 3
(+2)

Hi! I'm planning to be making a WebGL  game with Guile Hoot, so I've made bindings to WebGL for this jam. I'm sharing my repository in case anybody else wants to do the same. The bindings aren't quite tested yet, since I haven't got to porting the Breakout example in time, so you might end up in the same ditch as I will. Good luck to everyone jamming!

Repository

Template branch

(1 edit) (+1)

Hi kestrel,

thanks for sharing this! I also plan on using webgl for the jam. I started writing some bindings manually for a visualizer here https://codeberg.org/theottm/sacr3d/src/branch/main/modules/dom/gl.scm but its much better to handle them automatically. 

Happy Jamming

(1 edit)

Hi! I've finally updated the template repository with a working demo and better bindings. There are now utilities to transform Hoot vectors into JS typed arrays,  in order to pass them to WebGL buffers, so it should save a lot of headaches. There is still some work required to make some of the API useful, for example glGetShaderParameter and the like return `(ref extern)`, so there needs to be some JS wrapper around them. Hope you find it handy!

Host

I hope you mean bytevectors because regular Scheme vectors will be very inefficient for buffer data!

(+1)

You're right, I was confused for a long time because I was expecting bytevector literals to start with `#v`. I should probably rename the procedures to convert them to `TypedArrays`.

I've updated this to include a Goblins actor example, although I'm currently unhappy with its implementation, perhaps I will improve this in the future. The example actor draws text strings incrementally on the screen, to provide a scrolling buffer, although there's no storage for offscreen contents yet,  which could be useful.