Jump to content

New here and wondernig about C# specifics


 Share

Recommended Posts

I don't actually have any problem with the addition of getters and setters, but the great thing about the API is you can generally guess what the command names are without knowing them. Sometimes in LE2, but much more often in LE3. I found myself even having to look up command names for particle emitters and some other things, so the consistent naming scheme in LE3 really helps.

 

I don't see how getters and setters can provide a consistent API in LE3. There's exceptions I pointed out. If it were just a matter of always switching the syntax in one way or another, I would be 100% in support of them, but they are limited. It would also mean a vastly different API to document, and we're having enough trouble finishing the docs for LE2.

 

That's why I'm suggesting the consistent documented class structure, and then implementing getters and setters in addition to that, and they can branch as far as you want from the C++ API without fear. C# users will get a documented API and will be able to follow C++ tutorials easily, and can still use the nice OO syntax, sort of like how I sometimes use operation overloading in my math code, i.e:

a = b + c.Normalize();

If anyone doesn't understand the API, they can just look at the C++ docs and it will match. If they are a good C# coder, then checking out the source or additional docs won't be a problem, and they'll probably end up use getters and setters for their most commonly modified code. By providing a base API that matches C++, we can be more inclusive of the C# programmers.

 

It's not a matter of C++ being better. I think every language except that one I made up is horrible. It's a matter of getting all the languages on roughly the same page so the community isn't branched in two development directions. C#, C++, and Lua all have a common OO structure they can share, so if it's consistent I only have to document things once. I don't just mean documentation, I mean all the tutorials and examples I put out and modify over the years. There's no way that can be duplicated and maintained because I can't even record all the changes I make and tell another person what they need to update.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The rumour is pretty much right: Werkspace is an elitist community

 

Elitist community? You are hanging onto this .NET ideal world. If the library was created specifically for .NET then I'd say by all means, but due to documentation constraints, multiple language support, and consistency requirements (real world issues) you have to bend your ideal .NET world to fit this world. You are simply refusing to budge on something so small as properties or get/set methods. Is it really that big of a deal? You have to get your mind out of the classroom and into the world of "things are rarely perfect so you have to bend the rules sometimes".

 

I think it would be a shame to lose you on the .NET side, but you have to be willing to meet 1/2 way with some stuff.

Link to comment
Share on other sites

@Josh

 

What would your opinion be on me working with you to design a .NET wrapper that precisely mimics the C++ interface? I'd also be happy to write proper documentation for it (and have it automatically generated via doxygen). If all works out to your liking, we can work on getting proper (and maybe official) support for the language in LE3.

There are three types of people in this world. People who make things happen. People who watch things happen. People who ask, "What happened?"

Let's make things happen.

Link to comment
Share on other sites

@Laslo. Don't be deterred by people attempting to derail the good work you have done. If you feel you don't want to compromise then keep your version as a community only supported version. It's not ideal but offers people choice. I do agree that an official supported version would be a good thing as it brings a sense of stability which can make all the difference when new people are making the decision to buy or not. Many developers have previous bad experiences of using community versions that subsequently lapse or disappear altogether. I also agree with Rick in as much as real world situations often demand some compromise from the ideal and as you appear to be one of the leading authorities here on C# could you not find a way to work with Josh on this?

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Why don't you just make a seperate get/set and and a GetValue()/SetValue() header version?

I don't know how good a C# compiler is in optimizing and eliminating unused code, but in C++ you could have both in one file, either using a #ifdef or just letting the compiler remove unused stuff.

 

There are people who prefer get/set, and there are people who prefer GetValue()/SetValue(). And they will keep their principles. Both methods have their own benefits.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

And to all potential buyers who view this reply (you probably won't, Josh will move it to the obscure C# forum), know that while Leadwerks is the best engine, Werkspace is the worst community.

 

 

 

How does your "spat" over c# involve the other 99%+ of the community and warrant it being termed as the worst?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Personally, I see no problem on using a raw library (like LE.NET is already) and then design a good C# library on top of it (like Leadwerks.NET is already), but not only a strict cool C# OO wrapper but more something like Lumooja's Gamelib, that is a pre-built game helper package to sell on the store, like the FPS/RTS/RPG constructor kits available on Unity's Asset Store. I would be more interested in doing such packages.

 

PS: of course as C# developer I find the raw getter/setter C++ method the worst ugly thing I can ever see. Up C# forever! :rolleyes:

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Personally, I see no problem on using a raw library (like LE.NET is already) and then design a good C# library on top of it (like Leadwerks.NET is already), but not only a strict cool C# OO wrapper but more something like Lumooja's Gamelib

 

The question on the table is more around trying to get an officially supported .NET version that Josh, not us, doesn't see a problem with. The creator of the library we are trying to bring to another language has some specific requirements that he's asking for in order for him to put his name on the port and officially support the product. His requirements conflict with the C# ideology but can be done with C#. So should we throw our hands in the air and stomp our feet and refuse to meet his requirements or should we take the opportunity to help bring a stable C# community to LE and meet his requirements so he officially supports it?

Link to comment
Share on other sites

Why don't you guys just forget about the words official and community and just do it?

Call it tested and fully functional or something like that instead.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Why don't you guys just forget about the words official and community and just do it?

Call it tested and fully functional or something like that instead.

 

That's what has been done up until now and it hasn't worked out all that well, if you haven't noticed. The whole point is to get support from Josh and not someone who will leave the community after making their wrapper.

Link to comment
Share on other sites

I don't think Josh can support much with the C# headers as the doesn't know the language very well.

You just need to make it working and test it, then Josh can at least include it with the SDK.

I think the problem with the C# headers was always that they had too many bugs, and nobody actually tested them fully.

 

That's really the only difference to the C/C++ headers, which are always tested and very carefully updated.

The other only difference is that the C# community doesn't have a clear infrastructure.

You need to elect someone who is responsible for the official C# headers. I think it was ZioRed earlier, not sure if he still is, or if he forgot about it :rolleyes:

It doesn't mean this guy needs to work 24/7 on the headers, but he just needs to organize the suggestions and votes and keep the official statements updated. Josh can then support the C# headers using the official statements, and if something doesn't work like officially stated, then ZioRed gets spanked.

 

If ZioRed, or whoever the official C# coordinator is, doesn't want to be the official coordinator anymore, then someone else gets elected.

That's how it goes with the C/C++ headers too. From time to time Roland is the official C++ guy, and from time to time he asks me if I want to be the official C++ guy again, since he is too busy with arts or other things in life. But there can only be one, at any time. Like in Highlander, Matrix, and StarWars too :)

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

FYI, I won't do anything thats windows-only in LE3. That's one of the design rules.

 

Ahh...LE3 is targetting Mac and/or Linux? So it won't be Windows only?

 

If so that would make Mono support far more desirable, which would invalidate C++ Interop anyway, as it's Windows only.

 

Rhino

Link to comment
Share on other sites

The rumour is pretty much right: Werkspace is an elitist community, and I'm done fighting that, I'll rather slip into the "snobs" (sic) who keep their code to themselves.

 

Where is this rumour. I've never heard it before.

 

And what's so wrong with precompiled binaries? Sure it means no one else can expand someone else's work, but I find when looking at other people's code: No matter how well the code is written, it's usually still pretty hard to follow. I'd use free (or cheap) compiled libs over open source any day.

 

 

while Leadwerks is the best engine, Werkspace is the worst community.

 

You do mean this werkspace, don't you? Not some obscure one with the same name? I mean wherever I look, all I see is encouragement, especially in the gallery.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

I was never near to be a coordinator or similar, I put my experience on the table and offer my spare time to help the community (and the company if it's needed), I think there shouldn't be any discussion about HOW the API should be, that is if Josh really want to mantain absolutely the same syntax for both C and C# then the "official" wrapper must be done in the way he decides. Then if someone doesn't like its design then he can ever build its own helper, BUT I think it's needed an "official" wrapper and its coordinator/technician (even with more than one member eventually, since Josh seems to not be the right person to work on C# currently).

 

The current LE.NET is build exactly like it is in the procedural C and I don't know of any open bugs reported, so I assume it works as intended. And someone already use it in the (bad) way of procedural programming or incapsulated in his own wrapper and nobody complains except the pure C#er, but I really don't care about if procedural way (and future LE3 C++ way) is ugly or beautiful, the point is that it must work :rolleyes:

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

I would suggest to Josh in order to qualify the C# headers as official the following should be done:

 

1) Verify that LE.NET works exactly like the procedural C headers.

2) Verify that LEO.NET works exactly like LEO, the OOP C++ headers.

3) Keep Leadwerks.NET outside of the official support, since it's like GameLib or Tiger which are also community supported.

4) Name someone who wants to coordinate all these steps, and who serves as contact person when there are problems with the LE.NET and LEO.NET headers.

 

Then Josh can contact this names person when someone reports a bug with the C# headers.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I think the uncertainty people express over C# has less to do with me not making it official, and more to do with the issues I described here, the implication being that I would devise some kind of consistent rule to clear all that up if I were to make it official.

 

API semantics and setters and getters vs. "traditional" properties are really all a moot point IMO. Seriously, there are bigger issues.

 

And you are correct, it's not about official vs. community vs. whatever. The reason I started the thread was to learn the state of it, to determine if I would have to be taking on this work myself, because as I stated I never rely on the community (but I don't mind consuming what they've already built if it saves me time). But more importantly, the point is to determine the PERFORMANCE ISSUES others have run into, if any, when using the procedural wrappers.

 

I get the feeling there has been a whole lotta wrapping, but not a whole lotta using. Which scares me.

 

For example, a lot of people have apparantly abandoned their C# LE projects. Now, with hobbyists this happens a lot anyway, regardless of the language. But how often has this happened because they ran into a fundamental problem and the only "solution" was to abandon ship and start over w/o C#?

 

This is the kind of info I'm trying to figure out. I'm sorry if a lot of this info already exists in the C# forum, but I can't read that. Plus, the other C# thread here I was particpating in just got moved (probably to the C# forum), so I can't see the replies there now either. ;-(

 

- Rhino

Link to comment
Share on other sites

LEO.NET has been dismissed and no longer supported by Roland/me.

Then you need to make sure that Leadwerks.NET is fully documented, if you want it to be a candidate for official support too.

It might be good to have in mind that LEO could be developed to be equal with Leadwerks.NET also, or then LEO could be also dismissed and Tiger would be the equivalent to Leadwerks.NET.

 

Basically the difference between LEO and Tiger, as well as between LEO.NET and Leadwerks.NET, is that they are more clean OOP structured, and not using so much procedural types and structures.

 

For example in Tiger there would be a real Vec3 class, which is probably what Leadwerks.NET also has.

This would also mean that both Tiger and Leadwerks.NET are actually closer to the BlitzMax mod, as it has also a real Vec3 class.

 

This would make it actually easier for Josh to support it, if it matches the BlitzMax syntax, and is very close how the engine internally really works. And it would be closer to LE3's syntax too, so the C# headers could be easier ported to LE3, and then LE2 and LE3 would be more similar also. Only benefits would come out in my opinion.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

For example, a lot of people have apparantly abandoned their C# LE projects. Now, with hobbyists this happens a lot anyway, regardless of the language. But how often has this happened because they ran into a fundamental problem and the only "solution" was to abandon ship and start over w/o C#?

I abandoned mine only because they are very far from end and I want to continue them without being worry that tomorrow I must modify it, so I'm waiting for LE3 and doing something else where in the meanwhile. I hadn't experienced any performance issue with the same C++ and C# code, may be just very few FPS (almost less than 10 however, on a mobile graphic card) in favor of C++ but it was perfectably acceptable I think.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

That's basically what we have today Lum and it's not working. The people in step 4 always leave. In LE 3 it sounds like the procedural concerns won't be there and instead mimic the C++ OO version in C#. Which should be very doable, but requires not being tied to the C# mentality to a T.

 

I disagree with your number 3 point. This is no way the same as GameLib. GameLib has specific game oriented and additional functionality that compliments the LE library. C#'s goal would be to provide the exact same functionality of LE so it can be used in another language. Just like the Lua port Josh did. C++, Lua, BMax, & C# would all be identical in functionality and look and feel. I know you would ask why anyone would want to not just use C++ but there are people out there and Josh is trying to mass appeal.

 

1) There are slight differences mostly due to callbacks and the extra parameter that Josh has.

2) I don't believe there is such a thing currently.

3) People don't want to work with unsupported languages and deal with the community drama and lack of response that comes with it.

4) Hasn't work and I would argue rarely does. There is little to no motivation for someone to stick around and deal with all the bugs that will come up and answer all these questions and deal with support stuff. Unless they are getting paid that is :rolleyes:

 

 

For example, a lot of people have apparantly abandoned their C# LE projects. Now, with hobbyists this happens a lot anyway, regardless of the language. But how often has this happened because they ran into a fundamental problem and the only "solution" was to abandon ship and start over w/o C#?

 

The fundamental problem for people using C# in LE, is that there is a bug and the person who wrote the port is no longer around and you find out your support is basically zero, and you don't want to spend your time messing around with the C# port code but instead make video games. Within the last 3 years I think we've had 4-5 different versions of a community driven C# port library. That tends to discourage the C# user base.

Link to comment
Share on other sites

So we must start with number 4) then :rolleyes:

 

This is a community, and we have C++, C#, artists, musicians, etc... subcommunities, and every community needs to have somekind of organization. Even the most carebearhug-hellokitty-democratic-equalrights communities need somekind of council or coordinator or spokes(wo)man, who only keeps track of what is the communities current trend and will. Every free software open source project has this too. Else it will be a chaos. Yes, they could use votes, and then the votes would be the coordinator, but it's a mess to vote on everything. Sometimes the leader needs to take responsibility and make decisions. If his/her decision was bad, he will get feedback and fix it.

 

Look how the C/C++ community works, and it works: There are 1 or 2 coordinators, who take feedback and suggestions from all others in the C/C++ community, and also from other subcommunities. They don't have to even code it themselves, as usually the one who suggests something gives you ready code to copy/paste. Of course it adds to the quality if you verify the code and check it for loop invariants and elegancy.

Nobody gets paid, but sometimes beneficial work is rewarded with special things. It's completely worth it.

 

I think first people from the C# community need to speak up who would be willing to be a respected C# coder of the Leadwerks Community. Isn't that title already a good reward? :)

 

Btw, you could use this title also in you CV when you look for a job, it's not like it means nothing. You would be C# lead programmer of a community with over 10000 people of the world's best 3D game engine! And I'm sure Josh would sign it, to make it an official statement from an official company.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

You would be C# lead programmer of a community with over 10000 people of the world's best 3D game engine! And I'm sure Josh would sign it, to make it an official statement from an official company.

 

 

10000?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Yes, it says so in the about page:

http://www.leadwerks.com/werkspace/page/company/about

 

Ah .. so 10,000 total customers of Leadweks products not the Engine.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...