CFLAGS=-std=c99 -Wall -Wpedantic -Wextra -g
all: city level modelViewer helloTerminal highPoly hqOffline test
city: city.c ; $(CC) $(CFLAGS) -o $@ $@.c -lSDL2
level: level.c ; $(CC) $(CFLAGS) -o $@ $@.c -lSDL2
modelViewer: modelViewer.c ; $(CC) $(CFLAGS) -o $@ $@.c -lm -lSDL2
helloTerminal: helloTerminal.c ; $(CC) $(CFLAGS) -o $@ $@.c
highPoly: highPoly.c ; $(CC) $(CFLAGS) -o $@ $@.c
hqOffline: hqOffline.c ; $(CC) $(CFLAGS) -o $@ $@.c -lm
test: test.c ; $(CC) $(CFLAGS) -o $@ $@.c -lm
clean: ; $(RM) city level modelViewer helloTerminal highPoly hqOffline test
fluffrabbit {l Wrote}:PS1
drummyfish {l Wrote}:I've been dreaming about Crash Bandicoot clone for some time now, anyway I think we really need that oldschool PS1 feel.
drummyfish {l Wrote}:Mostly you can't tell the difference, but the subconsciousness knows
fluffrabbit {l Wrote}:Didn't the PS1 also guarantee that every polygon gets rendered to at least 1 pixel no matter how small?
The PlayStation tended to render every polygon as a pixel, no matter how small it got. Had Crash’s pupils been texture, they might have disappeared when the got smaller than a pixel. But by making the pupil 2 polygons (a quad), they almost always showed up as long as the total eye, including whites, was more than a few pixels tall.
#define S3L_HALF_RESOLUTION_X (S3L_RESOLUTION_X >> 1)
#define S3L_HALF_RESOLUTION_Y (S3L_RESOLUTION_Y >> 1)
#define S3L_PROJECTION_PLANE_HEIGHT\
((S3L_RESOLUTION_Y * S3L_FRACTIONS_PER_UNIT * 2) / S3L_RESOLUTION_X)
Technopeasant {l Wrote}:This is pretty cool. I like the raycaster too. Do you have any pre-built demos available?
fluffrabbit {l Wrote}:Preprocessor code like this makes it impossible to resize the screen at runtime.
fluffrabbit {l Wrote}:That said, I learned how to cross-compile for Winblows today. Yay! Here is the city demo.
Technopeasant {l Wrote}:what is it about software rendering that tends towards that slight warping on the texture mapping? Certainly reminds me of a Playstation 1 game.
Very nice. I do wonder though, what is it about software rendering that tends towards that slight warping on the texture mapping? Certainly reminds me of a Playstation 1 game.
you render environment with raycasting, plus small objects as true 3D
./small3dlib.h:1289:7: warning: explicitly assigning value of variable of type 'S3L_Unit' (aka 'int') to itself [-Wself-assign]
x = x;
~ ^ ~
the view skew would be different between renderers. small3dlib doesn't allow realtime frustum frombulation and raycastlib doesn't have a correct way to get that extra degree of rotational freedom.
I do get one warning with Clang
drummyfish {l Wrote}:In short it's usually multiple things like lack of perspective correction or its approximation, lack of proper near-plane culling, inaccuracy of fixed-point math etc. Mostly related to performance. I kind of like that look though
Users browsing this forum: No registered users and 1 guest