New coding languages

Posted By: Joquan

New coding languages - 02/19/10 22:16

Maybe you guys could expand the coding languages used in A8. I know JavaScript better than C++ or Lite-C. Also, it could run in Java or something like it.
Posted By: Rei_Ayanami

Re: New coding languages - 02/19/10 22:54

What???

Lite-C is great!!!

JCL often explaines why he doesen't want to use C++ or javascript -> it too complicated for beginners and Lite-C isn't old and many users like it!

Please don't change the language wink !
Posted By: Quad

Re: New coding languages - 02/19/10 23:01

do you have any idea how much it took to stabilze lite-c wink ?
2 years.

Anyhow, javasctipt,lite-c,c,c++,java are all from same language family even you could count php and python as their relatives. If you know one of these languages, it is not very hard to learn others. In fact main idea of the programming is not about knowing the language, everyone knows c++ but note everyone can come up with an engine like cryengine3.(just like everyone knows English, but not everyone is Shakespaere). It's about your "design" and methods of programming. It's about your algorithms. Once you have a proper algorithm, language doesnot really matter, it is only the tool for implemeantation. K, enougn of this crap... Lite-c is very smiliar to languages you counted, only easier. It is actually alot easier than Java.

Also, no A8 in the horizon.
Posted By: ventilator

Re: New coding languages - 02/19/10 23:03

i don't think javascript would be more complicated than lite-c. rather a bit easier since javascript has automatic memory management, more convenient string handling, dynamic arrays and so on.

you can already use javascript with a7 though. you just have to create a wrapper like i did for python for example. laugh

http://code.google.com/p/v8/
it would be quite interesting to use google's v8 javascript engine with a7. their jit compiler is supposed to be really fast.
Posted By: mikaldinho

Re: New coding languages - 02/21/10 13:08

i dont think they should change the language- i think there should be more variety in A8. like javascript,c++,etc.
Posted By: Joey

Re: New coding languages - 02/21/10 14:18

javascript can handle memory management, but you can write incredibly inefficient code with it. lite-c is so restrictive that these errors occur less often.
Posted By: mikaldinho

Re: New coding languages - 02/21/10 14:28

yes. thaat makes sense.
Posted By: ventilator

Re: New coding languages - 02/21/10 14:32

the restrictiveness of lite-c can also be quite annoying and a productivity killer though and the nature of lite-c can lead to different kinds of very hard to find errors. for most projects i prefer a higher level language than c.

...
i have looked a bit into javascript engines and now i think for a7 tracemonkey would be better than v8 since it supports coroutines which would come in handy for doing a lite-c like scheduler. unfortunately there don't seem to be any good tools for helping with generating the wrapper code. doing it manually would be quite an effort.
Posted By: mikaldinho

Re: New coding languages - 02/21/10 14:37

ok. again, that makes sense
Posted By: ventilator

Re: New coding languages - 02/21/10 14:44

actually the engine only would need an official high quality .net wrapper. then everyone could use the .net version of their favorite language.

for my taste the c# wrapper by stromausfall requires to write way too verbose code and it doesn't really have an elegant object oriented design but i haven't checked recent versions so i am sorry if i am wrong. laugh
Posted By: FBL

Re: New coding languages - 02/21/10 18:47

The problem of Lite-C is that it is C minus sth plus sth else.

The plus is fine and it's great as it is geared to make use of the engine easier, but it if it already called C I'd expect the compiler to be able to compile ANY C command and any C notation.

This unfortunately is not fully the case. I hope they're going to change this in the future.
Posted By: HeelX

Re: New coding languages - 02/21/10 20:34

Instead of asking for languages I would vote for a complete tutorial for setting up a Visual Studio environment and how to write a game in C++ while inventing a pattern that bridges the gap between Lite-C, C++ and the wait(1) paradigma. This is hard, I am thinking about this now for months (while not being able to develop games at the moment). Make Gamestudio more C++ friendly, and I mean object orientated C++, not that C style stuff.
Posted By: Joozey

Re: New coding languages - 02/21/10 21:33

Why does everyone talk about replacing lite-c? Nobody said lite-c should be replaced, but extended. A port to a new language instead of only C/C++. Although I don't see the point in having a hook to Java other than "convenience". It's more advisable to learn C++ straight away as C++ allows more than Java does on win32 systems, which is what 3dgs is designed for. Javascript may be more flexible than lite-c, but it's generally equally easy when you take in account all other factors, plus you will only be limited more (don't know javascript that well but I think the extra possibilities you get on javascript-side will not make up for the limitations you create with it on engine-side.
Posted By: MMike

Re: New coding languages - 02/22/10 01:27

this topic is somehow odd. Lite-c could be extended but dont need to replace.. its like we changed from wdl to lite-c then, another comes, well this can't be changing all the time..

If you love jva you start visual C++ and do it from scratch...

Other than extending coding capabilities i see no sense on this.
Posted By: DJBMASTER

Re: New coding languages - 02/22/10 02:13

The C# wrapper is the most powerful solution at the moment, in my opinion and C# is much easier to get started with than C++. The .NET framework is just awesome.

Life is just so much simpler. I'm writing an application now that creates entities, sets some values and adds them to a list for later use. In Lite-C/C++ this is a nightmare, as you have to handle the memory allocation yourself. In C# it's just List<Entity>.Add(new Entity(bla...));

I know I probably sound like a right fanboy, but I'm just so impressed in how long it takes to develop a program in C#, compared to C++.

If you want all the OOP side of C++ (without the multiple inheritence), and all the graphics power of acknex, then have a go at C#.

Of course conitec shouldn't change the language too much, because lite-c is a nice little language. We just need support for classes, operator overloading, better string handling, etc.

Just my thoughts...
Posted By: MMike

Re: New coding languages - 02/22/10 02:57

i think the string handling is fair enought.. the char its just great..

char a = "hello"

and modifiyng char strings by a="modify" .. without the str_cpy..
Posted By: MasterQ32

Re: New coding languages - 02/22/10 20:03

I didn't try the c#-wrapper yet, but c# was my first programming language an i LOVE it.
Look, how much code do you need in lite-c to read out a simple file and store the values to something. In c# you have minimal one Line:
Code:
string[] data = File.ReadAllLines("test.txt");


Now you have as string array with all lines of the file test.txt.
Also the compiler has much more better error handling. And your errors are clear.
Something like this code is the best way to debug some problems you can't debug with the debugger laugh
Code:
try
{
	Game();
}
catch(Exeption ex)
{
	MessageBox.Show(ex.Message);
}



Now you have a very good information, if any error occurs.

So i think, this is a good language to write games.
Posted By: Tempelbauer

Re: New coding languages - 02/23/10 18:04

i like c# too laugh
in c# you can code very clear and fast

you should try the c# wrapper wink
alternatively, there some other game engines using c#: the OGRE-engine also has a Wrapper. Or you use the XNA-framework by microsoft

but i prefer gamestudio. even i have to code in c-script (im using A6)
Posted By: Joey

Re: New coding languages - 02/23/10 19:41

Originally Posted By: DJBMASTER
I'm writing an application now that creates entities, sets some values and adds them to a list for later use. In Lite-C/C++ this is a nightmare, as you have to handle the memory allocation yourself. In C# it's just List<Entity>.Add(new Entity(bla...));

no, it isn't, that doesn't look like a valid code snippet to me; Add is no static member of List. even in c# you need two lines for that.
look here:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=202423

then it's:
Code:
llist *list = new_llist();
list_add(list, ent_create(...));


Originally Posted By: MMike
the char its just great..
char a = "hello"

do you mean string a?

Originally Posted By: Richi007
Something like this code is the best way to debug some problems you can't debug with the debugger laugh
Code:
try
{
	Game();
}
catch(Exeption ex)
{
	MessageBox.Show(ex.Message);
}


you're right that it is more painful to debug lite-c code than it is to debug with the visual studio, but that's not a feature of c#. exception handling is useful but code like yours doesn't solve problems, it just shows you that there is a problem, which is not the purpose of this language feature.

to add my opinion to this thread, i feel that people think with c# they'll be able to develop games more easily and faster. that's wrong. if you can't write your game in c, you can't write it in javascript or c#. why? because you're bypassing the most simple things in game development like arrays and reading files. this is basic knowledge and with, say, 10000 lines of your own code you have an equally powerful code set which is both faster and more flexible. and then people who don't know how to read a file and store it in strings with a7 don't know the engine very well. the .net library is an easy-to-use and extremely powerful collection of functions that noone really knows by heart, but if you're giving me examples of how easy it is to create entities in c# or to have lists or whatever you have mentioned it will just make me laugh. c# is so much more.

Originally Posted By: Richi007
Look, how much code do you need in lite-c to read out a simple file and store the values to something. In c# you have minimal one Line:
Code:
string[] data = File.ReadAllLines("test.txt");


that's exactly what i'm talking about. honestly, if you're not good at english, you start learning french, and then, because you're not good at french you try chinese? c# is not the answer to everything.

Code:
TEXT* lines = {strings = 2000; }
txt_load(lines, "test.txt");


does the very same job. that's a damn lot of lines.

sorry if my words sound a bit harsh but i felt like here were some people discussing a matter they haven't really understood in first place.
Posted By: amy

Re: New coding languages - 02/23/10 22:59

The point isn't that Lite-C is too hard. The point is that it's very cumbersome to do some things and that even professional programmers are more productive with higher level languages. Or why did languages like C# become so popular in the first place?

Quote:
this is basic knowledge and with, say, 10000 lines of your own code you have an equally powerful code set which is both faster and more flexible.


Are you kidding me? So this is Gamestudio's selling point? tongue "Our language is so low level and old school that you first have to write 10000 lines of code to provide standard features of more modern other languages."

I am sure the average Gamestudio user will have a lot of fun writing all the infrastructure for linked lists, hash-tables and so on. tongue I really doubt that the result would be faster and more flexible.

At least Lite-C should come with an official standard library.
Posted By: Joey

Re: New coding languages - 02/23/10 23:11

a c standard library would indeed be useful. you're right that the average user will not produce faster code, maybe i exaggerated a bit; but i hope you're getting my point? 10000 lines of code is not much. if you're serious about game development, you should be able to do such stuff for yourself.

still, the main point was not about how fast your hashtable is, but that people are happy about how fast they can code the simplest things. but it's the hard, the really hard things where c# can draw all its trumps. delegates, events, object-oriented coding, databases, exception handling, stuff you _could_ emulate in c but which produces huge code files and requires strict code writing, not to mention the external libraries you would have to include. that's the real advantage of c# (part of it also applies to c++), and i had the impression that people don't see that as an advantage but merely the fancy look of their extremely elegant entity creation (just an example).

in my opinion, the reason why c# is so popular is the preinstalled .net framework on windows machines, the huge library, the free development tools and the relatively loose strictness of the language which makes it suitable for people who haven't learnt a low level language and who just want to get instant results.
Posted By: amy

Re: New coding languages - 02/23/10 23:30

You have to keep in mind that Gamestudio mainly is a hobbyist engine.

C# isn't only popular because it's more usable for non-professional programmers. Even for low level programming gurus it is a more productive tool for many projects.

You have to use the right tool for the right job. In my opinion in 2010 higher level languages in most cases make more sense for writing gameplay code like the majority of Gamestudio projects need.

I agree about C#'s trumps of course and that the examples weren't ideal.
Posted By: DJBMASTER

Re: New coding languages - 02/23/10 23:48

@Joey > Of course I realise that my List<Entity>.Add() statement wouldn't compile, it was just an example, to show the easy use of C# with storing objects. I also noticed mmike's statement of char a = "hello" wasn't valid, but I didn't complain because I realised he probably meant char*.

Then again, I'm not as picky as you.
Posted By: FBL

Re: New coding languages - 02/24/10 07:00

OOP certainly makes sense for game development. I have to agree there fully.
Unfortunately I'm afraid that Lite-C will not go a lot further towards OOP int he future.

At least member functions with 'this' pointer for structs would be sooo lovely ...
Posted By: Joey

Re: New coding languages - 02/24/10 09:03

Originally Posted By: DJBMASTER
Then again, I'm not as picky as you.

i'm not picky, i'm sure you know this code would not compile, but imagine some newbie reading it? and i just said that to show that even in c# you need two lines, just like in c.

and i'm a fan of oop and c#, javascript or whatever language has been mentioned here. but do you really think the hobby game developer will draw advantages out of these languages? i don't think oop is good for beginners. but then, of course, for the more advanced users c# would be nifty...
Posted By: MMike

Re: New coding languages - 02/24/10 11:03

just to say: i mean the char* a= " plain text" .. in strings you cant do that directly...
© 2024 lite-C Forums