Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 10/15/09 13:10

Shade
Member
From: OH, USA
Registered: 06/08/08

Oni written in BSL?

Isn't Oni written in BSL? If so, Where could I possibly learn it? I know its a programming language but I'm just curious if this is easy to learn.

Offline

#2 10/15/09 13:10

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni written in BSL?

Oni was written in C.  BSL is just a scripting language that Oni was programmed (in C) to understand so game events could be driven by simple text files written by the devs.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#3 10/15/09 14:10

Shade
Member
From: OH, USA
Registered: 06/08/08

Re: Oni written in BSL?

Iritscen wrote:

Oni was written in C.  BSL is just a scripting language that Oni was programmed (in C) to understand so game events could be driven by simple text files written by the devs.

Sweet, since BSL is scripting, Where could I learn this?

Also if I were to learn a programming language, Should I start with C? Allot of people reccomened it so I don't know about this. I need some advice from the experts.

Offline

#4 10/15/09 14:10

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni written in BSL?

Well, as far as learning BSL, just take a look around the wiki, there's a link to the scripting section on the front page.  The best way to actually pick up a practical understanding of the language is to read and alter existing scripts, and then you use the wiki to look up functions and variables on the wiki when you are wondering how to do something you haven't seen yet.

If you want to learn a programming language, then yes, C is usually the place to start, it's the de facto language for people who want to write a desktop application for a home computer.  The only proper ways to learn C are taking a class in school or getting a book and studying it carefully -- the premiere ones are "C Programming Language" by Kernighan & Ritchie, "Programming in C" by Stephen Kochan, and the "C Primer Plus" by Stephen Prata.  These are huge books, but the really important stuff tends to be in the first half of books like this, then after that it's just icing on the cake.

In fact, you ultimately want to advance to C++ to get anywhere in the real world of programming, but it sets the best foundation, long-term, if you start by only learning C, then add on C++ afterward.  That being said, it's not a terrible thing to pick them both up at once, just a bit confusing if the lesson isn't organized just right.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#5 10/15/09 16:10

Shade
Member
From: OH, USA
Registered: 06/08/08

Re: Oni written in BSL?

Iritscen wrote:

Well, as far as learning BSL, just take a look around the wiki, there's a link to the scripting section on the front page.  The best way to actually pick up a practical understanding of the language is to read and alter existing scripts, and then you use the wiki to look up functions and variables on the wiki when you are wondering how to do something you haven't seen yet.

If you want to learn a programming language, then yes, C is usually the place to start, it's the de facto language for people who want to write a desktop application for a home computer.  The only proper ways to learn C are taking a class in school or getting a book and studying it carefully -- the premiere ones are "C Programming Language" by Kernighan & Ritchie, "Programming in C" by Stephen Kochan, and the "C Primer Plus" by Stephen Prata.  These are huge books, but the really important stuff tends to be in the first half of books like this, then after that it's just icing on the cake.

In fact, you ultimately want to advance to C++ to get anywhere in the real world of programming, but it sets the best foundation, long-term, if you start by only learning C, then add on C++ afterward.  That being said, it's not a terrible thing to pick them both up at once, just a bit confusing if the lesson isn't organized just right.


Thanks man, Your a big help big_smile

Offline

#6 10/16/09 00:10

Alloc
Member
From: Germany -> Darmstadt
Registered: 01/14/07
Website

Re: Oni written in BSL?

Iritscen wrote:

If you want to learn a programming language, then yes, C is usually the place to start, it's the de facto language for people who want to write a desktop application for a home computer.

Well ... IMHO (which is shared by many other people / developers I know) C/C++ won't really be that interesting for desktop applications for much longer. It's quite outdated and way too problematic (eg. unsafe code). Of course it won't vanish anytime soon but it will not be that important for desktop applications for sure, only for low-level stuff and/or performance critical things.

I'd recommend some managed language (Java, any .Net-language) but in the end it doesn't matter what language you learn. If you really understand what you're doing in one language you won't (or at least shouldn't) have any problems "learning" another one since at that point it mostly boils down to learning the new syntax.

Regards,
Chris


ONI2.net, link to just any important resource-pages about ONI.

Offline

#7 10/16/09 00:10

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Oni written in BSL?

What is so special about .NET again?


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#8 10/16/09 01:10

Shade
Member
From: OH, USA
Registered: 06/08/08

Re: Oni written in BSL?

Gumby wrote:

What is so special about .NET again?

*Shrugs*

Offline

#9 10/16/09 07:10

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni written in BSL?

I think Gumby was asking Alloc, Shade. wink

Alloc wrote:

Well ... IMHO (which is shared by many other people / developers I know) C/C++ won't really be that interesting for desktop applications for much longer. It's quite outdated and way too problematic (eg. unsafe code).

Heh, I wondered if someone was going to speak up in disagreement when I said that C was the language to learn.  Well, code is only as "unsafe" as we write it, since C/C++ has managed to be good enough for hundreds of thousands of programs over the years.  Well, .NET uses C#, right?  And the Mac uses Objective-C.  So in either case someone should still start by learning C, right?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#10 10/16/09 07:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Re: Oni written in BSL?

Shade wrote:

Also if I were to learn a programming language, Should I start with C? Allot of people reccomened it so I don't know about this. I need some advice from the experts.

I really love C as a language. It's elegant, fast, powerful and it's not bloated with excessively large runtime libraries. The problem is, it can be a little difficult, especially for first time programmers because it forces the programmer to think in the way a computer works. This means it has a pretty big learning curve. So, as much as I love the language, I really don't think it would be good as a first time language.

Iritscen wrote:

"C Programming Language" by Kernighan & Ritchie

This is a really good book big_smile If you are going to learn C, I recommend tracking down a copy.

Alloc wrote:

Well ... IMHO (which is shared by many other people / developers I know) C/C++ won't really be that interesting for desktop applications for much longer. It's quite outdated and way too problematic (eg. unsafe code). Of course it won't vanish anytime soon but it will not be that important for desktop applications for sure, only for low-level stuff and/or performance critical things.

I'd recommend some managed language (Java, any .Net-language) ...

I have to disagree with this. Big, high-level languages don't sit right with me, especially if they have to run in a VM. When I program, I see every part of the application as performance critical code. The reason why large software packages, such as Photoshop take a long time to load is because the developers don't treat every section of code as "performance critical". Some of my favourite applications such as uTorrent and Google Chrome are as fast as they are because they are written efficiently, in a native programming language. My least favourite programs are like Inkscape, which includes slow, poorly written Python modules.

It is also very uncommon for professional software to be written in .NET or Java. Neither Windows or Mac OS comes packaged with any software written in these two languages and pretty much every sucessful software package is written in C++.

Alloc wrote:

If you really understand what you're doing in one language you won't (or at least shouldn't) have any problems "learning" another one since at that point it mostly boils down to learning the new syntax.

Regards,
Chris

This is true, especially for "curly bracket" languages like C, C++, C#, Java and Javascript. Skills from one easily transfer to the others.

Gumby wrote:

What is so special about .NET again?

Not too much. Most of the .NET languages are type-safe which means it's almost impossible to write malware that attacks a .NET app through the usual methods (buffer overflows etc.), but also means no pointer arithmetic sad .NET is also a high-level virtual machine, which makes it easy port to other platforms (Mono on MacOS or Linux). I don't really like it because it makes slower, larger code than C and C++, but as a first language C# would be alright.

Offline

#11 10/16/09 08:10

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni written in BSL?

RossyMiles wrote:
Shade wrote:

Also if I were to learn a programming language, Should I start with C? Allot of people reccomened it so I don't know about this. I need some advice from the experts.

I really love C as a language. It's elegant, fast, powerful and it's not bloated with excessively large runtime libraries. The problem is, it can be a little difficult, especially for first time programmers because it forces the programmer to think in the way a computer works. This means it has a pretty big learning curve. So, as much as I love the language, I really don't think it would be good as a first time language.

So what would you recommend learning first, a scripting-type language?  It's true that it's easiest to learn some of the basic programming concepts from those languages.  I guess I forget that I was playing with stuff like Basic, HyperTalk and AppleScript before learning C.  But a lot of people really do start learning programming with C; it's by no means rocket science.  Actual, professional programming can be rocket science, but learning basic C is not.

Big, high-level languages don't sit right with me, especially if they have to run in a VM.

But this, Shade, is why you want to eventually learn C and not stick with scripting languages, because scripting code is interpreted by the computer as the program runs.  It makes the computer do much more work than when you use a compiled language like C.

Neither Windows or Mac OS comes packaged with any software written in these two languages and pretty much every sucessful software package is written in C++.

Well, the classic Mac OS used Pascal and then C/C++, and now we use C/Obj-C.  But yes to everything you said about how successful software is not really written in the higher level languages.  I use Vuze, which is apparently running in Java, and it's slow as molasses.  I know Java's supposed to be faster these days, but it's still not comparable to a fully-compiled language in my opinion.

RossyMiles wrote:
Alloc wrote:

If you really understand what you're doing in one language you won't (or at least shouldn't) have any problems "learning" another one since at that point it mostly boils down to learning the new syntax.

This is true, especially for "curly bracket" languages like C, C++, C#, Java and Javascript. Skills from one easily transfer to the others.

Exactly, this is why you don't need to worry too much about what you learn first.  But keep this one thing in mind: there's two kinds of programming -- procedural and object-oriented.  It's best IMHO to learn procedural first (such as C or Pascal), then learn object-oriented programming next (like C++ or Java).


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#12 10/16/09 08:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Re: Oni written in BSL?

Iritscen wrote:

So what would you recommend learning first, a scripting-type language?  It's true that it's easiest to learn some of the basic programming concepts from those languages.  I guess I forget that I was playing with stuff like Basic, HyperTalk and AppleScript before learning C.

A scripting language might be an idea big_smile AutoIt (http://www.autoitscript.com/autoit3/) isn't too hard and the programs written in it are immeadiately useful. Not to mention, many AutoIt functions are similar to the C functions in the Windows API, so some skills might transfer to C.

EDIT:

Iritscen wrote:

But a lot of people really do start learning programming with C; it's by no means rocket science.  Actual, professional programming can be rocket science, but learning basic C is not.

This is true, but the number of people starting with C is getting less and less. As computers get easier to use and more user friendly, the skills required to program in C become less relevant. For example, most people will start off with a text-based app as their first C program. Back in the days of DOS and Windows 9x this wasn't too bad as a lot of other programs were also text-based. However, today people see text-based applications as dated and useless and the amount of skill required to write a GUI based app in C is much greater (not to mention, there are barely any tutorials on the net about how to use C to make Win32 apps). This has the effect of making the learning curve for C a lot steeper than it should be.

Last edited by RossyMiles (10/16/09 08:10)

Offline

#13 10/16/09 09:10

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni written in BSL?

It's true, GUIs can be a pain in the butt.  We have a fancy visual way of laying out and connecting the interface in OS X, but I still don't find it very intuitive.  But you can't avoid having to set UI stuff up no matter what language you use, can you?  You always need to say "put this button here" and "connect this button to this function".


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#14 10/16/09 10:10

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Oni written in BSL?

I'm quite happy with the GUI system that I set up for AE (other than the multithreading issues on OSX...).

Also, in my C++ class in college, we started off with text programs. wink


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#15 10/16/09 14:10

Alloc
Member
From: Germany -> Darmstadt
Registered: 01/14/07
Website

Re: Oni written in BSL?

Iritscen wrote:

Well, code is only as "unsafe" as we write it, since C/C++ has managed to be good enough for hundreds of thousands of programs over the years.

Exactly ... but there are languages where writing unsafe code is easier than others. C/++ is the best example for them (just check where eg most buffer overflow hacks are working).

Iritscen wrote:

Well, .NET uses C#, right?

.Net is supported by a loooot of languages by now. C# is just the most prominent one amongst them.

Iritscen wrote:

And the Mac uses Objective-C.  So in either case someone should still start by learning C, right?

C# is not a direct successor of C. It's similar, sure, but a lot more different than C++ and C. I would never recommend C as the first language. Unstructured as hell, stuff like header-files and preprocessor all the way.



RossyMiles wrote:

I have to disagree with this. Big, high-level languages don't sit right with me, especially if they have to run in a VM.

The question is whether this has anything to do with the "learning" part of programming. Maybe your applications would be "better" if they were native code but you'll have to do a lot more yourself. For learning at least Java is a lot better fit than C/C++ wink

RossyMiles wrote:

When I program, I see every part of the application as performance critical code. The reason why large software packages, such as Photoshop take a long time to load is because the developers don't treat every section of code as "performance critical". Some of my favourite applications such as uTorrent and Google Chrome are as fast as they are because they are written efficiently, in a native programming language. My least favourite programs are like Inkscape, which includes slow, poorly written Python modules.

Managed code of course has disadvantages ... but also advantages. For one thing it's a lot safer and you won't generate memory leaks all day wink
Of course it's mostly slower, but in case of .Net that's not really that much anymore cause of stuff like code cache. Java is not slow itself, it's the GUIs that mostly just react slower to user input so they feel slower. A very popular video demuxer is written entirely in Java. And it's fast. Not the GUI, but the demuxing. And that involves at least a lot of IO smile


RossyMiles wrote:

It is also very uncommon for professional software to be written in .NET or Java. Neither Windows or Mac OS comes packaged with any software written in these two languages and pretty much every sucessful software package is written in C++.

Hm, what about Eclipse? The most advanced IDE currently out there and a platform to integrate about every language for every target. Currently I'm integrating support for Fujitsu microcontrollers (their own IDE behaves (and looks) like a Win3.11 app ... basicly it's a text-editor with bad syntax highlighting big_smile ).
That MacOS / Windows don't ship much managed apps doesn't necessarily mean managed apps are bad. Especially in the case of Windows, where you more or less only get an OS ... Would be very unhelpful for M$ if they were to write Windows in .Net big_smile

RossyMiles wrote:

This is true, especially for "curly bracket" languages like C, C++, C#, Java and Javascript. Skills from one easily transfer to the others.

Well, that's what I was referring to by "syntax". You won't have to learn really new syntax by switching from e.g. C to Java, only how to do a few things. When switching to a different language (e.g. C to Pascal) there would be a new syntax. But at the end switching from one procedural/object oriented language to another shouldn't be a lot of work if you got the fundamentals of procedural or object oriented languages.

RossyMiles wrote:

Not too much. Most of the .NET languages are type-safe which means it's almost impossible to write malware that attacks a .NET app through the usual methods (buffer overflows etc.), but also means no pointer arithmetic sad .NET is also a high-level virtual machine, which makes it easy port to other platforms (Mono on MacOS or Linux). I don't really like it because it makes slower, larger code than C and C++, but as a first language C# would be alright.

Pointer arithmetic just isn't needed in .Net wink
Of course the right use of pointers can speedup programs. Well, there has to be a drawback for .Net / Java wink
C and C++ can be as slow as .Net apps. C/++ doesn't mean you write better apps big_smile
And in the case of .Net they aren't even thaaat slow.


Gumby wrote:

Also, in my C++ class in college, we started off with text programs.

IMHO the best way to get into programming anyway ... You concentrate on real program logic and not on a making a nice looking GUI (eventually even by only clicking it together in a RAD environment) smile


ONI2.net, link to just any important resource-pages about ONI.

Offline

#16 10/17/09 12:10

Dirk Gently
Member
From: Boston, MA
Registered: 06/12/09
Website

Re: Oni written in BSL?

C/C++ are fast and powerful. Java might be good, but has literally no native integration to any major OS, so it is going to be slower than most other languages. And honestly I would rather have someone learn C/C++ as a starter language than Java. Why? Because you can apply that code anywhere. I don't know if this holds true with C#, but I can write C and C++ code in my Objective-C programs without issue, and if I know either then I can go to any other C-variant and figure it out pretty easily. You cannot do that with Java because Java is unique and is not built off of.

Offline

Board footer

Powered by FluxBB