View previous topic :: View next topic |
Author |
Message |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Mon Jun 14, 2010 11:51 pm Post subject: Re: Single Player Engine Needs? |
|
|
Baker wrote: | Baker wrote: | http://qexpo2003.quakedev.com/uploaded/9/digits.zip |
Sajt, this is a pretty neat mod you made. |
I looked at it for the first time since 2003 and was very disappointed. I thought I knew what I was doing back then, but I obviously didn't. First of all I broke the cardinal rule of modding and included a config.cfg in the zip file. Then, having glanced at the source... There are probably more incomprehensible decisions than there are lines of code. I have no idea why I did things the way I did. I'm pretty sure it's buggy, too. (How do you make something so simple buggy?) _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe. |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Tue Jun 15, 2010 4:45 am Post subject: |
|
|
theora might be a good choice for media (supports ogg/vorbis) and the movies created are not bad.
that is if anyone want to have media support in a quake engine ofc .
else just ogg/vorbis. |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Jun 15, 2010 8:36 am Post subject: |
|
|
which csqc itself is not saved in demos, its inputs are largely fed from the network - including from demos.
csqc and demos works the same way that tempents work in demos.
event here at this time, act upon it please.
record the imputs, know the outputs.
theoretically you could use csqc to get the various clients to reconnect to the original server in the case of a coop demo. it would not be pretty though.
q2 actually has a specific media-playing server state (map blah.cin+nextmap - once a player trys to skip blah.cin, cos it got to the end or whatever, it just starts the next map).
fte was able to play demos server-side at one point. overkill, but funny. wouldn't really recommend it.
or just play the video right at the start of the new map. don't really need protocol changes then, just a stuffcmd - playfilm blah.roq. you'd need to make sure that no monsters will see the player in the spawn area, but otherwise it should be fine. _________________ What's a signature? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Jun 15, 2010 8:55 am Post subject: |
|
|
Spike wrote: | 7. mp3 is patented, so this is risky. ogg is distributable. |
I couldn't remember the issue I have with .ogg and now I remember.
The implementation in DarkPlaces and FTEQW require altered memory management to feed the ogg data.
The reason this presents a bad hurdle for me is that my goals are to operate within a really narrow sandbox of far less features than most modified engines but gain the ability to easily port my engine to any platform of interest.
Some of these alternate platforms have some real limitations in the memory department.
Spike wrote: | q2 actually has a specific media-playing server state (map blah.cin+nextmap - once a player trys to skip blah.cin, cos it got to the end or whatever, it just starts the next map).
fte was able to play demos server-side at one point. overkill, but funny. wouldn't really recommend it.
or just play the video right at the start of the new map. don't really need protocol changes then, just a stuffcmd - playfilm blah.roq. you'd need to make sure that no monsters will see the player in the spawn area, but otherwise it should be fine. |
#2 sounds like a plan
Thanks  _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Jun 15, 2010 11:15 am Post subject: |
|
|
that's why you favour mp3 over ogg?
The file has to be decoded. It is not the decoding that imposes requirements upon quake's memory system, but how it is played. DP and FTE both attempt to decode oggs in realtime (FTE has a 'bug' in that it doesn't flush unneeded stream, but which means you can start playing it again easily, can't really comment on DP).
Point is, both mp3 and ogg have this issue. If you want a simple implementation, then just decode it at load time and cache the entire file in ram in its full 40mb pcm glory.
That's the reasoning behind the memory dependancy changes. Not the format itself, but its expected use.
It would have been simpler to just decode at load time and shove the data into cache memory and say 'hey everybody! good news! its a complete pcm stream now!', the same as .wav loading does. _________________ What's a signature? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Jun 15, 2010 11:56 am Post subject: |
|
|
Spike wrote: | that's why you favour mp3 over ogg?
The file has to be decoded. It is not the decoding that imposes requirements upon quake's memory system, but how it is played. DP and FTE both attempt to decode oggs in realtime (FTE has a 'bug' in that it doesn't flush unneeded stream, but which means you can start playing it again easily, can't really comment on DP).
Point is, both mp3 and ogg have this issue. |
Well, that is one main reason.
Of course the other reason is that a tutorial for MP3 implementation exists for Windows, the Kurok PSP Engine has hardware MP3 support built into it from another PSP Engine (PSP Quake 1.1 I think) and on OS X the Fruitz of Dojo port which was transformed into ProQuake 3.50 OS X by Woods and later to ProQuake 4 by me already has MP3 support as OS X has built-in API for it.
(ezQuake's Mac version, last time I checked used Fruitz of Dojo as the base too).
So I guess time is an important factor as well. I should have included that additional reason for completeness as well as mentioning that I don't want the headache of implementing a memory manager when on most systems just defaulting a decent heapsize handles 99% of the issues with no work.
I guess part of it then, you could say, is making the most of what is available quickly and with less resistance.
(And for Flash, I am considering the QuakeC .wav background music trick using a good ole #ifdef courtesy of your compiler If I ensure an ogg or mp3 converted to .wav is reasonably sized I can easily get away with doing that, heheh. )
The implementation of ogg in DarkPlaces and FTE is vastly superior and more platform neutral, of course. And with the mp3 method provided in the 3 platforms mentioned above, the drawback is being unable to put music in pak files. _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Tue Jun 15, 2010 12:10 pm Post subject: |
|
|
It's quite trivial to extend my latest version of the Windows code to support music from PAK files. On the other hand there are dependencies on other parts of my codde built in to it now, so it's not so portable to other engines.
One other reason to prefer MP3 is that support for it is quite pervasive. If 95% of your target PCs support a given format out of the box and with no additional software or codecs required to be installed in order to play it, then it seems to make sense to use that format, irrespective of technical or ideological superiority of other formats. It's called "pragmatism" I believe.  _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Jun 15, 2010 1:36 pm Post subject: |
|
|
mh wrote: | If 95% of your target PCs support a given format out of the box and with no additional software or codecs required to be installed in order to play it, then it seems to make sense to use that format, irrespective of technical or ideological superiority of other formats. |
Then 5% of users tell 95% of your users that it is a real pain to get it to work. And if that doesn't work, what else doesn't.
That, or 5% of your users fork another community which grows and takes 80% of the other users with them.
Its called "pessimism", I believe. :P
Having said that, modders won't use anything that doesn't work in vanilla anyway. That or they'll target a single engine and disregard any others. Mneh. Use mp3, just don't let them download it if they have a US ip address. That works too. _________________ What's a signature? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Jun 15, 2010 2:13 pm Post subject: |
|
|
Spike wrote: | Use mp3, just don't let them download it if they have a US ip address. That works too. |
I understand at least some of the licensing stuffs concerning mp3 patents. From what I understand, it involves encoders and decoders.
Someone making something of potential commercial value should definitely use Ogg Vorbis just to stay on the safe side.
Someone wanting to stand on the exact philosophical line of Software Libre and such should definitely use Ogg Vorbis.
Software patents cover everything on Earth which is why they are dumb and I think a common sense test applies when thinking of these issues.
I mean, Linux supposedly violates a number of Microsoft patents and the Theora video format supposedly violates some of the H.264 patent portfolio (1300+ patents) ... but that doesn't stop Nexuiz from having a Linux version and bundle a Theora dll library.
I'm not a lawyer but my understanding is that the mp3 stuffs cover encoders and decoders and I'm just using provided system APIs.
Under any reasonable definition of legal theory, I have a really, really hard time understanding how I could be infringing on someone's ip turf with very basic API usage.
If I wanted to be dogmatic about Free Software -- which is quite important by the way --- I'd hold out for ogg or just convert things to .wav files. But if I did, I doubt I'd be making a meaningful statement modding around for a now obscure engine. Not that I don't believe such a cause is worthy, but I do have limited time available and reinventing the wheel seems less than optimal. _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Tue Jun 15, 2010 2:59 pm Post subject: |
|
|
http://www.mpg123.de/
opensource mp3 codec.
works on windows to. |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Jun 15, 2010 3:05 pm Post subject: |
|
|
reckless wrote: | http://www.mpg123.de/
opensource mp3 codec.
works on windows to. |
Reckless, you edited your post
(I do that too ) _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Tue Jun 15, 2010 4:43 pm Post subject: |
|
|
Baker is correct, the MP3 patents only cover the development of codecs. If you're just using a pre-existing codec then you're in the clear, and the only reason to not at least support MP3 comes from an ideological perspective. Anything else is FUD. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Spirit

Joined: 20 Nov 2004 Posts: 476
|
Posted: Tue Jun 15, 2010 4:48 pm Post subject: |
|
|
Ogg Vorbis is much better than MP3. Same quality = smaller files. So just use it. _________________ Quake Maps |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Tue Jun 15, 2010 5:30 pm Post subject: |
|
|
oh you noticed that
well tbh i ment what i said if you actually managed to read some of it before i deleted it, but id rather not brink up the thread with 'issues'  |
|
Back to top |
|
 |
|