Per-pixel map scroller for ATM-Turbo compatibles
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Per-pixel map scroller for ATM-Turbo compatibles
A tile-sprite engine for future games (maybe platformers?). Could fit in one frame at Pentagon 2.666LE, 25 fps at ZX Evo. Sprites are clipped for any needed window.
https://www.youtube.com/watch?v=L8ypWt5Rd5U
The engine is based on a big array of ld:push (one line of one layer = 256 bytes, so, 1024 bytes for 1024 pixel wide picture). You can load a picture in it, or you can update the edges from the map. Currently it is 256x64 map made of 16x16 metatiles. Each metatile consists of 4 8x8 tiles, that can be changed indepentently, but the "fonts" are linked to the given X&1, Y&1 (each 1/4 of a metatile has its own "font" of 256 tiles).
The sources are there: http://nedoos.ru/
https://www.youtube.com/watch?v=L8ypWt5Rd5U
The engine is based on a big array of ld:push (one line of one layer = 256 bytes, so, 1024 bytes for 1024 pixel wide picture). You can load a picture in it, or you can update the edges from the map. Currently it is 256x64 map made of 16x16 metatiles. Each metatile consists of 4 8x8 tiles, that can be changed indepentently, but the "fonts" are linked to the given X&1, Y&1 (each 1/4 of a metatile has its own "font" of 256 tiles).
The sources are there: http://nedoos.ru/
Re: Per-pixel map scroller for ATM-Turbo compatibles
Interesting stuff. These clones aren't much popular in the West, I suppose but if there is a really good game made for them, then people will
certainly want to play it.
Nice funky remake of Imperial March too
certainly want to play it.
Nice funky remake of Imperial March too
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
I hope NedoOS will help in making good games, with its memory and file control.
I wrote there a number or simple games where anyone can copy-paste procedures. For example, this Untangle game for lines and cursor control:
https://www.youtube.com/watch?v=RBGllLW7yVc
I wrote there a number or simple games where anyone can copy-paste procedures. For example, this Untangle game for lines and cursor control:
https://www.youtube.com/watch?v=RBGllLW7yVc
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
This looks cool (the game and the scrolling engine). I have a character scrolling game that currently only targets 128K Spectrums, but it would be nice to have pixel scrolling on enhanced computers, if possible. (I don't yet know if it's feasible to try to support both NedoOS and the standard Spectrum in a single program.)
Does the demo depict the maximum number and size of sprites available, or can it handle more (or larger) sprites?
Does the demo depict the maximum number and size of sprites available, or can it handle more (or larger) sprites?
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
The number of sprites is unlimited. Supported sprite heights are 8,16,24,32 (more can be added in code, they looks mostly the same). Sprite width is not fixed (spmaxwid constant used for X coordinate correction at the left screen margin).djnzx48 wrote: ↑Fri Jun 26, 2020 3:54 pm This looks cool (the game and the scrolling engine). I have a character scrolling game that currently only targets 128K Spectrums, but it would be nice to have pixel scrolling on enhanced computers, if possible. (I don't yet know if it's feasible to try to support both NedoOS and the standard Spectrum in a single program.)
Does the demo depict the maximum number and size of sprites available, or can it handle more (or larger) sprites?
The game loop looks like this:
1. Draw background
2. Draw sprites and anything you want
3. Swap screen
4. Process input and game logic (preferably as many times as many frames passed)
Now I'm thinking out the idea how to make applications not to spoil each other's screen.
A) Call "I want to draw" in the beginning and "I ended drawing" in the end - is prone to programmer errors. And the call to system routines is slow.
B) Have 4 variables in the kernel that contain 4 pages of screens (2 for each). When you start drawing (either on the current screen or on the hidden screen), you get one or two of these pages in CPU memory. When you lose the focus, OS must change these pages in your CPU memory and these variables too. When you take the focus, OS returns true values in these variables.
Sadly there is no place for 4 bytes in the kernel if we want CP/M compatibility, only 2 bytes remained. Maybe CP/M compatibility is no more needed.
I prefer the B option.
BTW I made a video, how to play music in the web browser NedoBrowser in the background (E to edit url, L to load and play, Break to stop playing)
https://www.youtube.com/watch?v=0aEx8n-L5dQ
It seems mouse wheel spoils the idea somehow. Maybe I should limit its rotation.
Re: Per-pixel map scroller for ATM-Turbo compatibles
Thanks for the details. I looked at the source code more closely and it makes a bit more sense now.
Maybe my assumptions are incorrect, but doesn't each application have access to the memory of all other running applications (or is there some form of memory protection)? Do you mean that the wrong application's screen may end up being paged in after a context switch?Alone Coder wrote: ↑Sat Jun 27, 2020 8:57 am Now I'm thinking out the idea how to make applications not to spoil each other's screen.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
ATM-Turbo only has 2 screen areas (as in 128K). So every application uses the same screen pages. We can have separate screen buffers for each application this way: only the focused application accesses true screen pages, and the rest access their own screen buffers. When focus lost, OS must copy the screen to the screen buffer of the task and set screen page numbers in that task accordingly. When focus is taken, OS must copy it back and set page numbers in that task to the actual screen pages.djnzx48 wrote: ↑Sun Jun 28, 2020 1:26 pmMaybe my assumptions are incorrect, but doesn't each application have access to the memory of all other running applications (or is there some form of memory protection)? Do you mean that the wrong application's screen may end up being paged in after a context switch?Alone Coder wrote: ↑Sat Jun 27, 2020 8:57 am Now I'm thinking out the idea how to make applications not to spoil each other's screen.
So NedoPC guys told me
There's no memory protection. In theory, we can add some wiring to allow port access only in the kernel space, and allow switching to the kernel space only by RST n. RAM banking calls will be protected - but slow. So, not now
P.S.: the scroll when NedoBrowser lost focus was a bug, now fixed.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
I found 4 free bytes in CP/M kernel, started to add the screen protection.
Wrote a faster line routine. So, level 13 is playable, maybe level 14 too:
https://www.youtube.com/watch?v=TFJtVqetKpk
My daughter liked the last music track
Wrote a faster line routine. So, level 13 is playable, maybe level 14 too:
https://www.youtube.com/watch?v=TFJtVqetKpk
My daughter liked the last music track
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
I added the screen protection without copying pages. So, programs just use the 4 variables with screen page numbers (that could contain kilable page), and every program must handle the "redraw" message from the OS (for Black Raven, this was the hardest, not all loops in the game do this).
Testing:
https://youtu.be/3hBncjNBCMM
Features AY remixes of music from "Unreal" game
Testing:
https://youtu.be/3hBncjNBCMM
Features AY remixes of music from "Unreal" game
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Kernel page management bug fixed!
Testing:
https://www.youtube.com/watch?v=Erenfun4Y2c
(Music from variour AY music compos)
https://www.youtube.com/watch?v=nPXnWU0GUNs
(Music by Ironman)
I started a Twitch channel about NedoOS development (in Russian): https://www.twitch.tv/alone_coder
The first two broadcasts weren't saved (bug in Twitch Studio?). Here is the today's one:
https://www.youtube.com/watch?v=7YQ6013mtOA
Testing:
https://www.youtube.com/watch?v=Erenfun4Y2c
(Music from variour AY music compos)
https://www.youtube.com/watch?v=nPXnWU0GUNs
(Music by Ironman)
I started a Twitch channel about NedoOS development (in Russian): https://www.twitch.tv/alone_coder
The first two broadcasts weren't saved (bug in Twitch Studio?). Here is the today's one:
https://www.youtube.com/watch?v=7YQ6013mtOA
Re: Per-pixel map scroller for ATM-Turbo compatibles
Interesting! Although the commentary is in Russian, the auto-translated captions are just about understandable. I got the impression from the development video that memory is fairly tight in the kernel.
I wondered how many levels there were altogether in Untangle, so I looked at the source. It seems like it's going to take quite a while to get through all of them.
I wondered how many levels there were altogether in Untangle, so I looked at the source. It seems like it's going to take quite a while to get through all of them.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
In theory, Untangle has infinite number of levels, they are randomly generated In fact, all levels since level 21 will have 255 vertices in the mesh (all the previous levels have 6,10,15... "triangle numbers" of vertices).
In today's stream we made one more speedup in collision detection in Untangle, so I might pass level 21 in the future:
https://www.youtube.com/watch?v=dF17twNgxYo
In today's stream we made one more speedup in collision detection in Untangle, so I might pass level 21 in the future:
https://www.youtube.com/watch?v=dF17twNgxYo
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Surprisingly, Lord Vader made one more speedup in collision detection. This matters a lot at higher levels, because the number of vertices grows as a square, and the number of checks grows as a square of number of vertices, i.e. like n^4.
Levels 17-18:
https://www.youtube.com/watch?v=_krTJrVr5QI
Today's stream (the viewers became active at last ):
https://www.youtube.com/watch?v=J4cRHlSq9c0
Levels 17-18:
https://www.youtube.com/watch?v=_krTJrVr5QI
Today's stream (the viewers became active at last ):
https://www.youtube.com/watch?v=J4cRHlSq9c0
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
In a series of streams, I added a windowing system for menus in Scratch (labels, buttons, flags, edits, radio buttons). DimkaM added possibility to upload and start programs remotely (they are also auto-closed if you upload the same program), as well as to play music and show pictures.
On task close, its files are closed and its music stopped.
OS_GETSCREENPAGES is finally removed.
https://www.youtube.com/watch?v=hyzn-T6oOfw
On task close, its files are closed and its music stopped.
OS_GETSCREENPAGES is finally removed.
https://www.youtube.com/watch?v=hyzn-T6oOfw
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
In another series of streams, I added pipes and primitive ANSI terminal, and commands like "dir >file" with stdout changed to file.
https://www.youtube.com/watch?v=-bTq76vHppA
https://www.youtube.com/watch?v=-bTq76vHppA
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
NedoOS can now be remotely controlled over Telnet! (well, over raw TCP in fact )
https://www.youtube.com/watch?v=SHceOFUhGoA
https://www.youtube.com/watch?v=SHceOFUhGoA
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
DimkaM solved level 18 of Untangle, and there were bugs in level 19 and on (now fixed).
Telnet server now works as indended.
Separate local terminals keep their screen and work well independently.
In the latest stream, I also showed several multicolors for 128K and how to convert gfx for them.
https://www.youtube.com/watch?v=UC40VV8_iXk
Telnet server now works as indended.
Separate local terminals keep their screen and work well independently.
In the latest stream, I also showed several multicolors for 128K and how to convert gfx for them.
https://www.youtube.com/watch?v=UC40VV8_iXk
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Started streaming the game engine development. I added a character which can run & jump, added a tracking camera:
https://www.youtube.com/watch?v=nXuWrjeK2oo
https://www.youtube.com/watch?v=nXuWrjeK2oo
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Taking objects, adding sounds.
In the end, Wolf 3D engine handling is described in detail:
https://www.youtube.com/watch?v=onBqBEJ ... e=youtu.be
BTW Telnet already works (tried PuTTY and Hyperterm). There is also scrolling ability in the terminal and mouse and simple copy-paste feature.
In the end, Wolf 3D engine handling is described in detail:
https://www.youtube.com/watch?v=onBqBEJ ... e=youtu.be
BTW Telnet already works (tried PuTTY and Hyperterm). There is also scrolling ability in the terminal and mouse and simple copy-paste feature.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
I hooked up a real ZX Evo and tested all the devices I have:
https://www.youtube.com/watch?v=vOulnDrbOXU
Contents:
Legendary Pentagon 2.666LE
Wolf 3D, scrolling game engine
Updating ZX Evo firmware and ROM
TurboSound FM
2048
NeoGS
Test ZXNetUSB
NedoBrowser
NedoDemo 2 (TurboSound), switch off 60 Hz, secret options in Evo Service
FM part of my TurboSound FM is dead
Telnet client
Started to code "more" utility
Several old demos for colour per pixel mode
The Board demo (realtime 3D)
Супер Марио
Started to code "dir |more.com"
It works
I also streamed about the game engine. Enemies appeared, and they can be kicked.
https://www.youtube.com/watch?v=llYq1ivSYwk
Bullets added, they collide walls but do nothing yet.
https://www.youtube.com/watch?v=ucB5UPeaWk0
https://www.youtube.com/watch?v=vOulnDrbOXU
Contents:
Legendary Pentagon 2.666LE
Wolf 3D, scrolling game engine
Updating ZX Evo firmware and ROM
TurboSound FM
2048
NeoGS
Test ZXNetUSB
NedoBrowser
NedoDemo 2 (TurboSound), switch off 60 Hz, secret options in Evo Service
FM part of my TurboSound FM is dead
Telnet client
Started to code "more" utility
Several old demos for colour per pixel mode
The Board demo (realtime 3D)
Супер Марио
Started to code "dir |more.com"
It works
I also streamed about the game engine. Enemies appeared, and they can be kicked.
https://www.youtube.com/watch?v=llYq1ivSYwk
Bullets added, they collide walls but do nothing yet.
https://www.youtube.com/watch?v=ucB5UPeaWk0
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Bullets now decrease health and kill enemies, they drop through floor when dead:
https://www.youtube.com/watch?v=RRtt-ixuzng
NedoOS is rewritten for scrolling terminal, you can even copy and paste in it.
cmd now supports commands like dir > filename, dir | more.com, more.com < filename. Full documentation for API is being written.
https://www.youtube.com/watch?v=PtkQyAuSewA
https://www.youtube.com/watch?v=RRtt-ixuzng
NedoOS is rewritten for scrolling terminal, you can even copy and paste in it.
cmd now supports commands like dir > filename, dir | more.com, more.com < filename. Full documentation for API is being written.
https://www.youtube.com/watch?v=PtkQyAuSewA
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
In the recent streams I ported Turbo Pascal and BDS C Compiler into NedoOS.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
Streams are moved to YouTube.
Added gfx library for BDS C.
Total speedup of term and stdio.
Long names included in cmd and Nedovigator:
https://www.youtube.com/watch?v=wmp-VW6nXqU
The game engine is abandoned because of no feedback.
Added gfx library for BDS C.
Total speedup of term and stdio.
Long names included in cmd and Nedovigator:
https://www.youtube.com/watch?v=wmp-VW6nXqU
The game engine is abandoned because of no feedback.
-
- Manic Miner
- Posts: 401
- Joined: Fri Jan 03, 2020 10:00 am
Re: Per-pixel map scroller for ATM-Turbo compatibles
I fixed q1 game (network shooter deathmatch, originally for AY-based LAN) for ZXNetUSB, so it can play over Internet.
https://youtu.be/xBMliQYi0O8
So, now we have two realtime net games in NedoOS.
https://youtu.be/xBMliQYi0O8
So, now we have two realtime net games in NedoOS.