aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-12-28Allocgatepolygon_wallstslil clingman
2021-10-30Switched to tracking zig-sfml-wrapper as submoduletslil clingman
2021-10-27Update SFML wrappertslil clingman
2021-10-25Mouse look!tslil clingman
2021-10-25Corrected bug in colour blending, chose black instead of transparenttslil clingman
2021-10-22Specialise layers to be either lists of vertices or squarestslil clingman
2021-10-19Fix literal corner casetslil clingman
2021-10-18Working on correct verts then horizs then... ordering and edge casestslil clingman
2021-10-17Sprinkling the magic of FOV_SCALE from the camera matrix ... works?tslil clingman
What is going on here? Indeed this eliminated another rendering issue.
2021-10-17Additional bug fixtslil clingman
Essentially highest_drawn should be monotonic between squares, the only time we should allow ourselves to draw below this is in the special case of drawing a vertical portion over the horizontal portion of a previous layer in the same square.
2021-10-17A stray -1. Next issue: horizontal doesn't meet vertical on barrels?tslil clingman
2021-10-17Still z_buffer issues, what is happeningtslil clingman
2021-10-17Well, it's not quite right, but this is the general directiontslil clingman
2021-10-17Texture scalingtslil clingman
2021-10-15Well, there's no reason not to do this ... Multiple polygon layers!tslil clingman
2021-10-15Minor tweaktslil clingman
2021-10-14Texture mapping!tslil clingman
We already calculate almost everything we need if we want to map textures per line segment v[i]->v[i+1] for v the list of vertices per cell.
2021-10-13Polygonal walls!tslil clingman
It was essentially working before, just some indexing bug.
2021-10-12It almost works, but for some reason everything only has 3 sides...?tslil clingman
2021-10-12Merge branch 'main' into polygon_wallstslil clingman
2021-10-12More texture bugs, hoorahHEADmaintslil clingman
Might as well also compute texel_y directly like texel_x for objects and skip a multiplication in favour of addition
2021-10-12No need to recalculate the index inside each looptslil clingman
Here's hoping Zig is smart enough (TM) to constant-ify all of these @floatToInt(type, PlaneXXX) values.
2021-10-11Fix many texture bugs, access memory in increasing order everywheretslil clingman
- switch z_buffer to use screen space coordinates (why does y increase downward!) - extract pointless (re)calculations from inside hot loops, in particular from object drawing but also to the extent allowed by applicable law from floor and ceiling drawing
2021-10-10Untested first mock up of polygon intersection in squaretslil clingman
2021-10-10Refactor: extract rendering code from Player struct into Renderertslil clingman
Some bonus off by ones and rounding corrections
2021-10-10Off by ones!tslil clingman
2021-10-08Fixed some artefacts for walls with both lower and upper partstslil clingman
I can't quite explain it, but something about the way floating point numbers round meant that we weren't calculating consistent distances (in pixels) for the length of the strip between the top of the floor and the bottom of the ceiling in cells which had both.
2021-10-07Variable height ceilings!tslil clingman
Plus bonus graphical artefacts around the edges of such! In the end the majority of this code was rather easy: take the upwards floor drawing code and reflect it. However, there were many edge-cases and plenty of off-by-one pixels and rounding issues that didn't quite work the same way going down as they do going up. Also the object drawing code used to take advantage of the fact that the z-buffer was painted bottom-up only, so that required change too.
2021-09-29Better descriptiontslil clingman
2021-09-26remap controlstslil clingman
2021-09-26Of course i didn't need i32 ...tslil clingman
2021-09-22There was really no reason to use a BoundedArray instead of an arraytslil clingman
2021-09-22Switch to more accurate versiontslil clingman
Pre-emptive micro-optimisation is bad. There aren't that many sprites pixels usually anyway.
2021-09-22Colour blendingtslil clingman
Some amount of work went into finding appropriate integer arithmetic formulae that were reasonably accurate. At this point i've settled for the incorrect-but-faster version. The better-though-slower formulas are still there in case i change my mind. It would help to have an assumption such as, but not limited to, the surfaces are always going to be fully opaque.
2021-09-20Render objects by writing pixelstslil clingman
This confines hardware acceleration to scaling and the background sprite. Unfortunately it would seem that to do proper object rendering (partial transparency) i'll have to implement colour mixing myself.
2021-09-20Corrected rendering bugtslil clingman
2021-09-20Render walls by pixels, instead of using hard. accel. spritestslil clingman
2021-09-16Corrected movementtslil clingman
2021-09-12Walk bob and collision detectiontslil clingman
2021-09-12Rendering bugtslil clingman
2021-09-12More efficient surface rendering!tslil clingman
Now, outside of sprites, every pixel on the screen is draw at most once. Hoorah. Unfortunately things still seem to be a little slow, perhaps its the z_buffer access or the fact that vertical floor slice drawing is bad?
2021-09-11Render tops of low walls!tslil clingman
But it's very inefficient right now
2021-09-10Re-organised code, moved all rendering into raycast.zigtslil clingman
2021-09-10Textures repeat rather than scale?tslil clingman
2021-09-09Don't override the skycylinder!tslil clingman
2021-09-09Added ceilings and pos_z to sprites (they can now be on the ceiling)tslil clingman
2021-09-06Only attempt to render cells with h > 0tslil clingman
2021-09-05In response to issue #9629, correct usingnamespace usagetslil clingman
2021-09-05Changed map scaling, texture indexing, finished object rendering!tslil clingman
2021-09-05I don't understand this, but it works ...tslil clingman
For whatever reason, we /can/ compensate for the TERRIBLE linear interpolation hacks on direction (and so distance) computations for the walls and floors. We do this by scaling the otherwise exact and correct computations for the perp_distance and centre of an object by the magic number FOV_SCALE = 2 * tan(FOV / 2) Why? Who knows. This is a little frustrating, because it means i don't understand some part of the rendering process.