RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4  Next 
View previous topic - View next topic  
Author Message
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Fri Jul 16, 2004 7:02 am    Post subject: [quote]

LordGalbalan wrote:
Because complicated systems are so easy to write in BASIC as opposed to C++, because a minumum of preparation is necessary. RPGs will be made that much faster, because it'll be easier to take an idea and run with it. That's why the RPG development community needs a new version of BASIC.


That, sir, is a fallacy: while the neophyte does not often utilize the functionality, C++ embraces the notion of encapsulation and code-reusability. In theory, a day's worth of programming, testing, and debugging could lead to a highly reusable, portable code base, which could be used as you suggest.

While I hardly wish to start a holy-war at this point, BASIC is hardly an exemplar of a clean language to serve as a development language. While a highly braced language (such as LISP or C/C++) is hardly better, the highly braced language has advantages over BASIC: first, code base is often smaller (due to lack of redundant and asinine semantic notations); second, cleaner syntax requires fewer keystrokes for the programmer, and is generally easier to read/maintain; third, a language that is based around hard-coded functionality is full of useless bloat: bloat that more often than not cannot be removed from the executable, and that is often years out of date. You yourself have acknowledged this problem in QB; what you suggest is hardly ideal for a development language, which should be versatile enough to last changes in technology.

Finally: as has been mentioned, BASICs are generally proprietary languages, and are often geared towards a single platform; unlike C/C++, a program written in QB is difficult to port among platforms. Now, I realize that a "new" BASIC could be written to be more cross-platform compliant, but I shall not believe that to occur until I see it with my own eyes.

Also, it seems that many complicated systems that may be written easily in a language with a strong concept of pointers and typing would be difficult to write in a language largely devoid of modern pointer constructs. While I'm sure that a linked-list or an associative array could be written in BASIC, I surely would not want to be the one to write it.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
janus
Mage


Joined: 29 Jun 2002
Posts: 464
Location: Issaquah, WA

PostPosted: Fri Jul 16, 2004 8:48 am    Post subject: [quote]

LordGalbalan wrote:
Because complicated systems are so easy to write in BASIC as opposed to C++, because a minumum of preparation is necessary. RPGs will be made that much faster, because it'll be easier to take an idea and run with it. That's why the RPG development community needs a new version of BASIC.

Anyone who writes complicated systems with minimal preparation, for any purpose other than prototyping, is a fool (or extremely inexperienced.)

Period, end sentence.

You don't just 'write a kernel' or 'write an rpg'. Attempting to do anything of a reasonable level of complexity without planning out interfaces and methods beforehand, at least mentally, is a horrible idea.

Interfaces in platforms like Java/.NET/VB are tools to enable you to write reliable code, not restrictions that hold you down... just like type checking and static typing in C++ are. They ensure that your code does exactly what you mean it to, every time. The tradeoff is that you have to know what you want to do before you write the code.
Back to top  
Joakim
Tenshi's Bitch (Peach says "Suck it!")


Joined: 05 Apr 2004
Posts: 64

PostPosted: Fri Jul 16, 2004 9:43 am    Post subject: [quote]

Just FYI I was going to write a language that had as little build in functionality as C, but with a nicer syntax (I like words over random characters like ^ for xor and ~ for negation)
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Fri Jul 16, 2004 11:29 am    Post subject: [quote]

I think BASIC can work with complex systems well.

http://lordgalbalan.tripod.com/UITOPL2.txt

Is that not complex?
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Sat Jul 17, 2004 1:14 am    Post subject: [quote]

I've personally been working on a new BASIC compiler for Windows, which would be open source. I was originally making it output assembly which would be assembled with MASM32, but then came to my freakin' senses (and a slap in the face by DrunkenCoder, hehehe) and realized that it'd be better off if it outputted C++ source instead. The idea behind this compiler is twofold:

1. Make it possible to port legacy QB code to Windows with zero or very little modification (which means doing a lot of emulation for low-level stuff)
2. Make it possible for BASIC developers to move on from the QB "crutch", as my compiler supports many things which are standard in today's C/C++ compilers but completely unsupported in QB (and most other BASICs as well).

The project is still in its prototype state and I don't really spend a whole lot of time developing it at the moment (that whole "real life" thing, ya know?), but it's slowly coming together. It's open source, like I said, so the general programming community will be able to improve it beyond what I can do. I'm personally sick of seeing these newer game-making BASICs with exhorborant prices, and there are still thousands of people clinging on for dear life to QB, so it's obvious that there's a gap to be filled. :)
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
janus
Mage


Joined: 29 Jun 2002
Posts: 464
Location: Issaquah, WA

PostPosted: Sat Jul 17, 2004 2:19 am    Post subject: [quote]

LordGalbalan wrote:
I think BASIC can work with complex systems well.

http://lordgalbalan.tripod.com/UITOPL2.txt

Is that not complex?

It's also disgustingly huge, incoherent, and unmaintainable.
Back to top  
cloudchild
Fluffy Bunny of Doom


Joined: 09 Jul 2004
Posts: 18
Location: PANTS!

PostPosted: Sat Jul 17, 2004 2:33 am    Post subject: [quote]

hmm. Make the basic you are designing language easily extendable by C/C++.

Btw, there is a cross-platform basic, it's called XBasic. It's been around for a hella long time. Just google it.
_________________
BOOGA!
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Sat Jul 17, 2004 2:55 am    Post subject: [quote]

janus wrote:
It's also disgustingly huge, incoherent, and unmaintainable.


I disagree. It's may be disgusting, incoherent, and unmaintainable, but it's also small and trivial.
Back to top  
janus
Mage


Joined: 29 Jun 2002
Posts: 464
Location: Issaquah, WA

PostPosted: Sat Jul 17, 2004 3:14 am    Post subject: [quote]

Rainer Deyke wrote:
janus wrote:
It's also disgustingly huge, incoherent, and unmaintainable.


I disagree. It's may be disgusting, incoherent, and unmaintainable, but it's also small and trivial.

I'm sorry, but calling a program with a single struct that spans 160+ lines 'small and trivial' is a bit of an exaggeration. ;)
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sat Jul 17, 2004 3:08 pm    Post subject: [quote]

In C, then?

http://lordgalbalan.tripod.com/UITOPL2.c

It supports both the 320u and 80u timers, and so does everything, even the fabled "voice synth" effect. Each register on the chip has a place in the OPL2Grid vector. You load the vector indices with the values you want, and update any range of registers on the chip all at once. What I'm really proud of, is the music processing routine, which is so complete that it can be transferred to any music playback form and still use the onboard OPL2 timers as CPU-independent pacers for that form's notes. Wavetable, trackers, or even something having nothing to do with music can keep step with the SB-compatible's onboard timers this way.

The library is unmaintainable because it doesn't need to be, it is simply ultimate, if you can believe it. The only way I can think of to improve it would be to include fulll OPL3 extension support. I didn't though, because three and four operators are simply so hard to work with. The idea was to provide a vehicle for learning to make excellent music. I mean, if someone's music sounds good in FM, then it'll be superior in digital form, right?
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Sat Jul 17, 2004 8:44 pm    Post subject: [quote]

LordGalbalan wrote:
In C, then?

http://lordgalbalan.tripod.com/UITOPL2.c


That is not legal C.
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sat Jul 17, 2004 11:30 pm    Post subject: [quote]

How so? K&R and ANSI specifiy both "->" and "." as valid redirection operators, although you may be right about the type constructs. Again, I've not yet tested it and I say on my website that it isn't complete. I tried the port to make it useful for C programmers. I don't like C myself, although it was the first programming language I learned about a decade ago. I had to learn it then because Andre Lamothe's "TY Game Programming in 21 Days" used it all over. It's too pointer driven for my tastes.
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Sun Jul 18, 2004 6:28 am    Post subject: [quote]

LordGalbalan wrote:
How so?


Just from glancing at the program I noticed the following:
  • Assignments at file scope. Illegal.
  • Use of "function" to declare a function. Not a keyword in C. Use the return type instead.
  • Use of '&&' instead '&' when you clearly want a bitwise or. Legal C, but not what you want.
  • "OPL2Grid[]" passed as a parameter to a function. "OPL2Grid" is an array (actually a pointer in this case, but...) and "OPL2Grid[0]" is an element of that array. "OPL2Grid2[]" is just illegal syntax.
  • Omission of 'struct' keyword before struct types. Legal in C++, not legal in C.
  • Huge struct OPL2 passed by value where you clearly want to pass a pointer (or, if you were using C++, a reference). This means that every function operates on a copy of the struct and changes to the struct do not pass back to the calling function. Legal C, but clearly not what you want.
  • "elseif" is spelled "else if" in C.
  • Global arrays with bounds that are not compile-time constants. Illegal in both C and C++.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Sun Jul 18, 2004 6:31 am    Post subject: [quote]

I've read a lot of LaMothe's works (my raycaster in ROTL is based in part on his RAY.C from Tricks Of The Game Programming Gurus), and I would have to agree with you, LordGalbalan, that his stuff relies greatly on pointers, and often where it's not necessary.
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1731
Location: Cedar Bluff, VA

PostPosted: Sun Jul 18, 2004 9:11 am    Post subject: [quote]

Thanks for the input. I'll fix all of those. ;)
Back to top  
Post new topic Reply to topic Page 3 of 4 All times are GMT
Goto page Previous  1, 2, 3, 4  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum