Image Map Image Map
No More Results
About neilobremski

Basic Information

Age
37
About neilobremski
Biography:
I started programming in GW-BASIC by copying and manipulating example listings given to me by a friend. I didn't have access to any books or other references so my initial education was trial and error alone. It was enough to hook me and now I find myself looking back fondly on those early days of struggle and excitement.
Location:
Seattle, USA
Interests:
Walking, Writing, Reading, Music
Occupation:
Computer Programmer

Signature


Statistics


Total Posts
Total Posts
49
Posts Per Day
0.19
General Information
Last Activity
June 23rd, 2017 08:51 AM
Join Date
October 9th, 2016
Referrals
0
Home Page
http://gibdon.com/
View neilobremski's Blog

Recent Entries

8 Bit Twice Shy aka Size Does Matter

by neilobremski on June 23rd, 2017 at 08:51 AM
I've been working with 8-bit fixed point for pre-calculated SINE and COSINE values. One compromise of this is that the maximum positive value is only 127 which means I can only represent 127/128 (0.9921875) and not a whole ONE.

Recently I encountered an odd bug where viewing my tile map from a 270 facing caused the Z coordinates of all objects to be reversed. My test map and player position looked like so:

Code:
P
 P <
And thus I expected to see

Read More

Categories
Asm

Square Raycast

by neilobremski on June 5th, 2017 at 04:07 PM
Magenta's Maze is a tile-based 3D game but the first version supported general 3D objects and used C's qsort() to depth sort objects by their first vertex value. Although this was flexible, it was unnecessary (again: tile-based) and slow! In redesigning it for assembler, I did away with the generalized 3D. One can still paint 3D objects but the caller must decide the order in which to paint them, rather than the engine accepting an arbitrary amount of objects, polygons, and vertices then figuring

Read More

Categories
3D

Sine here for 7 Bits

by neilobremski on June 5th, 2017 at 02:59 PM
It's time to take the time to make a post to mark my progress. Previously I had mentioned doing sine and cosine multiplications using fixed-point, specifically 10-bit so that the whole unsigned fraction could fit in a single byte. I thought this would be sufficient and it was but it also turned out to still be more than necessary. On top of that, using word multiplications ties up a lot more registers.

So I did two things: first I dropped down to using a single byte to store the entire

Read More

Updated June 5th, 2017 at 03:02 PM by neilobremski ((deleted unused attachment ... apparently larger dimensions cause GIF to be converted to JPG on this blog))

Categories
3D

Fast 16-bit ABS() in X86 Assembler

by neilobremski on May 31st, 2017 at 06:18 PM
I was reading a StackOverflow post on writing an absolute value function in assembler [1] and while the no-branching idea is exciting, I was sad that no 16-bit version was listed. The problem with converting the 32-bit assembler had to do with all of the crazy shifting, which is quite slow on the 8088 if you're doing more than a couple of bits in either direction. The no-branching concept is thus:

Code:
abs(x) = (x XOR y) - y
Where y = 0xFFFF if x is negative and y = 0x0000

Read More

Updated June 5th, 2017 at 02:35 PM by neilobremski

Categories
Asm

Simplifying Backface Culling

by neilobremski on May 23rd, 2017 at 01:43 PM
The process of culling backfaces is simply checking the visibility of one-sided polygons based on whether they are facing towards the camera / player or away. If they are facing away then it is a back-facing side, rather than front-facing, and must be skipped during rendering. To determine this, I must calculate a normal vector. Every 3D triangle has two of these normals: one points outward from it and one points inward. The one you get depends on whether the calculation is made from vertices going

Read More

Updated May 23rd, 2017 at 01:45 PM by neilobremski (Note about negating Ny)

Categories
3D