This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 14 Feb 2006 01:45:26 am    Post subject:

I have recently been thinking about programming languages. I need one that will let me go from idea to program as easily and quickly as possible. My main problem is not learning the syntax, which is fairly easy, but learning how to just get something on the screen and detect what buttons are being pressed! TI-BASIC is nice and direct, but it is slow. I know it can be fun working around the limitations, but when I'm trying to test ideas for computer games, the calculator is not the best tool.

I just bought Macromedia Flash, which might be what I'm looking for, but I'm having some difficulty learning how to use it. Other potentially suitable languages I know include Java and Squeak, but I find it difficult to figure out how to get stuff onto the screen or the speakers. How hard can you make it?! It seems like the languages are designed without any thought of creating the user interaction. Data structures are great, but they are useless if you can't do anything with them and see the results. (I may have to start a topic about this in the Rants and Raves forum. Dry )

So, what programming languages have you enjoyed using? Also, if you have any advice about using languages then I would really appreciate hearing it. Thanks.
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 14 Feb 2006 05:13:06 am    Post subject:

The usual procedure is to go a moderate amount of time (a few months to years) without ever seeing graphics, and after that seeing what options are available for making GUI's. Be prepared to put tons of time into learning a lanuage before you try and take it to the next level.

Flash would be insanely easy for graphics, with not too high of a learning curve, but it's not really a language. Im sure there's some scripting in there somewhere, I never got really into flash, but its not an actual language.

Java will get you making GUI's pretty easily, but with a large learning curve and lots of invested time needed.

C/C++ will get you making GUI's and graphics with a large learning curve and lots of time invested.

I have never used Sqeak.

Visual Basic will get you making GUI's the easiest of any language, small learning curve. I really dont like VB at all though, it has limitations.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 14 Feb 2006 05:55:52 am    Post subject:

I've been doing some little work with Perl the past months and now that I've had to write a GUI in it I've tried to use the Gtk2 API with it. It's increadibly easy, I'm absolutely in love with this, but as far as I know there are no releases of the perl-gtk2 package for any win32 platform without needing a *nix emulator.

Hello world:


Code:
#!/usr/bin/perl -w

use strict;
use Gtk2 '-init';

my $window = Gtk2::Window->new;
   $window->set_title ('Widget Layout');
   $window->signal_connect (destroy => sub { Gtk2->main_quit; });

my $label = Gtk2::Label->new('Hello there, world!');
   $window->add( $label );

$window->show_all;
Gtk2->main;


Responding to events:

Quote:
#!/usr/bin/perl -w

use strict;
use Gtk2 '-init';

my $window = Gtk2::Window->new;
$window->set_title ('Widget Layout');
$window->signal_connect (destroy => sub { Gtk2->main_quit; });

my $content = Gtk2::Hbox->new;
$window->add( $content );

my $label = Gtk2::Label->new('Hello there, world!');
$content->add( $label );

my $button = Gtk2::Button->new('Click me!');
$content->add( $button );

# bind events..
$button->signal_connect( clicked => sub { #can call excisting functions instead of creating one (with sub) too, of course
$label->set_text("You clicked the button!");
});

$window->show_all;
Gtk2->main;


Quote:
Other potentially suitable languages I know include Java and Squeak, but I find it difficult to figure out how to get stuff onto the screen or the speakers. How hard can you make it?! It seems like the languages are designed without any thought of creating the user interaction. Data structures are great, but they are useless if you can't do anything with them and see the results. (I may have to start a topic about this in the Rants and Raves forum. dry.gif )
Java (swing!) works fine for me, adding simple components is as easy as the Perl code above, though I don't know about sound, never bothered with that.

Quote:
I never got really into flash, but its not an actual language.
Flash actionscript very much is.

Quote:
Java will get you making GUI's pretty easily, but with a large learning curve and lots of invested time needed.
And offers a lot of default components, layouts, and looks, so if you don't want to bother with making your own styles (colours, layouts, font sizes, etc) this comes in handy and greatly reduces the learning curve.

Last edited by Guest on 14 Feb 2006 01:06:00 pm; edited 1 time in total
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 14 Feb 2006 08:39:43 am    Post subject:

my favorites a Python, Java

Java is also fairly good for graphics once you find up-to-date documentation on it. Sound you can do with the javax library. If you know Java I suggest you familiarize yourself with the online API because its the best tool available

I haven't done a lot of graphics in Python, but it is really good for designing GUI's if you get Boa-Constructor.


Last edited by Guest on 14 Feb 2006 08:44:31 am; edited 1 time in total
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 14 Feb 2006 03:18:38 pm    Post subject:

Quote:
Flash would be insanely easy for graphics, with not too high of a learning curve, but it's not really a language. Im sure there's some scripting in there somewhere, I never got really into flash, but its not an actual language.
I don't really care whether it's a language or an IDE. I just need something that will let me make and test programs (games) easily.

I've already tried to make some Java Swing stuff, but it is still kind of messy. I couldn't figure out how to easily generate MIDI sound without messing up the program. And I'm not really interested in making a GUI as much as easily moving sprites around, detecting key presses and mouse movement.

It is easy to make a GUI in Visual Basic and Visual C#, but the hard part is actually getting it to do something instead of just sitting there looking pretty. Or not pretty.

I'm curious to hear more about Python. I like the idea of just having indentation instead of curly braces. Could someone who is familiar with Python give me some more info on the language? For example, post the code for a game that you've written in it?

What would really help me is links to resources that you like and use regularly, and the code for a simple game that you've written in the language. How about the code for a program where you move a sprite around with the arrow keys and then try to move it onto another sprite which is at a fixed, random position. That would cover keyboard input, sprite display, and collision detection. It would be great if you could post the code for such a program in your favorite language. If it would take too much effort to write that program and post it here, then the language is not what I'm looking for. The program is easy to describe; it should be easy to write as well.
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 14 Feb 2006 04:15:48 pm    Post subject:

Your best bet is flash. You don't seem to want to put time in to actually learn anything to do what you want.

[EDIT] - You really have no idea what you're dealing with here. I worked 4 languages for years without ever seeing graphics.


Last edited by Guest on 14 Feb 2006 05:03:26 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 14 Feb 2006 05:42:12 pm    Post subject:

And I know people who have to write 3D applications after one year of Java.

But yes, it needs more time and effort than seems to be wished for here.

Even a minimum engine I wrote in Java that can display 2d objects using the standard graphics calls and handle simple mouse and keyboard input was over a dozen classes and I think at least twice as many pages of code.

Maybe Flash comes close, or some kind of gamefactory program thing.
Back to top
IAmACalculator
In a state of quasi-hiatus


Know-It-All


Joined: 21 Oct 2005
Posts: 1571

Posted: 14 Feb 2006 06:13:52 pm    Post subject:

I want to learn C and Java. Java, because it's just plain cool, and C for calculator programming. I draw a total blank when it comes to ASM. I currently only program in 89 Basic, but I used to do Visual Basic. I'm way out of practice now.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 14 Feb 2006 08:19:12 pm    Post subject:

axcho wrote:
What would really help me is links to resources that you like and use regularly, and the code for a simple game that you've written in the language. How about the code for a program where you move a sprite around with the arrow keys and then try to move it onto another sprite which is at a fixed, random position. That would cover keyboard input, sprite display, and collision detection. It would be great if you could post the code for such a program in your favorite language. If it would take too much effort to write that program and post it here, then the language is not what I'm looking for. The program is easy to describe; it should be easy to write as well.



:ninja: check the coding an design forum for my topic on a Java RPG. here's the official site for it, but i dont have the download up yet Smile
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 14 Feb 2006 08:23:19 pm    Post subject:

JoeImp wrote:
The usual procedure is to go a moderate amount of time (a few months to years) without ever seeing graphics, and after that seeing what options are available for making GUI's.  Be prepared to put tons of time into learning a lanuage before you try and take it to the next level.
[post="69900"]<{POST_SNAPBACK}>[/post]


Maybe that's why I've been making little progress and still feel like a bad programmer. For some reason, on calculators, it's not hard to make graphics because somebody has already made a really fast routine for nearly ever calc in ASM. It's data manipulation that drives me crazy, and syntax.

IAmACalculator wrote:
I want to learn C and Java. Java, because it's just plain cool, and C for calculator programming. I draw a total blank when it comes to ASM. I currently only program in 89 Basic, but I used to do Visual Basic. I'm way out of practice now.
[post="69938"]<{POST_SNAPBACK}>[/post]


I think C is relatively easy, but that might be because I picked up ASM real quick and learned some stuff that made C easier to understand. Now Java, I draw a total blank. It seems like nobody can explain to me how OOP is different from procedural based and when I might use it.


Last edited by Guest on 14 Feb 2006 08:24:33 pm; edited 1 time in total
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 15 Feb 2006 06:31:33 pm    Post subject:

Quote:
Your best bet is flash. You don't seem to want to put time in to actually learn anything to do what you want.

[EDIT] - You really have no idea what you're dealing with here. I worked 4 languages for years without ever seeing graphics.
I'm sorry if I've annoyed you. I think it is true that I am tired of just learning and I want to actually do something and make stuff. However, even though I first took a class on Java a year ago, I've read books about it for many years. I am not a beginner in programming. I've been doing TI-BASIC for more than five years and by now the main hurdle for me is not the syntax of a language, as I have learned many different languages over the years, but the specific libraries. Each language has its own set of ways to do graphics and user input, and it's annoying to have to learn them all. There is no reason why someone shouldn't want to have easy-to-use libraries. Finding information about them is the main problem. I am now turning to my last resort, which is asking people where to find such information.

The purpose of programming is not to be difficult. It is to assist the realization of the program in someone's head into an actual computer program. Different languages have different strengths and weaknesses, but that doesn't mean that all languages are equal! Languages can be designed to be better or worse. I am trying to find a language that fits my specific needs. I am writing here because I would guess that some people here are game programmers and may have useful knowledge of what programming languages are suitable for game development.

[EDIT]
Ranting...
Quote:
You don't seem to want to put time in to actually learn anything to do what you want.
Exactly! Why should I want to put in any more time learning than I have to? For me the enjoyment is in the design of a game and turning it into a finished product with the minimum amount of effort. I have lots of projects to do, and not a lot of time, therefore I want to get them done as easily and quickly as possible.

And before you start to think that I don't like learning, let me reassure that I do, in fact. I am good at learning. Learning is one of my strengths. I can learn new programming languages fairly easily. I like to learn to play new musical instruments. For example, last year I started playing the Persian ney. I started learning by looking at this website and blowing into a copper tube. I spent more than two hours that night continually blowing into the tube and adjusting my position until I could get a note. It was an ugly note, and I couldn't keep it going, but I was really happy that I got it. That whole experience was very enjoyable at the time. In conclusion, I like learning, but right now I'm tired of learning new programming languages and I just want to make stuff.


Last edited by Guest on 15 Feb 2006 06:57:50 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 15 Feb 2006 06:44:54 pm    Post subject:

Fact remains that programming a graphical game in Java or C takes more code than can be easily shown here.

I absolutely agree that it should be much more simpler or much less work, but there is still a lot to be improved about programming in general so it'll take a couple of more decades before programming anything interesting can be presented in a forum post of reasonable size.

The quake engine sourcecode is probably more text than your average C programming book. Something like Nethack is probably more than an average online C tutorial. That's just the way it is.

I still recommend Java, and as you're already experienced with it I doubt you'll find a better way of learning more about it than spending the next year or so actively reading the documentation and simply trying stuff. Sorry.

There are game libraries though, I can't recall any specific ones, but I know there are some for C and Java for example. AFAIK you'll have to find a new one that fits your specific needs pretty much every time you have a new game idea, if there even is one that'll do the trick. Might as well just know the language and write a new engine each time you get an idea.

ps. that Perl Gtk2 thing turns out to be very lame.


Last edited by Guest on 15 Feb 2006 06:50:59 pm; edited 1 time in total
Back to top
JoeImp
Enlightened


Active Member


Joined: 24 May 2003
Posts: 747

Posted: 15 Feb 2006 07:58:56 pm    Post subject:

I'd rather that langauges stay as they are, and not get simpler or easier to use. Less people taking my jobs.

And TI-Basic isn't even comparable to C++/Java/Asm/Whatever. I don't care if you have 20 years of experience with it.
Back to top
koolmansam375


Advanced Member


Joined: 09 Oct 2004
Posts: 254

Posted: 15 Feb 2006 08:49:14 pm    Post subject:

axcho wrote:
I am not a beginner in programming. I've been doing TI-BASIC for more than five years and by now the main hurdle for me is not the syntax of a language

Ha! Do you know how much of programming in TI-BASIC is related to programming in a real language like C/C++? I would say <1%. The resemblence ends with the existence and behavior of the "while" command. Oh sure there are variables and subroutines. But they are very different in C/C++ that they are in TI-BASIC. C++ also has the need for an OOP mindset. Java has it too, more so than C++. No amount of experience in TI-BASIC will teach anything about Objects let alone Object Oriented Programming.

Anyways good luck with your search! I hope you find something that suits you.


My favorite language happens to be C/C++. Java is ....... too OOP crazed?
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 15 Feb 2006 09:39:55 pm    Post subject:

koolmansam375 wrote:
No amount of experience in TI-BASIC will teach anything about Objects let alone Object Oriented Programming.


one of my biggest problems atm. and nobody can explain to me what an object is.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 15 Feb 2006 09:47:33 pm    Post subject:

Not even Google or [url="http://en.wikipedia.org/wiki/Object_(programming)"]Wikipedia[/url]?
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 16 Feb 2006 01:51:08 am    Post subject:

Quote:
Ha! Do you know how much of programming in TI-BASIC is related to programming in a real language like C/C++? I would say <1%. The resemblence ends with the existence and behavior of the "while" command. Oh sure there are variables and subroutines. But they are very different in C/C++ that they are in TI-BASIC. C++ also has the need for an OOP mindset. Java has it too, more so than C++. No amount of experience in TI-BASIC will teach anything about Objects let alone Object Oriented Programming.
To continue the hostile thread...
I know Java, as well as a bit of C++, SmallTalk, ML, and Scheme from a programming languages class. Knowing TI-BASIC has in fact greatly helped me in learning Java. It allowed me to focus on learning the object-oriented concepts and data structures rather than having to worry about how to actually implement them.

To you others, thanks for the information. I think I'll be sticking to Java and Flash. And maybe I'll look further into Squeak.
Back to top
CoBB


Active Member


Joined: 30 Jun 2003
Posts: 720

Posted: 16 Feb 2006 02:46:26 am    Post subject:

C++ is a powerful tool if you get it. In December I wrote a tabbed console webbrowser in it in two days, but most of this time was spent thinking about the architecture, not coding. Anyway, it's not the language that takes long to learn but using the language. Knowing the language means you can write code that compiles. Obviously that doesn't imply that the code is of good quality. It doesn't even imply that it would work at all. You'll have to read a lot to educate yourself, because there are many existing solutions that won't occur to you if you just keep grinding code (or you learn it slowly in the hard way). Books like 'Imperfect C++' or 'Efficient C++ Programming Techniques' will definitely give you a lot more insight and extend your skill set, while lighter readings like 'Pragmatic Programmer' or 'Inmates Are Running the Asylum' might give you a few good ideas on certain practices. There are loads of Addison-Wesley and Prentice Hall books worth reading. And there's SICP, of course.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 16 Feb 2006 09:09:02 am    Post subject:

CoBB wrote:
most of this time was spent thinking about the architecture, not coding.
But a very good way to cut from the time spent programming by preventing code-try-select-backspace-repeat scenarios Razz. Axcho, perhaps it is a good idea to familiarize yourself with a modelling language, if you haven't already. It can save a lot of time and more importantly, stress (Razz), especially with OOP languages.

Things like flow diagrams are very helpfull with UI design, class diagrams for your "data structures" (objects! objects! Razz) and so on. It also helps when you want to integrate another system later, like implement a database, because you won't have to read your code to remember what kind of data you had and what happens to it.

It's good to have something solid to look at and use as as reference.

Don't really think this needs to be formal and correct, so any kind of diagram or schematic you can think of for any functionality will do, as long as it works for you. Just because people made UML (for example) for best-practise purposes doesn't mean their best-practises are compatible with your style. : )


Last edited by Guest on 16 Feb 2006 09:11:52 am; edited 1 time in total
Back to top
axcho


Active Member


Joined: 09 Nov 2004
Posts: 555

Posted: 16 Feb 2006 03:24:34 pm    Post subject:

Hmmm, so where would I find one of these modelling languages?

I think C++ would be good once I figure out how to use DirectX.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement