Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 04-15-2008, 06:54 AM   #1
Brawndel
Member
 
Join Date: Oct 2005
Posts: 35
Brawndel is on a distinguished road
Question 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!
Brawndel is offline   Reply With Quote
Old 04-15-2008, 09:33 AM   #2
Aeran
Member
 
Join Date: May 2005
Posts: 208
Aeran is on a distinguished road
Re: lpc now, or raw programming later?

Quote:
Originally Posted by Brawndel View Post
I can not find a school that will teach C anymore, and I am not self motivated enough to learn it myself
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++.
Aeran is offline   Reply With Quote
Old 04-16-2008, 05:49 AM   #3
Brawndel
Member
 
Join Date: Oct 2005
Posts: 35
Brawndel is on a distinguished road
Thumbs up 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
Brawndel is offline   Reply With Quote
Old 04-16-2008, 06:29 AM   #4
Aeran
Member
 
Join Date: May 2005
Posts: 208
Aeran is on a distinguished road
Re: lpc now, or raw programming later?

Quote:
Originally Posted by Brawndel View Post
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?
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.

Quote:
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?
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.
Aeran is offline   Reply With Quote
Old 04-27-2008, 05:16 PM   #5
Fizban
Member
 
Join Date: Jul 2006
Name: Brandon
Location: Shelby Township, Michigan
Home MUD: The Builder Academy
Home MUD: 4 Dimensions
Posts: 142
Fizban is on a distinguished road
Re: lpc now, or raw programming later?

Quote:
I can not find a school that will teach C anymore, and I am not self motivated enough to learn it myself

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.
Fizban is offline   Reply With Quote
Old 04-27-2008, 07:44 PM   #6
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: lpc now, or raw programming later?

Quote:
Originally Posted by Brawndel View Post
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.
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.
Ide is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014