25 October 2015, 22:21 | #1 |
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
Non-game programming - what does that leave me with?
Forgive me if this has been answered but I have been through plenty of threads and can't distinguish between what advice is for gaming and which is for appliactions.
I'm interested in developing workbench applications. I understand on Amiga there are three common languages/environments to use:
I also understand that on my list above the get progressively easier as we go down the list, but performance suffers also. My questions are about options for applications using standard GUI widgets and what of the available info online I can ignore: ASM Can 'desktop' apps on workbench be coded in assembler? I've found references to intuition.libarary in Amiga ASM threads here - but I when we did ASM in college it was purely for access-all-areas coding on the 8051. C/C++ I tried using Object Windows Language back in 2001 and it was horrendous trying to get basic graphics. I ended up using VB to control my electronics project. C/C++ was just used for CLI apps from there on in. Is it still that complex on Amiga? BASIC Since I'm not interested in games (I'd love to, but I'd only be interested in making a damn good game which would take longer than I care to invest), is the performance of basic adequate for workbench applications? Hopes Don't expect much from me - I'm very rusty and Java has both spoiled me and bored me to pieces But I'd hope after a year or so of tinkering I'd be able to make a decent application that has some value today - maybe incorporating a basic simple http web service of some kind. One thing I thought of was since we can't even access Wikipedia from OS3 these days, I could have a webservice that takes a search term, finds the article on Wikipedia and returns it without the need of SSL/TLS. |
25 October 2015, 22:55 | #2 | |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
My (probably useless) thoughts on the issue:
Quote:
That being said, I wouldn't recommend it myself. I'd do this, but not C++.. The Amiga GUI stuff seems designed around C. All the intuition stuff is easy. I wrote a Solitaire game with full menus, etc... Straight forward and easy to follow. Why not C++? I don't know object oriented stuff.. ;-) Could be done, but I wouldn't bother. If you know/can do C, I'd stay there.. Just my $00.0000000000002 Good luck! desiv |
|
25 October 2015, 23:25 | #3 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
GUI stuff in WB is done by calling Intuition.library and it can be reached fairly easy through both through Asm and C/C++, so that part is quite similar. However, you'd probably prefer having the convenience of reading C code instead of Asm. Speed-wise it is not that different unless you are doing some hard calculations. The Intuition.library calls takes the same time so if the majority if the time is spent in those calls, the difference is minimal. If you have some hard core stuff you can still use C for the basic structure and do the hard stuff in Asm.
Regarding C or C++ I have no idea what is preferred. On modern platforms I much prefer having OO available but never tried it on Amiga so it may not have been as mature back then. Also depends on whether you are used to C++. |
26 October 2015, 04:38 | #4 |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
As Desiv said, you can perfectly use ASM for WB programming but when programming utilities one is usually more interested by language flexibility rather than by pure performance and C is much better for this. Especially if you are not a seasoned programmer.
You cannot at the moment do C++ on the Amiga unless you use very old versions of gcc and obviously given the code they generate this is not recommended. VBCC is a good C compiler which produces reasonable code and can be very easily compiled as a cross compiler which allows you to produce Amiga executables from Windows/Linux/OS X. Basic-s seem easy initially but often they restrict how your code can grow, moreover they are rarely portable so if you want to re-use existing code you will have to convert it. I would really strongly recommend to avoid it. C code is very portable so that is usually a big bonus when you start since you can examine/re-use other people's code. For the task you mentioned (extracting information from Wikipedia), a language like Python would actually be quite nice. It is high level, multi paradigm and has an enormous amount of libraries, but (it's a big but!) I am not sure it exists for OS3 and if it does it is probably horribly slow. (Also, Python uses dynamic typing so you will encounter plenty of runtime bugs if do not have yet a good type-safety discipline.) You can certainly do the job with C by relying on an http library such as libcurl but you might have to adapt it for the Amiga as I am not certain it is available for OS3 (maybe it is, I confess ignorance). But in short, I recommend starting with C (VBCC specifically). |
26 October 2015, 14:19 | #5 |
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
desiv, demolition, ReadOnlyCat, thanks for all your input and clarifications.
@Desiv, it sounds like the consensus is around C! But why do you dismiss Basic? (I know it's supposed to be limiting for games) @Demolition, I think I agree that lexically ASM will slow me down. Thanks for the advice @ReadOnlyCat, that's a good reason. But I'm not a big coder so really I'll just be trying to scratch some itches. I'm sure I'll never be porting an Amiga app to another platform. VBCC sounds great, thank you! For the Wikipedia program, I would run a service (which is Amiga browser friendly) on the internet using php or something similar which accepts http requests and goes to the necessary website and returns something usable to the Amiga application. Who knows, it could just become a web proxy for IBrowse or similar, but I'll start with something simple. |
26 October 2015, 14:30 | #6 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
I would dismiss BASIC for the fact that I don't consider it a serious programming language.
I've used BASIC since the C64 and also used the more recent MS Visual Basic, mainly through ASP pages or scripts, but always found the syntax very odd and hard to grasp as the code base grows. Obviously some people like it since it is still used for serious stuff, so perhaps my brain is just not shaped the right way to be compatible. On the Amiga, I've tried Amiga Basic for some simple stuff, but I've never tried Blitz which is more powerful and shaped to work better in sync with the hardware. |
26 October 2015, 14:41 | #7 |
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
I had to do some VB for an Excel sheet in work some time back. It was indeed convoluted and horrible.. I might take a quick look at a Blitz Basic tutorial but I'll most likely take the C route then
|
26 October 2015, 15:30 | #8 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,348
|
AmiBlitz has pretty decent support for writing Workbench programs - full support for GadTools and Intuition and performance isn't that huge a deal when most of the time your program sits waiting for an Intuition signal to arrive. SMBMounter and InstallerGen are two examples of mine, and HD-Rec is a far more advanced application that's worth looking at to see just what Blitz is capable of.
I've written some detailed Blitz tutorial and reference pieces on AmigaCoding.com, covering both games and non-game programming. It's not finished yet but should be plenty to give you an idea of what's involved. However, if you've already got a good handle on C then that might be the way to go. The OS calls are all generally designed with C in mind so if you already have C experience then it's really just a matter of reading the autodocs, which are available online here. Whichever way you go, have fun! Last edited by Daedalus; 26 October 2015 at 15:33. Reason: Added links |
26 October 2015, 16:26 | #9 |
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
Thanks Daedalus, that fills in the gap for me. I'll spend a little time on both and see which I get the hang of first. The autodocs aren't jogging my memory of C at all - I might need to go back a bit further.
Edit: Found a refresher here> http://fresh2refresh.com/cprogramming/ Last edited by TenLeftFingers; 26 October 2015 at 16:39. |
26 October 2015, 17:03 | #10 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,348
|
The Autodocs are really a reference for Amiga-specific C aspects and assume the reader is already very comfortable with standard C concepts, particularly pointers and structs. So it probably is a good idea to do some general refreshers and get some simple shell-only programs working before you start tackling the Amiga API. That'll also get you used to the compilers on the Amiga.
|
26 October 2015, 17:09 | #11 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
Quote:
Also, some newer offshoots of the language can do some things better: ECX is written in E but supports next-gen Amiga platforms on PPC, PortablE is written in itself and can use C++ as a backend for compatibility with other platforms using different foundation class frameworks (though memory heavy in the current beta), and CreativE which is derived from the original Assembly source of AmigaE and supports only 680x0. |
|
26 October 2015, 17:16 | #12 | |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
Quote:
1: I'm not that familiar with the better BASIC variations on the Amiga. I did some AmigaBASIC back in the day, and it wasn't hideous, but slow... Decided to try C and ASM after that.. Didn't look back. 2: C isn't any harder than BASIC for Amiga WB programs. Once I tried C and ASM, I realized that C for standard things actually makes a lot of sense and isn't as complicated as I initially thought... When I found my old C code recently, I took a look and it basically made sense... Now, I don't know that I'd want to try to write a shooter in C, but for standard progs with a WB interface, it's not that tricky at all... And there's a lot of great source/docs online... desiv |
|
26 October 2015, 18:26 | #13 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,767
|
|
26 October 2015, 20:25 | #14 | |||
Registered User
Join Date: Sep 2013
Location: Ireland
Posts: 800
|
Quote:
Quote:
Quote:
|
|||
26 October 2015, 21:45 | #15 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,767
|
|
27 October 2015, 00:00 | #16 | |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
Quote:
My BASIC experience was line numbered 64 BASIC. Moving to a "structured" BASIC like the AmigaBASIC isn't all that smooth a transition actually. (Well, it's a big change.) As a result, moving to C isn't that big a jump, and there is a lot of great info on learning / using Amiga C... Good luck whatever you choose.. desiv (Now, I suppose I could have LABELed each line in AmigaBASIC with a number and used a GOTO from there.. But it really is best I learned NOT to do that..) ;-) |
|
27 October 2015, 00:32 | #17 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,348
|
I'd just like to point out that Blitz isn't really one of those old school BASICs, since it as all the access to constants, structs and API calls that C has. It runs a little slower and creates larger executables, but there's very little that you can't actually do in Blitz but can in C.
As a result, I tend to use C for speed critical stuff (like the MP3 decoder engine in my MP3 player), and Blitz for everything else like GUI building, but that's just my personal preference. |
27 October 2015, 03:25 | #18 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,338
|
There's a great introduction to E here: http://cshandley.co.uk/JasonHulance/beginner_toc.html
|
27 October 2015, 11:04 | #19 | |||||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Seems that (as usual) i will disagree with most people
Quote:
Quote:
However it has to be 68k asm - doing that on another kind of cpu, errh, no, sorry. AND... ... You have to reuse code. Writing one's own function library to get reused in just about every program makes life a lot easier. Honestly with enough macros and reusable functions Asm may be nearly as easy as Basic. Quote:
Quote:
Quote:
Quote:
Quote:
Very portable, really ? Quote:
Quote:
Quote:
May be a good compiler, but it still lacks an IDE. Like for doing things such as source-level debugging, setting breakpoints in the editor, you see... Quote:
However, try to do basic graphics on these dialects : it was damned easy. Now try to do the same with C : the language itself just doesn't support it ! C isn't good at MP3 decoding. I strongly suggest to do that in ASM - and avoid floats. A 030 can play 22khz mono mp3 at full quality, if done properly. |
|||||||||||
27 October 2015, 12:23 | #20 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,348
|
Yes, but it's better at it than BASIC is. And also, ASM has a tougher learning curve than both of the others, so if I was to use ASM it would never have been made. Also, I never wanted to play my MP3s at 22kHz in mono, that to me isn't worth bothering with. Of course hand-coded ASM makes the tightest, most efficient code - if you're a good programmer, but more often than not there's a compromise to be made between code efficiency and ease of development. ASM will only ever be easier than C or BASIC if you're absolutely proficient at ASM and haven't a clue about the others. Otherwise it's an exercise in frustration for what is realistically very limited benefit in many cases, and is very likely to put you off programming altogether.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga 3D game programming | Steve | Coders. General | 37 | 17 June 2013 22:15 |
Game Programming for Teens, 3rd Edition Book | Amiga Forever | MarketPlace | 3 | 28 February 2011 20:19 |
Andre Lamothe's Tricks of the 3d game programming gurus | Anding | Coders. General | 1 | 18 December 2010 10:58 |
The wrong attitude over bedroom programming and legendary game developers! | manicx | Retrogaming General Discussion | 51 | 10 January 2004 14:09 |
GBA Game Programming Project | CHiEF | Retrogaming General Discussion | 6 | 15 November 2002 00:15 |
|
|