Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Post What's on Your Mind

SDL doesnt let you use src rects that are negative or out of bounds, so i spent today making a camera, then editing the drawing system to automatically correct out of bounds src -> dest conversions, keeping it correct across any framebuffer size (logic is done at 240x136, framebuffer can be any resolution, and display is 960x544)

EDIT: turns out if the srcrect is larger than the source image in both width and height everything breaks
busy procrastinating fixing the camera cus i cant figure out whats wrong for the life of me, but i also cant be bothered implementing animated autotiles and stuff hmmm
 

Fayte

Sponsor

Mega Flare":1cb256af said:
Fayte":1cb256af said:
Got my 3 promo cloud and 27 packs.. really wanted to pull a foil Terra, but i didn’t.
LOL bought three kits? Canada isn't getting pre release. We getting a post release lol

Yeah i just bought 3 kits.. got my playset out the way. That sucks you guys got stiffed i thought they fixed that issue of not everyone getting stuff at the same time.
 
Sometimes I wish functions like that would just default to a size that does work if you put negative in.

But at the same time sometimes those defaults are the source of much confusion and annoyance too, especially when my code shouldn't really be producing negative space in the first place.
 
If you're going to try to convince us you're a legit user maybe don't necro-post a thread and with a complete, quoted product listing title - Walmart.com's page titles probably aren't the best source of information for what westerners enjoy.
 
ZenVirZan":21lyvszw said:
EDIT: turns out if the srcrect is larger than the source image in both width and height everything breaks
haha even though i made literally everything in my graphics calculations a double and cast at the end, my scaling multiplier for src.x -> dest.x & dest.width reductions was somehow an int

zen what the fuck
 
ZenVirZan":1zg6z6x1 said:
i made literally everything in my graphics calculations a double and cast at the end
Hold on I'm just going to stab out my eyes.

There's moments I find it difficult to justify using a float for graphics (which is the basic unit for modern GPUs), I've never found a justification for using double.

The only times I use doubles are for compile-time constants or values, in which case I use the double just to get good precision on my floats or fixed-point integers.
 
Xilef":iipig6vb said:
ZenVirZan":iipig6vb said:
i made literally everything in my graphics calculations a double and cast at the end
Hold on I'm just going to stab out my eyes.

There's moments I find it difficult to justify using a float for graphics (which is the basic unit for modern GPUs), I've never found a justification for using double.

The only times I use doubles are for compile-time constants or values, in which case I use the double just to get good precision on my floats or fixed-point integers.

I don't know if it's still true, since Microsoft has redone a lot of the graphics backend post buyout, but Minecraft's rendering system was very poorly conceived, and everything was rendered relative to 0, 0, 0. This had a minimal effect on normal play, but it became noticeable if you did something like use a mod to teleport a few million blocks from center (approaching the old far lands, which no longer exist). You would start seeing issues caused by coordinates not being specific enough, like so:

Farlandsblockmovement.gif
 
Glitchfinder":1vv8ljsq said:
I don't know if it's still true, since Microsoft has redone a lot of the graphics backend post buyout, but Minecraft's rendering system was very poorly conceived, and everything was rendered relative to 0, 0, 0. This had a minimal effect on normal play, but it became noticeable if you did something like use a mod to teleport a few million blocks from center (approaching the old far lands, which no longer exist). You would start seeing issues caused by coordinates not being specific enough, like so:

Farlandsblockmovement.gif
This was fixed a while ago. However, you shouldn't just use doubles because you made a crappy rendering system - the Minecraft example is at extreme distances where players are unlikely to be, using doubles to solve an issues that 0.01% of the player-base go out of their way to experience is silly, just wastes performance for the other 99.99%.
 
Xilef":36zvyesw said:
Glitchfinder":36zvyesw said:
I don't know if it's still true, since Microsoft has redone a lot of the graphics backend post buyout, but Minecraft's rendering system was very poorly conceived, and everything was rendered relative to 0, 0, 0. This had a minimal effect on normal play, but it became noticeable if you did something like use a mod to teleport a few million blocks from center (approaching the old far lands, which no longer exist). You would start seeing issues caused by coordinates not being specific enough, like so:

Farlandsblockmovement.gif
This was fixed a while ago. However, you shouldn't just use doubles because you made a crappy rendering system - the Minecraft example is at extreme distances where players are unlikely to be, using doubles to solve an issues that 0.01% of the player-base go out of their way to experience is silly, just wastes performance for the other 99.99%.

Actually, a lot of Minecraft coordinates were being processed in doubles at the time, which is why I brought it up. I never said it was a good use case, just that it was a use case.
 
Xilef":3azpra1b said:
Gawd Minecraft is badly implemented...

Having helped implement colored lighting mods multiple times, you have no idea. It went years with half the lighting/rendering code active, making calculations, and then defaulted. So many wasted processing cycles. The source had so much evidence of notch attempting to implement features, not being able to get them to work the way he wanted, and then just defaulting the results of calculations to something that "worked" without actually commenting the calculations.
 
Glitchfinder":2uf4nzou said:
Having helped implement colored lighting mods multiple times, you have no idea. It went years with half the lighting/rendering code active, making calculations, and then defaulted. So many wasted processing cycles. The source had so much evidence of notch attempting to implement features, not being able to get them to work the way he wanted, and then just defaulting the results of calculations to something that "worked" without actually commenting the calculations.
I've also gone through the renderer code a few times, I do have an idea and it really stresses me out to think about.

The way transparent surfaces are handled is my trigger.
 
Xilef":wiyfj26f said:
Glitchfinder":wiyfj26f said:
Having helped implement colored lighting mods multiple times, you have no idea. It went years with half the lighting/rendering code active, making calculations, and then defaulted. So many wasted processing cycles. The source had so much evidence of notch attempting to implement features, not being able to get them to work the way he wanted, and then just defaulting the results of calculations to something that "worked" without actually commenting the calculations.
I've also gone through the renderer code a few times, I do have an idea and it really stresses me out to think about.

The way transparent surfaces are handled is my trigger.

Out of curiosity, /is/ there a better way to handle transparent surfaces in GL, besides z-sorting and alpha blending? I'd certainly hope so, but I haven't found it yet. Assuming I want to be able to stack an arbitrary number of them.
 
Xilef":am4mb9ie said:
ZenVirZan":am4mb9ie said:
i made literally everything in my graphics calculations a double and cast at the end
Hold on I'm just going to stab out my eyes.

There's moments I find it difficult to justify using a float for graphics (which is the basic unit for modern GPUs), I've never found a justification for using double.

The only times I use doubles are for compile-time constants or values, in which case I use the double just to get good precision on my floats or fixed-point integers.
fair enough, ive swapped everything over to floats instead.

also do you happen to know how inefficient it is passing functions as arguments via std::function? its only being called a few times per frame (under 5) but im wondering how bad this practice is (this is my first c++ project)
 
This programming assignment is going to kill me. The deadline is midnight tonight. I've still gotta produce a test plan and write a report about if/else statements and case statements and how other languages handle them.

The main programming is done, there is a few small kinks that to be honest aren't necessary for me to iron out. Oh hey. It's 5 am and I have class at 9:30 whelp...

I'm going to be so dead in class...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top