Pokitto is on the way, what games should I make?

I once had an idea for a FPS/RPG like this

Basically the idea was that the player is trapped in the computer / kind of like system shock

5 Likes

I don’t know if it would even be noticeable in this spatial/color resolution :smiley: Maybe some simpler model like a global directional light?

Awesome, that’s exactly the kind of game. I love the idea of being inside a computer… maybe it could be a puzzle game where you’d have to “program” your way out or something. Could be educational too, showing different parts of a computer etc.

And you’ve got quite a nice YouTube channel! Didn’t know about it. I have to go sleep now, but I’ll watch these videos tomorrow. They look very interesting! (Consider uploading a few of them to PeerTube if you want to have a lot of FOSS enthusiasts like me around here :slight_smile:) I’ll be thinking about storylines in the meantime.

2 Likes

had a chance to test the engine
i noticed the knights sprite slows the speed down noticable wile the statues are way less impactfull on perfomance.
also the cornor of walls on some angles makes you jump up to the top of the wall wich looks very wierd wen the wall gows up to the cealing.

i do love how well its running.

I’ve fixed the jumping bug already.

The sprites slow the game down if they take a lot space on the screen, because it’s more pixels and texture sampling operations. I’ll try to optimize it.


I started working on the second demo which is only a 1-hit raycasting and runs currently at 35 FPS.

would pre rendered sprites (mipmap) help any?

have you decided on where to put your ui elements? bottom or side or both?
can help you out on creating a custom draw mode for it

1 Like

Yes, prerendered sprite sizes would help, I’ve been thinking about it too. Actually now I have an idea – I wouldn’t have to store whole scaled down sprites, but just sampling positions – e.g. when drawing native size, the indices for drawing are x: 0, 1, 2, 3, …, y: 0, 1, 2, 3, … When drawing half sized sprite they go x: 0, 2, 4, … y: 0, 2, 4, … Would be enough to store just these. Thanks for bringing my attention to this.

I tried creating a GUI but couldn’t make any that would look good, so I’ll probably go with no GUI for the demo :smiley:

1 Like

Alright! I’ve done two very effective optimizations for demo 2:

  1. I compute the pixel intensity (fog) for each rendered column at most once, as there is only at most one wall in each column (this doesn’t apply to demo 1 though).
  2. For walls at distance I don’t apply texture, but a precomputed average color of that texture – this is much faster plus also look kinda better (no aliasing! kind of like KISS mipmapping). I tried this also in demo 1, but it looks ugly there.

FPS raised by about 10.

EDIT: a gif of demo 2:

out11

9 Likes

what would be the max on the fog in a (doom like) map? we can look at modeling the enviorment to only se 3 max at any point of the map, this was something simialar doom had iseus with if the rooms where to big or detailed

A nice trick!

Definitely. Though ray casting used to be the bottleneck, it is the shading now – that is drawing individual pixels, because they have to look up texels, apply fog etc. – and there is more pixels than rays. So I’ll have to focus on these now.

Also a small update:

1

EDIT:

This could be expanded into a game where you’re trapped inside Pokitto (inspired by @jonne’s idea) :smiley:

7 Likes

Ooh.

Can we have evil zombie Pokittos?

thatsevil

4 Likes

Wow, scary :smiley:

Minecraft demo is coming too! I need a nice 2D function for the terrain though – it needs to be computed quickly (ideally some polynome, i.e. only a few multiplications and additions) and create a “stable” terrain around the origin.

This is x^2 - y^2 (it creates a saddle that goes too deep/high along the cardinals):

image

EDIT:

Hmmm I think sin/cos with LUT could work, but feel free to give me more ideas :slight_smile:

3 Likes

Rescue on Fractalus.

Real-time fractal landscape on a 1.78MHz MOS6502

Algorithm

4 Likes

Super coool :open_mouth: TIL! Very nice algorithm. It’s kinda like Perlin noise, but more efficient.

To apply this I guess I’d have to keep precomputing this into a 2D array during gameplay as the player would move, and also the random values would have to be seeded with the location. Would be doable, but too much work for me :smiley:

I tried to create an implicit function, that creates the terrain just when it is called. Well, kind of – I have drawn a terrain height profile in GIMP:

image

Then created a Python script that reads this and gives me a C syntaxed array of values. The terrain function takes this profile at requested x and y, multiplies the values and returns the result. Seems to work for now :slight_smile:

Yes, I have never played “Rescue on Fractalus” but when I saw some video of it, I thought what the h*ll is that? I didn’t know such things were even possible on the 8-bit era computers, let alone in a commercial game.

Fun fact, the game was intended as a Star Wars game and was made by none other than Lucasgames. The SW games license had already been given to someone else so they couldn’t use Star Wars characters / trademarks.

Loren Carpenter, guy behind the algorithm did a knockout demo on the same subject at SIGGRAPH.

The audience (1980 !!! ) was reported to have been pretty breathless.

Carpenter was hired by ILM (Industrial Light and Magic) pretty much on the spot.

3 Likes

LUTs are already there in the FixMath library in PokittoLib.

1 Like

And I thought John Carmack was the god of computer graphics :frowning:

1 Like

Carmack may be god, but Loren Carpenter is the co-founder of Pixar. So, pretty even match.

1 Like

There 16color sprites right? So the fog per wall Ray is the same index, the only trouble is that scalefactor Wich you said you wanna hard code a lookup table for
Don’t know of any faster since it’s doing hardly any calculation

Sprites and textures are 256 color as well :slight_smile:

EDIT:

Minecraft slowly coming to life! (Though I really prefer Minetest of course)

1

9 Likes