News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Xyphoe

Wolfenstein 3D on the CPC?

Started by Xyphoe, 19:26, 30 December 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


sigh

??? Is this realtime? Sorry for the question, but I didn't quite understand the description given on youtube.

fano

#2
Not totaly in fact , only the renderer is real time , the raycasting is precalculated
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

redbox

Executioner (WinApe author) worked on one too...

spybro

Actually Optimus gave some more info on the forum that he first upload it
but i believe he'll come around here to give some more info
about his new (game wanna be) creation

@optimus
εξαιρετικη δουλεια optimus ευχαριστουμε!!!

Phi2x

#5
.

fano

Quote from: spybro on 23:21, 30 December 10
Actually Optimus gave some more info on the forum that he first upload it
but i believe he'll come around here to give some more info
about his new (game wanna be) creation
Great ! i can not wait !
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

ukmarkh

Reminds me of the time I played Doom on my mates 386SX... we had to reduce the size of the window from full sceen to something like you see in that demo, still playable mind. What impresses me the most is how smooth everything runs.

norecess

I will be amazed the day it will be interactive  ;D

Gryzor

This. Is. Incredibly. SMOOTH.

Optimus


Hello and happy new year!




In this video I started with the fastest column renderer I could think of.
There is also an untexture version that is 1VBL. The texture version is running at 2VBL because of vsync but is less than this, around 1.3 and 1.6VBLs depending on the wall sizes. This means there is some more raster lines to  spend here for the raycasting. If I am lucky it will be 3VBLs with a realtime raycasting engine, else no more than 4.


I have thinking hard on the maths for CPC, I have precalculated some tan tables and dist tables that will help me with most of the stepping and getting the distance with simple additions of 16bit regs as 8:8 fixed point. But there is a single initial step where I might have to make an 24bit mul. That means 64 times a mul per frame. Then from the distance finding the wall height to render, either a division or maybe some weird precalcs. And how about the fishbowl distortion fix? I haven't thought of this yet. Zooming sprites for the future will be another challenge. Not as fast as column renderer, different routine needed, also I'll need some more maths to find which sprites are in the view of the player and project their real position to screen positions plus a zooming factor to know how to zoom depending on the distance. Of course I haven't thought of this part yet. But I have thought of the raycaster and most of it might be just adds of precalced luts. I am about to write it but I was busy with some real life stuff recently. I think I will have my next preview of a working true raycaster on January or February.


My initial inspiration for my project was this one on AtariXL

http://www.youtube.com/watch?v=DuZywAxfGkw
I was inspired to use half scanlines rendering from this video.
Then I have byte rendering (two mode0 pixels width of column, it would be quite slower with per pixel rendering), 64 bytes on width (64bytes screen width mode too), 64 scanlines on Y (128 screen height). These were choosen instinctly. And then I realized that I have choosen exactly the same screen setup as the AtariXL demo :)))
Even the textures are 32*32 both in my case and that video. I am curious to finish the raycasting so that I can compare the speed.


Also, this is mainly going to a game project. I am a bit fed up with demos, I think games are more interesting to programm. And challenging. I'd like to answer the question, could a game with such technical engine be made on CPC? Generally speaking, I want to code something else on CPC (game, app, whatever), also something else than demos, there is a new field for me there and I am also fed up doing demos for 10 people. This engine was appreciated more from people who are not necessarily into demos but might be retro gamers or just curious about tech in 8bit. And this is motivating. Not that I will quit from demos. We still have to finish a big one and then I will see and decide if I will continue doing this..

sigh

#11
I noticed in the atari demo that it is using 64k. Are you making this for 64k or 128k?

edit: I started thinking about Mirrors Edge ;D

redbox

Quote from: Optimus on 12:23, 03 January 11
Also, this is mainly going to a game project. I am a bit fed up with demos, I think games are more interesting to programm. And challenging.

I think that demos are generally machine specific, where as if you program something technically challenging then the whole 8-bit/retro scene gets interested (especially if it's a game!).

Great work so far, and will watch with keen interest as to how it develops.

norecess

QuoteAlso, this is mainly going to a game project. I am a bit fed up with demos, I think games are more interesting to programm. And challenging.


The way to go!  ;)

Optimus

#14

@sigh: I am always working for a 128k machine. The engine still have space to work on 64k but it will be too much when it turns out as a game. I spend 32k for double buffered vram (well, maybe less since I am at 64 byte width mode and don't use all scanlines yet), almost 8kb for the renderer, 8kb will fit 8 32*32 textures, some space for code. I plan to have some maps, the sprites, more textures. I will move to 128k definitely.

Xyphoe

Quote from: Optimus on 12:23, 03 January 11
Also, this is mainly going to a game project. I am a bit fed up with demos, I think games are more interesting to programm. And challenging. I'd like to answer the question, could a game with such technical engine be made on CPC? Generally speaking, I want to code something else on CPC (game, app, whatever), also something else than demos, there is a new field for me there and I am also fed up doing demos for 10 people. This engine was appreciated more from people who are not necessarily into demos but might be retro gamers or just curious about tech in 8bit. And this is motivating. Not that I will quit from demos. We still have to finish a big one and then I will see and decide if I will continue doing this..

I like this bit a lot.

I do like watching demos when they're posted on YouTube, but these days I do wonder how many people see them or really care. I don't know much about the 'demo scene' but I guess during the 90's it was a kind of way of showing off your skills and techniques to people on the scene, coding prowess and all that - but showing off what the CPC is capable of. I don't think it impresses as much these days as it gets to the point of 'seen it all before' made worse by being flooded with demos that consist mostly of scrolling text taking 10 minutes to thank anyone and everyone and talk rubbish! What's now impressive is seeing some of these techniques and these skills being used in games and apps - I often thought what if all these demo coders to just get together and make one amazing product....

It's nice we're beginning to see such things, like Orion Prime for example, and now hopefully Wolfenstein  ;D
I don't mean any offence to any demo coders though, I think my point   being is that I'm thinking of you and your skills being seen and   *appreciated* by a larger audience. But demo writers - don't stop making cool demos too anyway  :)

arnoldemu

Quote from: Optimus on 00:28, 04 January 11
@sigh: I am always working for a 128k machine. The engine still have space to work on 64k but it will be too much when it turns out as a game. I spend 32k for double buffered vram (well, maybe less since I am at 64 byte width mode and don't use all scanlines yet), almost 8kb for the renderer, 8kb will fit 8 32*32 textures, some space for code. I plan to have some maps, the sprites, more textures. I will move to 128k definitely.
Welcome to cpcwiki forums Optimus and also welcome to game making!

I hope the game works out.

I think continue to develop it, put in all the required game features and mechanics and then if it's too slow, see if you can squeeze some more time out of it, or modify the game design to avoid the slow downs.

It is all good experience!

Once you've made one game, you'll find it easier to make the next because you will have your tools ready and your build scripts too.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Sykobee (Briggsy)


Good luck with the ray casting algorithm - and remember to store the 64 calculated Z-depths for your sprite rendering portion (if sprite Z-depth > wall depth for any X, don't draw the sprite in that column).

And hey, if it works out slow eventually (under 10 fps) at least you have a neat engine for Dungeon Master style games with:


(a) large first-person view, not a tiny view like Bloodwych, etc.

(b) no need to manually draw all of the possible wall and floor graphics pre-rendered

Executioner

My original ray casting Wolf3d demo did do the pixel rendering (half-byte) and also rendered the whole 128 scan lines rather than only 64. These are two quick optimisations which really would have improved the speed, but I didn't want to sacrifice the quality that much. It's a pity I never had the time to get back to it, 'cause there are a heap of improvements I've thought of over the last few years.

ukmarkh

Quote from: Executioner on 12:58, 14 February 11
My original ray casting Wolf3d demo did do the pixel rendering (half-byte) and also rendered the whole 128 scan lines rather than only 64. These are two quick optimisations which really would have improved the speed, but I didn't want to sacrifice the quality that much. It's a pity I never had the time to get back to it, 'cause there are a heap of improvements I've thought of over the last few years.

Dude... screw real life, and get back to the CPC drawing board? lol

norecess

#20
Or at least, please improve WinApe's source code editor ;)

TFM

Quote from: Optimus on 12:23, 03 January 11
...I am a bit fed up with demos, I think games are more interesting to programm. And challenging.

I do totally agree  ;D 8)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

Yes... it's kool to get a demo to mimic Wolf3D but a bit pointless...

Such Game cannot realistically be good nor fun nor fast and furious...

Because it is clearly not the right computer generation...

A Wolf3D like game on CPC would be some Xybots-based engine indeed.


So if it is just to be a Demo, why only limit yourself to Wolf3D look alike ? you may find more artistic design or concepts.

fano

Quote from: MacDeath on 10:02, 15 February 11Such Game cannot realistically be good nor fun nor fast and furious...
I don't share your point , let Optimus time to finish his work  ;)
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

Ygdrazil

Me neither, It's all about pushing the CPC to new limits!! I think what have been achieved up until now is stunning!

I am looking forward to how good a CPC version will be!..

/Ygdrazil




Quote from: fano on 12:49, 15 February 11
I don't share your point , let Optimus time to finish his work  ;)

Powered by SMFPacks Menu Editor Mod