You can support the development on the Github Sponsors page.


Games > FPS80


A 3D first-person shooter for the TIC-80
made by Bruno Oliveira
uploaded by btco
added:
updated:
download cartridge
- CLICK TO PLAY -

85


FPS80 is a 3D first-person shooter. Shoot the monsters, collect powerups, find the keys to open the locked doors and escape the dungeons!

*** ATTENTION: For the best experience, play this on your desktop (standalone TIC-80), not on the browser. To do this, install TIC-80 on your computer, then use the "surf" command to browse games, select [tic.computer/play] and then select FPS80.

There are 3 levels: Dungeons, Gardens and City.

This game uses a custom simple 3D engine I built. I'll release the (more readable) source code soon!

Here's an article on how I developed this game:
https://medium.com/@btco_code/writing-a-retro-3d-fps-engine-from-scratch-b2a9723e6b06

Add me on Twitter: http://twitter.com/btco_code

Source code: https://github.com/btco/ticgeo3d

Comments


btco

Note: I don't know if it's just my computer, but the sound doesn't seem to be coming out well in the web player. You may have a better experience if you download the cart and play in the standalone desktop player.

StinkerB06

Or... Play the cart from SURF (since TIC 0.45.0).

Nopy

Good Game! Nice explosions!
I managed to find the ILEAVE setting. Turning that off and still having a good 25 FPS felt preferable to me. :>

btco

@StinkerB06: good point, using the SURF command is better!

@Nopy: yeah, in the next version I'll try and make ILEAVE a user visible setting!

btco

For those who are interested in how this game was built, here's an article I just wrote:
https://medium.com/@btco_code/writing-a-retro-3d-fps-engine-from-scratch-b2a9723e6b06

Moico100

Very good this game 10 notes amazes me a lot your games

Jackj106_Games

am i permitted to make a ¨HD¨ version of this game that is the same game, sporting better graphics?

Teddy

Sweet.

Matheuz700

btco, always surprising us

btco

@Jackj106_Games: this game is open-source and licensed under the Apache license. https://github.com/btco/ticgeo3d. So you can do anything allowed by the license, which is practically everything, including making an HD version :-D While not required, giving me credit in the HD game is appreciated!

btco

Another interesting modification someone could do is use textri() to speed up rendering.

KingPug672

You should make a game like super smash brothers @brunoOliveira

SergioFLSgd

what a good and impressive game! how did take this long making this game?

btco

I think it took me about 4 weeks. Most of the time was building the 3D engine. You can find out more about how the 3D engine works from the Medium article (link above in the description). The other time consuming part was balancing the difficulty of the levels... still don't know if I got that right :-) Has anyone finished the game? Is it too hard? Too easy?

BigBombOmb64

this is amazing! reminds me of doom but on atari 2600

btco

That was the idea :-)

kalle

Cool game. The fog and clunky controlls almost made it scary

StinkerB06

Why did you choose keys ZXAS over buttons ABXY?

StinkerB06

Start using ABXY the next time you make a TIC-80 game to not confuse out moblie players.

btco

Yeah, I optimized it for clarity on desktops with a keyboard. Does TIC-80 have an API to tell whether the game is running on mobile or desktop? If so, I could dynamically adjust to say the correct keys...

StinkerB06

No, there isn't. You could probably ask Nesbox to add a code flexibility feature that allows you to print button names/bindings alongside text strings and integers.

On desktop, it would print the key bindings for their corresponding button codes. It would also accept keyboard input as well, which is a feature that got added in TIC-80 0.60.0.

On mobile, it would print the names of the buttons as they appear on the touch screen. The inputs of players 2, 3, and 4 would return an error on mobile if they tried to print, or if a cartridge attribute is set to make the game based exclusively on multiplayer features, QWERTY keyboard usage, or right-click & center-click usage, all three of which aren't supported on mobile at the moment.

Having an on-screen mouse and QWERTY keyboard on mobile + Wi-Fi support would make the TIC-80 experience way better for mobile users.

AntomationTV

I'd never though of using raycasting in this program, but I guess it's only fitting since it's very similar to the Doom Engine

trystanator09

im not a big fan of the game but i love all the work you put into it

btco

Thanks for the feedback! :)
This game was really fun to make!

WinterMelon

I loved the game, specially the 3D engine, it's amazing.

btco

It's a pretty rudimentary 3D engine. It was the first time I wrote a 3D engine from scratch, so I did a bunch of things naively. Glad it worked well enough.

Clikpb

This is AMAZING! Definitely needs some kind of optimization though, you could try adding something similar to the hint block in source(only renders whats behind it if player can see it) or just a draw distance. I don't care too much. The interlaced frames are great for this though, just not enough.

btco

True! It's VERY fill-limited as is. Btw this was developed before TIC80 introduced textri() API, so if I were to rewrite it today it would be MUCH faster. Maybe I'll update it at some point :)

davidmsf

WOW!!!! Good work, Bruno!!!
Acho que podemos conversar na nossa lingua mae. Voce tambem eh brazuca, nao? Ou portugues?
Estou estudando a solucao que vc deu para o game, e estou adorando! :-) Muito bem bolado mesmo!
Comecei a programar no fim da decada de 80 em microcomputadores BASIC, e sempre tentei fazer algo do tipo num CP200. Hoje vejo que da para fazer, e ainda com todo o gostinho dos micros da epoca!

otimo trabalho, cara! parabens!


btco

Obrigado! Sim, sou brasileiro. Eu tambem comecei com BASIC no MS-DOS 3, e sempre gostei de jogos retro. Hoje em dia os jogos comerciais sao superproducoes hollywoodianas mas deixam bastante a desejar em termos de jogabilidade, entao sempre prefiro jogar os jogos dos anos 80 e 90. Obrigado pelo comentario! Fico feliz que gostou do jogo!

samybencherif

infinite bombs: line 1973 col 6 insert "1 or"
great game :)

blacktop57

Hmm... I will use it as fps tamplate)

JeSuisFranco

Very good rendering system, but there are ways to make it faster.
First, you should use the painter's algorithm to render sprites instead of a stencil buffer.
It may sound weird, but here is a comparison of both algorithms:

PAINTER:
Plot pixel
STENCIL:
Has a pixel been plotted there already? If yes, skip the two next lines.
Plot pixel
Set the corresponding spot in the stencil buffer as true, as a pixel just has been drawn.

As you can see, the painter's algorithm requires less steps, and therefore should be faster. Plus, that way, you do not have to clear a buffer each frame.
That's why you should change your algorithm. I am almost sure you'll get a speedup.

btco

I tried painter's algorithm but, at least as it was implemented back then, TIC-80 fill rates were extremely slow, so the additional cost of the stencil buffer made sense. Maybe things have changed since :)

Actually, there's a new function called textri which didn't exist back then, which would make rendering MUCH faster in this game. Maybe one day I'll update it to use it.

JeSuisFranco

"...TIC-80 fill rates were extremely slow..."
It looks like if you used pix() to plot pixels. That might be slow as, for every call to the function, it has to calculate were is (x,y) in the screen memory. This can be costy for TIC-80 as, if the screen memory is 1D(And it is as far as I know), this would result in something like memory[240*y+x] = color.
Plotting through poke4() would probably be faster, as you only need to calculate the memory address for the onscreen start of the sprite. Then the address can simply be incremented by 1 each X and by (240 - sprite_width) each Y.
But yeah, anyways, it isn't really useful to do that as textri() now exists.

StinkerB06

textri() appears to have some weird artifacts, especially when it comes to drawing two textri()'s together to produce a scaled/stretched rectangle. I think TIC-80 uses SDL2 (the framework it supposedly runs on) itself to do this basic polygon and line rendering.

brakeflash

it has that Hexen/Heretic feel to it

rocyefu

cool

Inspired_noob

damn i wish i knew how to type all of this code, when i try i use the wrong symbols

corgi42

best game on tic

btco

Thank you! Heads up to those looking at the code: this code is old, it's from when TIC didn't have textri() yet, so this code is unnecessarily complicated by today's standards as it needs to do rasterization manually. Maybe one day I'll make a new version of FPS-80 with textri(), it should be much faster.

Fps80IsTheWorst

this is the worst experience i have ever had stop stroking this ego this guy is the worst dev evaaaa lol + ratiod cringe

rip_huggy_huggy

wow so good

Darkgamer9594

Hey @bcto! your game is awesome !

Darkgamer9594

also someone stole your fps80 and turn it into DOOM80...

DcyD3

waow !!! really impressive - we can do that ??? arghhhhhhhhhhhh !
i don't really understood how that work
think you sin+cos all positions ? awesome job ! oh yes !!!
don't know if alone or team but my respects !


tonygamer12

is soo good but bit hard i like it

btco

Thanks everyone! This game is quite old already and it's from before TIC-80 had some convenience functions like textri which would have simplified things quite a bit and made it more performant. But back in the old days we didn't have such niceties so everything was rendered by hand :-D


Post comment