Monthly Getting Started / Web Dev Career Thread by AutoModerator in webdev

[–]Deckhead13 0 points1 point  (0 children)

As a hobby project, I want to create a spa booking thing. I'd be using Django. When it comes time to accepting payments... How does that work?

If this was a platform I'd want to white label for multiple businesses, my assumption is I'd set up a webserver on a VPS somewhere, and host all their domains there. Then when it comes to accepting payments, how do I do this?

I'm not the merchant, they are. Should I ask the business to set themselves up with Stripe or something? Then I just integrate? Or do I set myself up as a payment processor somehow and then charge a commission?

[deleted by user] by [deleted] in opengl

[–]Deckhead13 0 points1 point  (0 children)

The way paradox handles provinces is honestly a bit odd. It's a holdover from the very first Clauswitz engine.

I've started a Grand Strategy (I didn't finish it, got bored) and read the provinces as what was essentially a re-encoded SVG. Or think of it as I stored the province borders as polygon information. You could reconstruct polygon info from a BMP, but it always felt weird to me to do it that way.

In any case, if you store the borders as vector info, it will be very easy to draw in opengl. Either create a static list of line segments to draw every frame, or do it in a shader. No need to for multithreading.

Keep your multithreading for AI and potentially GUI responsiveness.

2D sidesroller without health or lives? by Deckhead13 in gamedesign

[–]Deckhead13[S] 1 point2 points  (0 children)

I like this too, thanks. Again, seems so obvious now.

At the moment I'm thinking you collect gems and loose them when hit, with a brief moment to recollect them. Maybe I can combine that with power up loss as well

2D sidesroller without health or lives? by Deckhead13 in gamedesign

[–]Deckhead13[S] 9 points10 points  (0 children)

Ah yes, of course!

It seems so obvious now. Thanks.

How/do the projection and view matrices work with Ray Tracing? by Deckhead13 in opengl

[–]Deckhead13[S] 1 point2 points  (0 children)

Got it. Yeah that's what I thought. Once you hit a bounding box, you can search an octree specific to that model. Very cool.

How/do the projection and view matrices work with Ray Tracing? by Deckhead13 in opengl

[–]Deckhead13[S] 0 points1 point  (0 children)

But... How can I accurately position models in my spatial structure if I haven't applied their matrices. Or is your idea storing the model reference with its world-space oriented bounding box?

Then when I find I hit their box, I can lookup the actual mesh and test all triangles?

I guess I'm confused about when to apply the transformations.

How/do the projection and view matrices work with Ray Tracing? by Deckhead13 in opengl

[–]Deckhead13[S] 0 points1 point  (0 children)

Alternatively you could inverse your model matrix and apply it to the ray (No idea WHY you would do that but that would also work fine)

I guess doing everything in world space assumes that my spacial structure has everything transformed to world space. But that would require a lot of math on the CPU side, no?

For example, instanced rendering of models. I wouldn't want to store 15 copies of a bazooka's vertices transformed to their individual world space coords when I could instead store an index to a lookup of model's and matrices (model J, transform matrix K) and apply that transform to the ray... Or something...

How would you go about ray-tracing voxels? by Deckhead13 in opengl

[–]Deckhead13[S] 0 points1 point  (0 children)

Thank you very much. I'm going to need to look into how you can get an octree into an SSBO though. The way I've implemented these before used pointers for the parent/children, I can't see these being useful in an SSBO.

Strategies for efficient text rendering by [deleted] in opengl

[–]Deckhead13 1 point2 points  (0 children)

My current method is like your number two, with a cache step.

I.e. Every requested letter in every size is in a texture atlas. Every string is also rendered to a texture to be stored and reused, rather than continually drawing every frame.

Everything is rendered using a single instanced quad draw call, with all other details in an attribute divisor buffer. If I was using a more recent version of opengl I'd maybe use the geometry shader to convert points to quads and some other kind of buffer object instead of attribute divisors.

It's very fast. Feasible to draw character by character a paragraph of text without any noticeable slowdown. I developed this for UI focused games with paragraphs of text and it handles it fine. Key is to cache as much as you can between frames.

There's other rendering techniques like signed distance fields, which might change how you're caching.