The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 07, 2024, 12:10:13 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  UQM Recreation
« previous next »
Pages: 1 ... 9 10 [11] 12 13 ... 18 Print
Author Topic: UQM Recreation  (Read 86501 times)
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
Re: UQM Recreation
« Reply #150 on: February 02, 2006, 12:49:10 am »

I just added the source to the cvs repository of the sourceforge site.
« Last Edit: February 02, 2006, 12:58:45 am by BioSlayer » Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
Sadness of the Day: Sound
« Reply #151 on: February 02, 2006, 07:36:10 am »

I was trying to get sound to work you know when the weapons fire they have the appropriate sound? I managed to get the battle music to play in the background with 4 lines of code.  But when I tried to get the weapon sounds SDL.Net got some rather strange errors. I know if that didn’t happen I would have had sound completely functional by now, on at least one ship if not all of them.

I’m so sad I really hate delays and wasted time. Cry 

Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
I once was deaf, but now I hear.
« Reply #152 on: February 03, 2006, 09:46:51 am »

here is the CVS info:
username@cvs.sourceforge.net:/cvsroot/sc2-remake
The module name is "The Ur-Quan ReMasters"

I just added sound using another method then SDL. 
Right now the Earthling Cruiser,The Ur-Quan Dreadnought and the Chmmr Avatar have all the sound associated with them working.  The rest have only the death sound.
The sound has only one channel though and can only play one sound at a time.  Undecided
But it will only be this way untill SDL.Net is fixed.

I decided not to do all the ships becuase I have decided its about time for me to start looking into lua.Net and to see how much of the ships logic I can put into the scripts. So right now im Thinking about what changes will be needed to support Lua.Net.

I have commited the most recent changes to the CVS repository.

Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
This is why I wrote my own physics engine.
« Reply #153 on: February 04, 2006, 08:04:34 am »

I tried to get Lua.Net working but it would not cooperate. Instead I fixed SDL.Net’s code concerning the sound and have switch back to that for the sound. Though the sound is strange. It pitch is significantly higher then it should be. The chmmrs primary weapon sound like an alarm clock. Anyone have knowledge of what up with this? Considering UQM uses SDL and I’m using a .Net wrapper for SDL, and it’s the same sound file. I kind of annoyed at how much trouble I’m having trying to get all these other people’s libraries to work.

Halleck are you still working on the website?
Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: UQM Recreation
« Reply #154 on: February 04, 2006, 12:29:03 pm »

We're using SDL in UQM, but not SDL_mixer or SDL_sound.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
Re: UQM Recreation
« Reply #155 on: February 04, 2006, 03:56:12 pm »

So how is sound played?
Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: UQM Recreation
« Reply #156 on: February 04, 2006, 04:19:02 pm »

Using the standard SDL audio functions, in combination with fOSSiL's home made mixer (or OpenAL, but that's not really generally usable).
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Halleck
Enlightened
*****
Offline Offline

Gender: Male
Posts: 752


Personal Text


View Profile WWW
Re: This is why I wrote my own physics engine.
« Reply #157 on: February 05, 2006, 12:29:52 am »

Halleck are you still working on the website?
It's coming along, albeit slowly. I'm trying to combine some ideas from the ogre template and the one Arne posted, and go from there.
Logged


Currently working on: Going outside more
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
BioNews: your daily source of bad grammer.
« Reply #158 on: February 05, 2006, 09:08:52 am »

It's coming along, albeit slowly. I'm trying to combine some ideas from the ogre template and the one Arne posted, and go from there.
OK I was just wondering (and planning and scheming but you don’t need to know about that!)


I’ve got the sound working completely now. It’s just that the .wav files had a strange frequency that everything but sdl.net could handle. So I just converted them to .ogg using an open source program called Audacity.  And they play at the correct rates now.

In other news:

Well I have decided that Lua.Net is not going to work out. Basically it is that Lua.net is for .Net 1.1 only as far as I can tell and there are no signs of life on the website. After that I thought about using Jscript to do my scripting. I was pretty darn impressed with C# ability to compile JScript and run it during run time. I was even more impressed when I figured out that it can do the exact same thing to C#. (Yes you heard me right a C# program can compile another C# program then run it.)

 So I was thinking I could use C# as my “scripting language” for things that require code to run. I tried it out and it worked! Self compiling code… I wonder if there is any good use for recursive compiling. I looked up on mono and it appears to have this ability as well, but I have not confirmed that. Anyone want to do that for me?

What do you guys think about having all the ship .cs files and any other .cs files that could be used for mods only compiled at runtime?

I could easily write code to check if the files have change last time the program was ran, and only compile it if it has, so it would still be fast if I can do it right.

The only real cons I can think of are:
It’s not simple, but lua.Net had the same problem also.
Its Huge risk of code injection, but lua.Net had the same problem also.

A few pros I can see are:
Consistency, there is absolutely no difference between C# and C#.
There is an IDE available for it.
It is Very powerful.
Clean Compared to a scripting language.
And it can be faster.

Any you can see that I haven’t?
« Last Edit: February 05, 2006, 09:10:38 am by BioSlayer » Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: UQM Recreation
« Reply #159 on: February 05, 2006, 09:49:25 am »

Using a scripting language you decide what it can do or not. If you're using C# for scripting, can you prevent it from using functions to read or write from files, or open sockets, etc?
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
Re: UQM Recreation
« Reply #160 on: February 05, 2006, 11:20:01 am »

Though i was thinking about this before you brought it up. I hadn't thought to heavily about it. So once i did started thinking heres what i thought up:

Actually I have a lot more control then I did with lua.net. When I compile it I have to tell the compiler class what assemblies for it to link with and I will keep it to System and the 2 assemblies I generate. Alone the System assembly contains a lot of code that could be very nasty.  So before I compile a piece of source code and run it I will look though it for keywords that are required (no way of going around using them) to get to the stuff that can do damage, and if they exist the compiler will skip that file.

Lua.net on the other hand I could not do that to, because it can reference any assembly it wants and it can do that though strings that are created in the script. C# does have a similar ability, but they would have to use the classes in the Reflection namespace and I scan for that word.   Cool

I think that’s a pretty convincing and secure way of doing things do you agree?

« Last Edit: February 05, 2006, 11:40:56 am by BioSlayer » Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: UQM Recreation
« Reply #161 on: February 05, 2006, 12:15:35 pm »

Not bad, that C# (at least in this aspect).
Although I would suggest instead of naming the things the script writer can't use, you name the things he/she can use, and forbid the rest. That way, if you overlook something, or a new version of C# adds a new function that can be abused, you won't have a security hole. It's a good security principle in general btw, having 'deny' as default.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Erekose
Zebranky food
*
Offline Offline

Posts: 1



View Profile
Re: UQM Recreation
« Reply #162 on: February 05, 2006, 06:01:35 pm »

I've been lurking in this forum for quite some time now, several years in fact and first I have to thank the creators of Ur-Quan Masters for doing such a great job bringing back this classic.

Second I come from a Java background and I know that many of the features of c# and Java are similar so may be there is also an equivalent for Java's security system. The Java security system handles sets of permissions that are applied to code, depending on the fact, how it was loaded. Permissions can control a lot of features on a very fine granularity, ranging from creating, writing and reading files on the system, connecting to the network, creating new threads down to reading the which Java version runs the code. This technique is used for Applets for example.

To come to the point, if c# supports a similar facility it would be ideal to prevent code loaded with the script classloader (or whatever the c# equivalent for loading code at runtime is) to do anything harmful. So it might be worth the time to check if c# supports that.

Anyway I think you are doing a great job on your remake and I can't wait for it to be finished.
Logged
DwD
Zebranky food
*
Offline Offline

Gender: Male
Posts: 21


ancay ouyay eakspay igpay atinlay?


View Profile
Re: UQM Recreation
« Reply #163 on: February 06, 2006, 01:04:41 am »

I have downloaded, compiled and played with your 2D Physics Engine from sourceforge.net.

I gotta say it's interesting.  I'm perusing your code for tidbits I might use in my own feeble programming efforts.

Keep at it, I can't wait to see a functioning meelee.

 Grin
Logged
JonoPorter
Enlightened
*****
Offline Offline

Gender: Male
Posts: 656


Don't mess with the US.


View Profile WWW
When games need security.
« Reply #164 on: February 06, 2006, 02:37:37 am »

I just included the security restrictions part of the C# as well, but I’m leaving my code in place because when the security restrictions are violated it throws a run time error and I don’t want my game crashing because some one is trying to be a moron. The security is so tight around these that the only way they could use them with nefarious intent is if the system the game is running on or the game itself is already compromised.

 I also added a hash checking to see if the source file needs to be recompiled. It also checks to see if the .dll generated from the source file is altered. And just to go the extra mile the file the hash code is stored in is encrypted! I may have to remove the encryption part if mono does not support it.

This all happens when the game is started up so you don’t have to worry about it slowing the game down once it’s running.

Not bad, that C# (at least in this aspect).
Although I would suggest instead of naming the things the script writer can't use, you name the things he/she can use, and forbid the rest. That way, if you overlook something, or a new version of C# adds a new function that can be abused, you won't have a security hole. It's a good security principle in general btw, having 'deny' as default.
It is a good suggestion, but that would not be as easy as you make it sound.
Also .Net does not change very often there has been like 3 versions of it so far (that I know of), and I pretty sure the compiler built into C# would compile it as the version the game was compiled as.


Keep at it, I can't wait to see a functioning meelee.
The current release on the website is functional it’s just not complete. unless you want to report a bug?
« Last Edit: February 06, 2006, 10:09:07 am by BioSlayer » Logged

There are none so blind as those who will not see. — Jonathan Swift

My Remake of UQM.
My 2D physics engine
Both are written in C#.
Pages: 1 ... 9 10 [11] 12 13 ... 18 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!