Dreamcast Streaming?
Moderator: PC Supremacists
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Dreamcast Streaming?
Tvspelsfreak, you mentioned that streaming a continuous world would be possible on AIM yesterday. I got sidetracked talking about something else. I'm interested in hearing what you have to say, though.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Cartridges act as ROM storage, so the console can access it extremely quickly. It's different with CD/GD/DVD based systems, because it takes time to access it.MarauderIIC wrote:If NES Mario can do it, I think DC can do it. Assuming that my guess as to the meaning is right.
edit: Oh, and I'm also talking about like a 3D environment. Not really a tiny level.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
-
- Chaos Rift Junior
- Posts: 272
- Joined: Wed Sep 29, 2004 5:53 pm
- Favorite Gaming Platforms: NES, SNES
- Programming Language of Choice: C/C++
- Location: Umeå, Sweden
- Contact:
Fully doable, yes. And very interesting as well.
It's all in my head atm but the basic idea is simple. You've got your main thread and a loading thread. Whenever the main thread needs an external resource (sounds, textures, geometry, scripts, basically anything) it puts a request in a global queue. The loading thread checks this queue to see if anything's needed and loads it. If you happen to run low on memory, resources that haven't been used in a while are deleted.
This does however force you to be a lot smarter when you decide to make a game with it. You have to make sure there's enough memory for everything at any given time. And you have to make sure data can be delivered on time.
The one problem I see with doing this in KOS is using the ogg driver at the same time since that's also performing streaming.
It's all in my head atm but the basic idea is simple. You've got your main thread and a loading thread. Whenever the main thread needs an external resource (sounds, textures, geometry, scripts, basically anything) it puts a request in a global queue. The loading thread checks this queue to see if anything's needed and loads it. If you happen to run low on memory, resources that haven't been used in a while are deleted.
This does however force you to be a lot smarter when you decide to make a game with it. You have to make sure there's enough memory for everything at any given time. And you have to make sure data can be delivered on time.
The one problem I see with doing this in KOS is using the ogg driver at the same time since that's also performing streaming.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
-
- Chaos Rift Junior
- Posts: 272
- Joined: Wed Sep 29, 2004 5:53 pm
- Favorite Gaming Platforms: NES, SNES
- Programming Language of Choice: C/C++
- Location: Umeå, Sweden
- Contact:
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
I've been thinking about the idea more and more, and I realized that I did something actually very similar (on a muuuuch smaller scale) with Viva La Samba.
Please have a look here:
http://thechaosrift.com/phpBB2/viewtopic.php?t=1016
The streamer would grab a file from /pc (just change it to /cd) and grab only as many bytes per frame as the Coder's Cable or BBA would allow without causing any lag, and start building the file in RAM.
This allowed the game to execute completely normally, with a small loadbar in the corner showing the progress of the stream while you went about your business.
It only handled one file at a time, and it didn't use any sort of threading, just a simple UpdateStream() function.
It really did work out absolutely great for what it was meant to do. It's a shame that Viva never really got that far, because I put a lot of work into trying to get it to do that.
Please have a look here:
http://thechaosrift.com/phpBB2/viewtopic.php?t=1016
The streamer would grab a file from /pc (just change it to /cd) and grab only as many bytes per frame as the Coder's Cable or BBA would allow without causing any lag, and start building the file in RAM.
This allowed the game to execute completely normally, with a small loadbar in the corner showing the progress of the stream while you went about your business.
It only handled one file at a time, and it didn't use any sort of threading, just a simple UpdateStream() function.
It really did work out absolutely great for what it was meant to do. It's a shame that Viva never really got that far, because I put a lot of work into trying to get it to do that.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
On the subject of starting to make a real stream system, I was thinking about the transfers. For me, it's all good. I can stream from the /pc with the BBA at the speed that the DC could access the CD.
For the BBA, (according to my calculations(which could be erroneous)) you can do 1920 bytes/frame?
If the Coder's Cable's theoretical transfer rate is (115200 bytes/sec) / 1024 / 1024 = 1920 bytes/frame?
I mean, obviously you'll burn some CDs to make sure it can stream the expected amount in the given time, but eventually you won't want to do that. If you try to make the CC grab too much crap per frame, it simply waits until it's all grabbed, so it'll still work (but loadtimes) when you run your stream stuff from the Coder's Cable.
Do you intend to keep the streaming going on as you're working with the coder's cable and simply change things to /pc?
For the BBA, (according to my calculations(which could be erroneous)) you can do 1920 bytes/frame?
If the Coder's Cable's theoretical transfer rate is (115200 bytes/sec) / 1024 / 1024 = 1920 bytes/frame?
I mean, obviously you'll burn some CDs to make sure it can stream the expected amount in the given time, but eventually you won't want to do that. If you try to make the CC grab too much crap per frame, it simply waits until it's all grabbed, so it'll still work (but loadtimes) when you run your stream stuff from the Coder's Cable.
Do you intend to keep the streaming going on as you're working with the coder's cable and simply change things to /pc?
-
- Chaos Rift Junior
- Posts: 272
- Joined: Wed Sep 29, 2004 5:53 pm
- Favorite Gaming Platforms: NES, SNES
- Programming Language of Choice: C/C++
- Location: Umeå, Sweden
- Contact:
Yeah, using the CC for this would be a stupid idea. It's worse than working with a 1x disc speed. BBA is better but afaik a lot faster than reading from disc. If you want the real thing you'll eventually wanna put your resources on a disc. You can't really emulate the seeking time with a CC/BBA either.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact: