Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 17th Oct 2003 20:07
Is there or will there be Classes in Darkbasic? Are you planning to go OO with DB? Probably a pain in the ass to program, but it does open a lot of doors for a language, I think.

Or is this already possible in a way?

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 17th Oct 2003 22:03
For the majority of development, I think OO is pretty much overkill. When it comes to games dev though, it does make a little bit of sense - especialy the look and feel of ecapsulation ...

player->walk()

mmm, lovely.

Part of darkbasic's charm is its simplicity - so full on OO isn't going to score too many points. If I were to make a suggestion for the "might be nice to have if you've nothing better to do" list then it would be able to support functions in type defs...



It wouldn't provide any more functionality - no more than having player_walk(), or walk(&player) .. or however you would pass by reference in DB. It just looks nice. So perhaps we can somehow come up with some syntactic sugar...

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 19th Oct 2003 16:56
thx bone and adr that's exactly what I'm talking about. Having a typedef with functions that would be great.

Lets hope the DB crew wants to consider this. I mean player->walk() it's still very simple and adding functions in a typedef, doesn't change much to the simplicity of the DB language but it does add a load of functionality.

So basicly the same level of OO as VB6 has.

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 19th Oct 2003 18:08 Edited at: 19th Oct 2003 18:09
Quote: "So basicly the same level of OO as VB6 has"


what!? Am I understanding you? Are you saying that dbp has the same level of OO vb6? If so, you are way off. The only OO feature dbp has going for it is UDT's - vb6 is about 95% OO compared to C++.

If you are wishing/wanting dbp to have the same OO level as vb6 then I apologize... I can't understand your statement.

And asking Heartbone about OO is a moot point - he seems afraid of it. And he says dbp is the "BEST", yeah, ok, I think dbp is great but when it comes down to it, every pc game he ever bought and played (retail) was written in OO (most likely C++) - end of story - OOP

-RUST-
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 20th Oct 2003 00:17
CattleRustler I was indeed saying that I wish it somewhat had the same level of OO as VB6 had (just referring to the classes). Adding functions to the UDT-model of DBpro would add to this. Then ofcourse it would no longer be a UDT but then we are dealing with a simpel form of classes (I think correct me if I'm wrong). VB6 offers more ofcourse, but I was just referring too VB6 because it has OO, but not as much as VB.net has now. So I wasn't saying DBpro should go OO, but some level of OO (more then just UDT's) would be nice.

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Oct 2003 01:08
Bren,

Yes I agree, and please accept my "pre-apology" as I didn't understand what you were saying. If dbp could incorporate Types then it should take it one step further and incorporate Structures - not quite a class but better than simple types. Anyway, vb.net rocks! Blows out vb6 in tons of ways - this coming from a huge fan/advocate of vb6. Since I have adopted vb.net I have "forced" my whole office to "see-the-light" so to speak. Even the snotty C++ "gods" are impressed by .NET and how the playing field has been leveled.

DBP rules
VB/VB.NET rules
OOP Rules

-RUST-
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 20th Oct 2003 03:21
apology accepted, wasn't necesarry thought I need to express myself better

I was impressed by .NET myself when I started using it. It took me a while to get myself using it, but I'm very happy I finaly did

So I'm totaly with you on your "rules"-list

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Oct 2003 03:58


In .NET everything is an Object, as it should be!

if you define intMyVar As Integer, that variable inherits the integer class. Later you then can say intMyVar.ToString() - inheriting the "ToString" method of the integer class...(not to mention a bazillion other useful things from the class)

SIMPLY AWESOME.

OOPness rocks.

-RUST-
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Oct 2003 06:05
@Bren

OO is a major update to a language from the compiler writer's point of view. There is a possibility that OO will make its way into The Game Creator's 3rd generation language, but I would be surprised if we see true OO in DarkBASIC Professional. The compiler is due for an overhaul in the new year - send suggestions with brown envelopes to [email protected]

Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 21st Oct 2003 00:19
ok, I'd better get myself some brown envelopes then

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community

Login to post a reply

Server time is: 2026-07-26 05:22:27
Your offset time is: 2026-07-26 05:22:27