Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   lpc now, or raw programming later? (http://www.topmudsites.com/forums/showthread.php?t=4860)

Brawndel 04-15-2008 06:54 AM

lpc now, or raw programming later?
 
Heya folks!

I've been dabbling with lpc for a few months now, and where as I'm no connoisseur when it comes to programming with it, I'm learning quickly enough.
My question is this.
I'm wondering if it is worth sticking with lpc and mastering the language, when lpc is not really used for anything aside from certain types of muds. My other option would be to take a couple classes in java/C# etc (I can not find a school that will teach C anymore, and I am not self motivated enough to learn it myself), and find a codebase out there that I can work with in the language that I choose to learn, or work on a codebase from scratch.
I would like to learn some raw programming eventually anyway, but I guess my main question is whether a mud coded in lpc is as functional as a mud coded in a mainstream language. Without the knowledge of C, I'll never be able to tackle the lp driver... and will that be a problem? Can I really make an lp mud special, containing all that I've dreamed of in a mud? Or would a mud coded from the ground up be more versital?
Let me know if you have any advice/suggestions, I would greatly appreciate any input.

Thanks a lot
Brawny

P.S. as I said, not very self motivated... is there by chance a learning environment geared toward teaching people lpc... while working with others? I'm sort of thinking of something like the builder's acaddamy for learning circle... just thought I'd ask... thanks again!

Aeran 04-15-2008 09:33 AM

Re: lpc now, or raw programming later?
 
C is pretty similar to lpc. Main difference I know from a quick look at lpc is that C:
1. does not support inheritance.
2. uses pointers. E.g "int *test" is not really an array like in lpc, but a pointer to an integer value stored at a specific position in memory.
3. does not use mappings.
4. does not use foreach
5. no string/status/object/mixed/mapping/class datatypes. The class datatype would represent the struct datatype in C. However the syntax to declare a struct is a bit different in C than from LPC, I think. You need to add a semi-colon at end in C, "struct {/*members here*/};"
6. does not use nomask/private/public/varargs keyword-modifiers.
7. does not allow expressions in case-statements of switch. Instead you are only allowed to put constants there.
8. does not use ranges(e.g 1..2).
9. does not use any garbage collector. If you allocate memory manually, you will need to also release it manually(free/malloc functions).
10. +=/-= does not work to concatenate/modify strings/arrays.
11. datatypes such as int|char is not supported. That is an identifier only has one type.

There's probably more differences, but those are the ones I noticed from a quick look at the language. It might also be interesting to consider take a look at C++.

Brawndel 04-16-2008 05:49 AM

Re: lpc now, or raw programming later?
 
So, with that said, I have 2 questions.
1: does that mean that once lpc is learned, that it shouldn't be such a great difficulty in learning to program in C?
2: Since lpc and C are so similar, and since C is used in so many programs, would it be possible to program in other than mud-based apps with lpc?
If I were to use lpc to say... build an audio based game for the blind... would I build a lib containing what I want the game to do and how, and a seperate driver to run it? Would I need the same kind of driver that is located with the mudlib currently... or a remade driver that supported the actions a blind gamer would take to win a game?

Very interesting thoughts... sorry if they look a bit garbled... I just woke up after taking a heavy sleeping pill and maybe an hour of sleep... *yawn x22*

Thanks as always for any input in advance!

Brawny

Aeran 04-16-2008 06:29 AM

Re: lpc now, or raw programming later?
 
That is more a general question. My experience is that if you know one programming language then learning a similar one is usually much easier. I started with Basic on the Commodore64, then studied QBasic, then Visual Basic, C, C++, Java, Lisp, php, and so on. Many of the languages use similar ideas.

Someone more experienced in lpc would have to answer that. What I have mainly looked at on lpc is the syntactic structure of the language, but very little on what library functions are available.

Fizban 04-27-2008 05:16 PM

Re: lpc now, or raw programming later?
 

I can't think of a single school that wouldn't have a class in C. I know at the college I go to they suggest you take classes in Java before C and C++, but they sure as hell have C classes. In fact C is still likely one of the three most common languages for new programs to be written in.

Ide 04-27-2008 07:44 PM

Re: lpc now, or raw programming later?
 
I think if you want to write software just as a hobby, learning LPC first is fine. It's a proven mud language. You probably could find a LP mud that would take you on and maybe provide some mentoring.

If you really want to write other kinds of applications though, I'd probably go with a programming language more in general use.


All times are GMT -4. The time now is 04:02 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022