Forums

Questions regarding features/planned features.

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Questions regarding features/planned features.

Postby izackp » Wed Jul 02, 2014 10:17 am

Hi,

I'm in the process of creating a game engine, and I've chosen to use the C# language. However, I've recently stumbled upon Cobra when trying to find ways to implement Scala traits in C# and I do, in-fact, find this language very interesting and I like the concept.

There is a few requirements that I need to meet with my game engine. I want to be able to rewrite classes during runtime, and try to get to 'live coding' as close as possible without using horrid scripting languages like LUA. I planned to accomplish this through CodeDom and reloading the AppDomain + De/Serializing game state on reload. However, I see that CodeDom isn't supported yet in Cobra.

Is there any planned features for a runtime interpreter or the ability to add/swap/delete class/methods during runtime?

Also, I see you have an 'accurate' float called decimal. Is this type accurate across architectures (arm, x86, ppc, ect)?

How far is Cobra from version 1.0?

I'm also assuming performance compares with C# since Cobra generates C# apparently.

I had more questions, but I forgot them as I was writing this :/ lol
izackp
 
Posts: 3

Re: Questions regarding features/planned features.

Postby Charles » Thu Jul 03, 2014 10:22 pm

Regarding CodeDom, which can refer to more than one thing, did you mean you wanted to instantiate CodeDom classes representing code and then have the equivalent Cobra generated? Or did you mean that you wanted to invoke the Cobra compiler on Cobra source code?

Someone started a project here, but it's currently stale:
https://code.google.com/p/cobra-codedom/source/browse/

I don't currently have short term plans for a run-time interpreter or code swapping.

Regarding "decimal", it's customary for game engines to use float64.

Regarding 1.0, I'm not sure. I'd like Cobra to be free of known bugs and it only takes one to ruin that party.

Yes, Cobra's performance is comparable to C#. Out of the box, it may run a bit slower due to some extra run-time checks, but you can use the -turbo option to strip those out and get near identical performance. You can use "cobra -help" to see what -turbo is turning off.

Btw, have you looked at MonoGame?
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Questions regarding features/planned features.

Postby izackp » Fri Jul 04, 2014 2:51 pm

Thanks for taking the time to reply.

What I meant with codedom is that I wanted to compile and run cobra code during runtime.

I suppose 'accurate' doesn't mean 'deterministic'. If it uses a float then its not deterministic. Which was actually what I was wondering about. It would be incredibly neat if a language had a built-in deterministic 'float' type.

Currently, my game engine is built on top of MonoGame right now. However, I've actually shifted my research towards llvm. I'm probably going to experiment with that for a while.

Thanks again, this information was very helpful.
izackp
 
Posts: 3


Return to Discussion

Who is online

Users browsing this forum: No registered users and 109 guests

cron