Posts

0x400000

 0x400000 : The nearest power of 2 (rounded down) when taking the max value of a signed 32 bit integer and dividing it by 256.      ROUND_DOWN_TO_NEAREST_POWER_OF_2(  I32_MAX_VALUE / 256 )  Why? Working on rendering algorithm where I want to do floating point math using discrete units. In order for this to work, I need to upscale all of my 1x1 pixel tiles into larger grids. Since I have a grid of 256x256 "pixel sized tiles" on my "canvas user view" (cuvipix), I can get away with scaling up each pixel by a factor of 0x400000 before I start doing my math. I choose to use the max value of SIGNED integer rather than unsigned because everything is eventually getting converted to 32 bit float. And since floats can go negative, trying to partition the max value of a SIGNED int may result in TOO MUCH addressing space. We don't want to lose precision when we convert of discrete integer fractions into floating point if we can help it. Hmm... Now that I think of it......

How to compile C without an IDE

  How to compile C without an IDE. Specifically Notepad++... Come visit my stream on twitch and I will walk you through it. www.twitch.com/kanjicoder If you can, come prepared with: 1. Notepad++ installed 2. Git for windows installed 3. GCC Downloaded But if that's too much work, just drop on by and I'll walk you through all of that setup too. -John Mark Isaac Madison

What Movie : How Much For The Cat? How Much You Want For Him? Gangster Pet.

You are looking for "Keanu" . Welcome! You can thank me by checking out: 1. www.twitch.com/kanjicoder 2. https://www.etsy.com/shop/DekTen  I saw some clips in a youtube video and had no clue where it came from.  The movie is "Keanu". https://www.imdb.com/title/tt4139124/ "How much for the cat?" "Look who's up from their nap" "Oh, look whos up from their nap" "Cute Cat" "Whered you getem?" "How much you want for him?" "Actually he is" "We in the market right now for a gangster pet" Google searching what they said in the clip didn't help me find it. So I figured I'd make a blog entry and see if that helps.

Fractal Auto Tile Engine - The Basics And Current Progress (AAC2020)

Image
Trying to figure out how I can get my image to show up when I google search for "Fractal Auto Tile Engine". Figured I'd just make a blog post here and add an alt tag and see what happens. The basic idea behind my "fractal auto tile engine" is that the sub-tiles of an auset(auto-tile-set) are drawn with "hyperpixels" instead of normal "pixels". A "hyperpixel" can be a "pixel" or it can be a "tile". When the hyperpixels are "tiles" instead of "pixels" you have a fractal auto tile. Before we can make fractal auto tiles for our Fractal Auto Tile Engine (AAC2020) we need to create NON-fractal tiles. The non-fractal tiles are also known as  "TERMINAL TILES" because they are the last set of tiles you can jump to in the rendering algorithm before you are unable to zoom any deeper into  the level geometry. Currently I've gotten Zoom+Pan working in the FractalAutoTileEngine(AAC2020) but th...

Clean Code Sucks , Make Up New Words!

Lego Naming Prevents Higher Level Thinking : GunPowderedPoweredLargeIronBallLauncher <<-- Clean Code Cannon <<-- Terse Invented Concept In Your Code If you agree. Check out my coding stream. I do Data Oriented Game Engine Design. (DOGED) www.twitch.com/kanjicoder www.twitch.com/kanjicoder //:2021_02_23:===============================================:// WindowExternalVisibilityController ==> BLIND ExtraFlufflyCushionedChair ==> LazyBoy MultiBarrelRotatingMiniCanno ==> GatlingGun LargeIronBallLauncher ==> Trebuchet GunPowderedPoweredLargeIronBallLauncher ==> Cannon You cannot think of "GunPowderedPoweredLargeIronBallLauncher" at the next level of abstraction until you condense the word into a TERSE/SHORT word. Example: You won't invent a "Gauss Cannon" until you STOP CALLING YOU CANNON A: "GunPowderedPoweredLargeIronBallLaunched" Same applies to your code. ...

glTexSubImage2d vs WEBGL's GL.texSubImage2d

Too lazy to dig through all this? Visit me on twitch and I'll help you, since I obviously know! www.twitch.com/KanjiCoder www.twitch.com/KanjiCoder  I could get GL.texSubImage2D working... but when I tried to use the OpenGL version... I noticed an initial offset into the cpu-side bitmap (rgba byte array) was NOT a parameter to the OpenGL version of the function. Here are my fix notes for OpenGL call: QUESTION( via facebook): I can get WebGL's "texSubImage2D" to work... But no luck in OpenGL. The signature for WEBGL includes a "stride". But the OpenGL signature does not. Think that is what is messing me up? ANSWER( answered my own question later on facebook) Answer: Because OpenGL's version does NOT include an initial offset into the data like WebGL's version, you need to do some pointer math on the uint8_t byte array on CPU side that houses your image. I have a 512x512 bitmap on CPU side. I have a 512x512 texture on GPU side. To update a 32x32 sect...

Fractal Auto Tile Game Engine

Image
 Auto tiles, also known as rule tiles, are pretty awesome. They speed up the game developement level design process at LEAST by a factor of 16x without ANY loss in quality of the final product. I am working on an engine that I hope will speed up the CREATION of auto tiles by 16x. I am obsessing over "data leverage". The idea that, if we use our information/data wisely we can speed up BOTH __HUMAN__ productivity and __COMPUTER_PROCESSOR__ productivity. I am done ranting. Here is the imgur post: https://imgur.com/gallery/29G0u6j Inlined as Image: Catch me on twitch: www.twitch.com/kanjicoder