Welcome, Guest. Please login or register.

Author Topic: creating a text adventure, but with what programming language?  (Read 16582 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Just a quickie to suggest Objective-J :lol: (@karlos yeah, I've found another language I like)

In all seriousness, for something like this you are missing a trick not using HTML and a bit of JavaScript!

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #1 on: January 04, 2011, 11:52:16 PM »
Quote from: Karlos;603885
I'm sure objective-c is at least as good as C/C++ for string manipulation, but no match for Perl in terms of what can be done per token.
Not Objective-C... Objective-J ;)

Hmmm I'm not so familiar with pearl, but the GNUStep/Cocoa framworks are well serviced with a string object.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #2 on: January 05, 2011, 12:03:24 AM »
Quote from: Franko;603888
Goodie... I smell another Bloodline V Karlos debate coming up... :)

Popcorn anyone :lol:
Lol, no... I'm off to bed... But over Christmas I attempted to teach my youngest brother to program, xcode was out of the question so I set up a JavaScript HTML document with some basic io functions in the head to hide the DOM and he was really getting into it! I will introduce objective-c to him via Objective-J :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #3 on: January 05, 2011, 12:06:37 AM »
Quote from: Karlos;603896
You said Objective-J but you were thinking Objective-C, otherwise you'd not have put the "@Karlos" ;)
You have to check out Objective-j... It is to JavaScript what Objective-c is to c ;)

I think you'll loooooooove it :lol:

Hmmm... Really no JavaScript on A1200? I'm pretty sure the Amiga web browses support it!!

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #4 on: January 05, 2011, 09:17:45 AM »
Quote from: Karlos;603911
Javascript already has an object model, based on prototyping (rather than classes) and it's pretty easy to do reflective programming with it. Hard to see what it adds, other than objective-c syntax, which is not a selling point in the slightest.
Karlos! Always thinking so low-level! Objective-J gives you access to the NeXTStep API in a web browser ;)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #5 on: January 05, 2011, 02:15:49 PM »
Quote from: Karlos;603988
No, just thinking pragmatically.

All the implementations I saw turn your Obj-J into regular javascript. Hence there's nothing it can actually do that can't be done in JS directly. Probably with a greater degree of efficiency too.

There's nothing stopping your browser (and it's plugins) or any other javascript host application exposing any API it likes to javascript, irrespective of what language the API itself was written in. You don't need to change any syntax of JS for this. In fact, I can remember using and controlling java applets from javascript. You simply instantiate (or embed) the applet, get a DOM reference to it in JS, and then all the public methods of it are visible to javascript. All the webkit classes are written in C++ but you don't see someone creating a JS implementation of C++ to get at HTML5 ;)
What Objective-J gives you is the NeXTStep frameworks (called cappuccino), and all the benefits which that brings for use in your web browser. It is rather easy to rapidly build an app using it, that runs in your browser, I think that's cool :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #6 on: January 05, 2011, 03:54:19 PM »
Quote from: Karlos;604030
I don't doubt it, it's just that it is completely unnecessary to change JS syntax in any way to introduce access to this API or any other.
Imagine you are a NeXTStep coder, or an iPhone coder or even an MacOSX coder... Now you want to write an app that anyone with a JavaScript browser can use... Bingo! Obj-j is here! All the classes you are used to, with the correct syntax and all those little features you've grown to love, all there at your fingertips ready to allow you full expression... Or you could use it as a teaching tool, a gateway from JavaScript to Obj-C as I plan to :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: creating a text adventure, but with what programming language?
« Reply #7 on: January 06, 2011, 01:13:40 PM »
Quote from: Karlos;604262
First up against the wall come the revolution.


Hmmm, so I'll put you down as "undecided" about joining the resistance then ;)

Quote

Objective-C syntax is never correct except when it is vanilla C ;)


Well, I'm going to argue with you about that, as I've said before, it took a while for the syntax to "click" with me too :)

Quote

An evil plan. I almost approve :lol:


Lol, I'm not actually being evil, my little brother has his heart set on writing a game for his iPod touch... And this seems to be the least painful way to get him started in programming!

On topic, I don't see why a simple HTML based hypertext adventure is out of the question... It would be VERY quick to implement and deploy :)