Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
14 crawler(s) on-line.
 86 guest(s) on-line.
 1 member(s) on-line.


 pavlor

You are an anonymous user.
Register Now!
 pavlor:  1 min ago
 OlafS25:  15 mins ago
 amigakit:  19 mins ago
 clint:  31 mins ago
 NutsAboutAmiga:  40 mins ago
 A1200:  47 mins ago
 Karlos:  1 hr 33 mins ago
 pixie:  1 hr 42 mins ago
 michalsc:  2 hrs ago
 CosmosUnivers:  3 hrs 5 mins ago

/  Forum Index
   /  Amiga General Chat
      /  Amiga Anywhere 2.0 SDK
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 Next Page )
PosterThread
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 10:12:35
#141 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

@linnar

Quote:
I understand You completely!


No, you don't.

Quote:

If You do it in C and in Dos:
printf("Hello world");


No, you don't.

You still need to include header files or libraries before you can actually print something to screen.

Quote:

aaDrawString(AA_DISPLAY_PIXMAP, "Hello World", 20, 20, AA_DEFAULT_FONT, color, 0, FAA_FONT_INK, -1);

This is more complex but it's very strong funktion. You can manipulate the string very mutch.



So you admit it is more complex? Good. Argument over. It is therefore not as easy as AMOS. I have never contested the powerfulness of the language. I am contesting your ridiculous claim of AA2 being easier than AMOS.

Your example is perfect proof of the point

aaDrawString(AA_DISPLAY_PIXMAP, "Hello World", 20, 20, AA_DEFAULT_FONT, color, 0, FAA_FONT_INK, -1);

You have had to declare that you want to use the default font. You also have to declare the font colours and the position you want the text to be displayed. You've also, presumably had to include AA Anywhere libs before being able to call the command? AMOS, on the other hand, will automatically select the default font and current cursor position:


Print "Hello World"

If you want to locate the text elsewhere:

Locate 20,20
Print "Hello World"


If you want to change the font then you can call another command (I forget which, probably something like SET FONT) before that.

Commands stacked in order which have meaningful names describing what they do, is certainly easier for the beginner than a single command with a list of cryptic parameters listed next to it. If you don't need to stray from the defaults then the code becomes even simpler and easier to read.

(edit)

Quote:

But You build Your own code and put in a Your own userlib. and then You use it every tim You develop. You only develop the new code.


This can be done in Basic by writing functions which can be re-used in code. I believe most dialects of BASIC will allow you to include a file with a set of functions. The point is, for most things in AMOS you don't need to include libraries just to draw to the screen.

Last edited by Pleng on 19-Feb-2008 at 10:15 AM.

 Status: Offline
Profile     Report this post  
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 10:17:40
#142 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

@NutsAboutAmiga

Quote:

I like to show you have C can simplify code compared to basic.


dim number as integer
number = number + 1


in C you type the same as:


int number;
number++;


As Samurai Crow has pointed out, you don't need to dim a variable in BASIC.

 Status: Offline
Profile     Report this post  
abalaban 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 10:32:24
#143 ]
Super Member
Joined: 1-Oct-2004
Posts: 1114
From: France

@Samurai_Crow

Quote:
It's a pity your example is wrong. You don't have to dimension variables in BASIC, only arrays and, if supported, structures.


It depends on the BASIC you are using for example in VB you can activate an option "declare variable before usage". IMHO this is a good practise because then you should think about what you'll be doing before starting it, it organize your mind a bit, which generaly produce better code.

Quote:
Python also has implicit declaration of variables, but that is another story.


Yes but Python has nothing to do with BASIC... It's just an interpreted object oriented language (like PERL, would you say PERL is a BASIC ?), PHP and ASP too are interpreted languages and requires variable declaration...

_________________
AOS 4.1 : I dream it, Hyperion did it !
Now dreaming AOS 4.2...
Thank you to all devs involved for this great job !

 Status: Offline
Profile     Report this post  
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 10:40:47
#144 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

@abalaban

Quote:

abalaban wrote:
It depends on the BASIC you are using for example in VB you can activate an option "declare variable before usage".


Yes, you can activate the option, but it's not a requirement.

Quote:

IMHO this is a good practise because then you should think about what you'll be doing before starting it, it organize your mind a bit, which generaly produce better code.
.


Well I've not had very much coding experience so it's difficult for me to comment, but in all the coding I've done, I really haven't seen any advantage in declaring a variable before using it.

 Status: Offline
Profile     Report this post  
abalaban 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 11:26:43
#145 ]
Super Member
Joined: 1-Oct-2004
Posts: 1114
From: France

@Pleng

Quote:
Yes, you can activate the option, but it's not a requirement.


Again depends on the BASIC you are using, you can't edict that as a fact.

Quote:
I really haven't seen any advantage in declaring a variable before using it.

It may prevents nasty many bugs due to typing error, I also hate the fact that you can change the type a variable can store : it harms code readability and maintainability and generally when you don't declare variable you can also do type changing variables...

_________________
AOS 4.1 : I dream it, Hyperion did it !
Now dreaming AOS 4.2...
Thank you to all devs involved for this great job !

 Status: Offline
Profile     Report this post  
linnar 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 11:41:04
#146 ]
Cult Member
Joined: 26-Dec-2005
Posts: 923
From: Unknown

@Pleng

If You are a beginner you have rigth but I see it from the side after You learn C in
1-2 Year.

When I go back to Basic for a moment I dont think the Basic was easyer to develop program. I talk about a bigger program not "Hello World" and so on.

When You develop in C a some year You have build up a lib there You have all the hard stuff You need to develop in C.

To do developement easy, don't learn Basic, go to C direct!
If You learn Basic first You think wrong when You learn C. I have big problem the first step in C.

Basic with compiler is not bad, it's one way to do something.

PS
Go to ground in C and Basic is OT in this tree.
I stop here!
DS

Last edited by linnar on 19-Feb-2008 at 11:46 AM.
Last edited by linnar on 19-Feb-2008 at 11:45 AM.

_________________
There are very interesting in all languages.
http://www.kensonpro.com
Program, codes for websites, hifi, measuring instruments and more. The site is of more than 1200 pages and nearly 3Gb .

 Status: Offline
Profile     Report this post  
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 11:58:24
#147 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

@linnar

Quote:
To do developement easy, don't learn Basic, go to C direct!
If You learn Basic first You think wrong when You learn C. I have big problem the first step in C.


I have many times given up on BASIC dialects because I found them too complicated to perform the tasks I was interested in, namely games programming. There is no way that I will *ever* manage to learn c. I don't have the time or patience.

I am currently giving Hollywood/Designer a go. I have actually managed to develop a working application prototype with it, and once I have completed the application I may give games creation a go. I appreciate its basic style syntax. It's not perfect, but until a truly 'visual', scriptable, games development environment comes out, it'll keep me occupied (or end up frustrating me so I give up again, one or the other!)

 Status: Offline
Profile     Report this post  
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 12:56:24
#148 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

I've changed my mind... after some further research, AMOS definately seems more complicated!!!

 Status: Offline
Profile     Report this post  
opi 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 13:02:24
#149 ]
Team Member
Joined: 2-Mar-2005
Posts: 2752
From: Poland

@Pleng

My personal take on AA2 future is... forget C. Go with something better like Brainfsck or Whitespace.

_________________
OpenWindows Initiative. Port PS3 hardware to bananas. For free. Join today and receive expired $50 cupon from AI!

 Status: Offline
Profile     Report this post  
BigBentheAussie 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 13:24:16
#150 ]
Super Member
Joined: 28-Oct-2003
Posts: 1690
From: Melbourne, Australia

So.... How many minutes would it take to build a wrapper for say... SDL... with the same API as AA2?

_________________
Leo Nigro, CTO Commodore USA, LLC
Opinions expressed are my own and not those of C= USA.
Commodore/AMIGA "Beautiful, High-Performance, Home Computers for Creativity and Entertainment."

 Status: Offline
Profile     Report this post  
Zardoz 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 14:30:07
#151 ]
Team Member
Joined: 13-Mar-2003
Posts: 4261
From: Unknown

@linnar
Yes, you are a little OT there, I've already asked that discussion to be taken to a different thread, please.

_________________

 Status: Offline
Profile     Report this post  
Zardoz 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 14:31:43
#152 ]
Team Member
Joined: 13-Mar-2003
Posts: 4261
From: Unknown

@Pleng

Quote:
Well I've not had very much coding experience so it's difficult for me to comment, but in all the coding I've done, I really haven't seen any advantage in declaring a variable before using it.


Have fun chasing bugs when you've misspelt a variable. Been there with Maple...

The problem with the BASICs is that they give the programmer the illusion that they do not need to know much in order to program. That you can just throw some commands into a text file and get a good application out. Writing good, efficient code is not easy in any language, including BASIC. If you understand what you are doing when you are writing a program, C itself is not difficult and nor is any other programming language out there (well, almost). The language is only there to allow you to express what you want to do in a way that can be compiled. It is not there to do your job as a programmer for you. That is a recipe for disaster for any non-trivial program.

Last edited by Zardoz on 19-Feb-2008 at 02:39 PM.

_________________

 Status: Offline
Profile     Report this post  
wegster 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 14:37:04
#153 ]
Elite Member
Joined: 29-Nov-2004
Posts: 8554
From: RTP, NC USA

@samface

Quote:
The "gain" from less lines of code when using implicit variable declaration in comparison with explicit variable declaration is highly marginal, if any at all.


I agree with the above, although there is something to be said for fewer lines of code, as an often used and/or cited metrics is defects per N LOC. Generally, the fewer lines of code, the fewer defects, which can certainly be a good thing. Although there are other factors - C, not necessarily AA2 or derivatives, is a VERY well documented language at this point, AA2, even if just a C library, certainly is not. (Feel free to search koders.com for C vs AA2 (or AA) examples).

So yes, some languages might offer fewer defects by virtue of fewer LOC...but then again, there remain things you can do with C or C++ that simply can nont be done in other languages.

@nuts - sorry, I did indeed take your previous post to mean that BASIC somehow had programming constructs that C does not.

_________________
Are we not done with the same silly arguments and flames yet??!

 Status: Offline
Profile     Report this post  
Pleng 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 14:38:10
#154 ]
Regular Member
Joined: 17-Nov-2005
Posts: 458
From: Unknown

@Zardoz

Should be simple enough to sus with a decent debugger...

 Status: Offline
Profile     Report this post  
Zardoz 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 14:42:01
#155 ]
Team Member
Joined: 13-Mar-2003
Posts: 4261
From: Unknown

@Pleng

Quote:
Should be simple enough to sus with a decent debugger...


So, you prefer writing code that allows you to do such silly mistakes instead of just declaring a variable in the first place? Not wanting to declare variables in not making code easier to write, it's just being too lazy to write something as trivial as int variable = 0;.

And it is not always as simple as using a decent debugger, you first have to trace your bug to the fact that one of your variables is wrong. This is as far from trivial as something can get if your program is big and the bug is several layers of abstraction deep, in a function called by a function called by a function etc.

Last edited by Zardoz on 19-Feb-2008 at 02:46 PM.
Last edited by Zardoz on 19-Feb-2008 at 02:43 PM.

_________________

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 17:12:41
#156 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12820
From: Norway

@Pleng


Well undefined variables in Virtual Basic are slower then defined variables, this is because they can be used for text or strings, integers, doubles, floating pointer number, they use the most inefficient storage way.

This is completely different from BlitzBasic, BlitzBasic use .w .l as suffix for variables to define what type they are.

The biggest difference between C and Basic, is that Basic has less features, you can do every thing you can do in basic in C, how easy it is to write programs depends on libraries you use.

SDL is better then SVGALIB, but was deigned so users can play around whit different pixel format, and they have all they need sound, graphics, joy pads, basically SDL is standardized commands that cover most things you need for making games, disadvantage it slow, because it is not a native API, SDL has a API that uses the native API, so it is a extra layer and there for its slower.

SVGALIB is where easy to use, its where fast because it read and writes to and from video memory directly, but Linux users don’t like it because it was designed to access video memory directly using the ROOT user (administrator), security holes are an issue, but if you come form basic world it easy to use SVGALIB, even so SVGALIB has its limitations compared to SDL, I believe that newer versions of SVGALIB tries to be more secure.

Graphic library is easy but does not have good support for 32/16 modes, it also requires some basic understand about how AmigaOS is structured.

Cybergraphics / Picasso96 extends Graphic library whit 16/32 bit command, but does not provide proper drawing tools, lines, curves, circles, etc, you will only find this Graphic library.

Last edited by NutsAboutAmiga on 19-Feb-2008 at 05:14 PM.
Last edited by NutsAboutAmiga on 19-Feb-2008 at 05:13 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
ohno 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 20:24:44
#157 ]
Regular Member
Joined: 11-Jun-2003
Posts: 149
From: The Netherlands

@opi

Hi opi,

I just played around with the AA2 SDK for the first time this weekend. I'm a fulltime Java developer, so switching to C or C++ was the biggest obstacle for me. But in general their documentation is pretty nice (although it still has a couple of mistakes in it... they are still working on it).
I was amazed at how little code was required to get a game going natively on Windows and on Windows Mobile (two separate executables generated by the compiler).
The examples-folder in the SDK contains a simple breakout game in 330 lines of code, including lots of comments. The game has graphics onscreen and plays music and sounds.

Keep in mind though, that whatever they provide is just a library and an easier way to compile to multiple targets. So most of the things you ask (constructing arrays, hash, datastructures, looping and all that) are the same as they are in plain C or C++.

Quote:
Do I have to relay on pointers?

Not as much for the things the library provides. The frameworks has functions for loading resources like images and sounds from disk into a table and you work with the index in that table if you need to point to a resource. Theoretically you can still call it a pointer, but the fact that the tables are managed for you by the framework makes cleaning up a lot easier, since you don't have to free all pointers manually.

Quote:
C is great. But I expect that framework should take some chores from my hands.

It does just that.
One obvious example: every target platform works on a different framerate, so updating the bobs on your screen to account for different refresh-rates can quickly become quite a bit of work. You have to measure the amount of time that passed between the current update and the previous update of the screen and adapt the distance to move the bobs accordingly.
One of the functions in the API is aaMoveBob(bob, x, y, speed). Using this method you can simply tell the bob to move to a target location at a given speed and the framework will make sure the bob moves smoothly at the same speed on all devices.
There are also functions like this that allow for damping etc.

Of course those things are not rocket-science, but they do take away some of the annoying boiler-plate code that usually gets in the way of the fun stuff when writing games.

It's also been a very long time since I've last seen so much activity on the Amiga SDA mailinglists. It seems quite a few people like the framework. Questions and suggestions are responded to very quickly.

A little background on me:
I have developed for Amiga-Anywhere a long time ago. I worked together with Gabriel Hauber on a nice Java API where the Java classes were actually written in VP Assembly. Because of the AA-native implementations Java developers could write high-performance games with very little code in plain Java that worked on all devices that had Amiga-Anywhere installed. I haven't found anything like that, even today. Amiga-Anywhere really was a great idea back then.

Using our native API, we also wrote a couple of games, like Go for Goal.
Sadly as we were readying the framework and our games for release, Java was removed from Amiga-Anywhere because Tao had some sort of licensing problem with Sun if I'm not mistaken. And although Gabriel and I had a lot of fun programming those projects and we learned a lot, it was still a very big blow to me to see so many months of work go up in smoke. And ever since that time I haven't done anything again with Amiga-Anywhere.

This time however, Amiga is not depending on any third parties and they created their own tools which should make things much more solid. On top of that I was triggered enough by the API and the messages on the SDA lists to give it a go. I don't have much spare time at the moment, but I still want to try and see if I can free up enough time in the evenings to get a port of Go for Goal going. If nothing comes from it, at least I will have had some fun. And that was the reason I've become a software developer in the first place.

 Status: Offline
Profile     Report this post  
ChrisH 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 21:27:36
#158 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@Zardoz Quote:
Depends on what you want to do really, BASIC is certainly easier to start with but I personally can't follow it, especially as code gets bigger.

Absolutely - the worst trait of BASIC is that it makes you use fixed-size arrays & global variables for almost *everything*, which are really unsuited to larger programs - very messy, very inflexible & hard to change, hard to understand what is going on, etc.

When writing a big program in a BASIC-like language, I resorted to emulating Object Orientated programming using PEEKs & POKEs stored in procedures, with object members defined as constant offsets, and still had a pretty large number of global arrays. Without such hacks (which almost no-one else is going to use) it would have been impossible to write it. BTW, have a look at it here, and it is even open source for my sins:
http://freepoc.org/viewapp.php?id=60

edit: That was one of the reasons for starting to write PortablE - so that I could have a decent programming language on my Psion, instead of just a BASIC-like language. As it happens, I may never port it to Psion now (having taken so long to finish it)...

Last edited by ChrisH on 19-Feb-2008 at 09:39 PM.
Last edited by ChrisH on 19-Feb-2008 at 09:38 PM.

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
ChrisH 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 21:36:29
#159 ]
Elite Member
Joined: 30-Jan-2005
Posts: 6679
From: Unknown

@ohno
Thanks for providing some real facts on AA2, seems like it isn't as bad as I had feared from what little people had previously posted. If you or others post more info, we should gain a better understand of what it is like, and why it might get used over other solutions.

It certainly sounds like they (Amiga Inc) are taking AA2 seriously, although I am curious as to how much effort has actually been expended on it- e.g. how big is it?

_________________
Author of the PortablE programming language.
It is pitch black. You are likely to be eaten by a grue...

 Status: Offline
Profile     Report this post  
ohno 
Re: Amiga Anywhere 2.0 SDK
Posted on 19-Feb-2008 22:49:24
#160 ]
Regular Member
Joined: 11-Jun-2003
Posts: 149
From: The Netherlands

@ChrisH

Quote:
Thanks for providing some real facts on AA2, seems like it isn't as bad as I had feared from what little people had previously posted. If you or others post more info, we should gain a better understand of what it is like, and why it might get used over other solutions.


Personally, I think the SDK should be free and open to anyone for download and the documents free to browse through for anyone.
I was still registered as a SDA developer, so I could download the SDK straight away without signing anything. I probably wouldn't have bothered otherwise.

Usually developers want to tinker with something before they decide wether they like it or not. Forcing people to register or even to sign a document scares them away. I also think it should be possible to create free and open source applications with the framework without any hassle. That will attract more developers, including the ones that do want to write commercial games and you can distribute it under a dual license so commercial applications have to go through Amiga Inc.
I just posted those thoughts to the SDA list as well.

Since I am still under my old NDA, I don't know how much exactly I'm allowed to share here about AA2. But I've been developing some applications on Windows Mobile before with Java, sometimes extending them with a little C++ to access some device-specific stuff like built-in camera's and GPS for example.

The AA2 SDK made it much easier to write and build a simple app that works both on Windows XP and on Windows Mobile. No platform-dependent code in the application. The compiler spits out two binaries. I can immediatly execute the Windows binary on my desktop and I can copy the Windows Mobile binary to my device and execute it there. Easy, fast and painless.
Are there other products that do that? probably there are, but I haven't seen them. AA2 did it. I had a simple application up and running on my mobile device within an hour of first firing up the SDK.

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle