amiga.org
     
iconAll times are GMT -6. The time now is 03:06 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga community support ideas » Learn to program Amiga applications and games in #AmigaE

Amiga community support ideas This forum is for the open discussion of new thoughts and ideas intended to help the Amiga community. What do we need? What do we want?

Reply
 
Thread Tools Display Modes
Old 08-16-2011, 01:49 PM   #16
Fats
Cult Member
Points: 10,080, Level: 67 Points: 10,080, Level: 67 Points: 10,080, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
Fats's Avatar
 
Join Date: Mar 2002
Location: Belgium
Posts: 570
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by JJ View Post
Is AmigaE a fully OO language like .net
It's OO but not like you know it. It is a OO language that is not type checking (that's also why I don't consider PortableE a real AmigaE implementation as it is type-checked).
Syntax is more like pascal than C, no curly braces but the use of the END keyword.

greets,
Staf.
__________________
Trust me... I know what I'm doing
Fats is offline   Reply With Quote
Old 08-16-2011, 01:52 PM   #17
SamuraiCrow
Premium Member
Points: 14,084, Level: 77 Points: 14,084, Level: 77 Points: 14,084, Level: 77
Activity: 11% Activity: 11% Activity: 11%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,065
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: Learn to program Amiga applications and games in #AmigaE

AmigaE is an OOP language. We're just about to start covering inheritance soon. There are some bugs in the way that some features are implemented in the emodule format so the class/hash.m module doesn't work right. I'm working on a replacement for that in my spare time. There are a few object-oriented classes in it for linked lists and so on but they aren't in a shared library. In fact, the library mode of AmigaE is so borked that we won't be using it.

We're covering preprocessor macros also in an effort to make our emodule source work on PortablE as well as AmigaE.

@Thorham
OOP uses arrays of function pointers in order to implement inheritable methods. They make those methods have more calling overhead than ordinary functions. It's kind of like the way that the jump tables in shared libraries are slower than a normal function due to the calling overhead.
SamuraiCrow is offline   Reply With Quote
Old 08-17-2011, 05:53 AM   #18
JJ
Lifetime Member
Points: 20,297, Level: 89 Points: 20,297, Level: 89 Points: 20,297, Level: 89
Activity: 7% Activity: 7% Activity: 7%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,686
Default Re: Learn to program Amiga applications and games in #AmigaE

But the adavantages of OO desing well outweigh that disadvantage.

As somone explained it to me recently, as I was not up on OO until I started working towards my MCTS is. Things in world, things in brain, things in code.

Trying to understand UML properly at the mo and reading a book on it
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 3.4 user
JJ is offline   Reply With Quote
Old 08-17-2011, 06:12 AM   #19
Amiga_Nut
Cult Member
Points: 10,513, Level: 68 Points: 10,513, Level: 68 Points: 10,513, Level: 68
Activity: 20% Activity: 20% Activity: 20%
 
Join Date: Jan 2007
Posts: 907
Default Re: Learn to program Amiga applications and games in #AmigaE

How fast is AmigaE exactly?

Is it faster for hitting the blitter/copper than Blitz Basic 2.1? And if so by how much percentage wise are we talking?

I only ask because me and another member at A.org are in the very early stages of doing a new 3D (not real 3D...SEGA style '3D') shootemup and we had planned to use Blitz. Nothing much will happen until we both leave our jobs.

However we have also put together quite a sweet little algorithm for an 80s version of Oblivion style '3D' renderer too and may put this either into a 3D RPG or another game e.g. remake of a 2D C64 classic actually.

(PS both games will be released for free btw, with the option of donating to our cause if you like the games).
Amiga_Nut is offline   Reply With Quote
Old 08-17-2011, 07:29 AM   #20
SamuraiCrow
Premium Member
Points: 14,084, Level: 77 Points: 14,084, Level: 77 Points: 14,084, Level: 77
Activity: 11% Activity: 11% Activity: 11%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,065
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: Learn to program Amiga applications and games in #AmigaE

It doesn't have a hardware-banging "Blitz Mode" like Blitz Basic has, but you can bang the hardware if you have to. The code generator should be comparable to Blitz 2 otherwise.

The main advantage of AmigaE is that the modules are reusable for many applications. You can make system-friendly code really easily with it.
SamuraiCrow is offline   Reply With Quote
Old 08-17-2011, 08:56 AM   #21
commodorejohn
VIP / Donor
Points: 10,617, Level: 68 Points: 10,617, Level: 68 Points: 10,617, Level: 68
Activity: 76% Activity: 76% Activity: 76%
 
commodorejohn's Avatar
 
Join Date: Mar 2010
Location: Duluth, Minnesota
Posts: 3,055
Blog Entries: 8
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by Amiga_Nut View Post
However we have also put together quite a sweet little algorithm for an 80s version of Oblivion style '3D' renderer too and may put this either into a 3D RPG
Well this makes me tingly with anticipation
__________________
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/DX7-IIFD/FB-01, Korg MS-20 Mini/DSS-1, Hohner String Performer

"'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup
commodorejohn is offline   Reply With Quote
Old 08-17-2011, 02:40 PM   #22
Fats
Cult Member
Points: 10,080, Level: 67 Points: 10,080, Level: 67 Points: 10,080, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
Fats's Avatar
 
Join Date: Mar 2002
Location: Belgium
Posts: 570
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by Thorham View Post
And what exactly is wrong with object orientation?
My major gripe with OO is that it often leads to overdesign by implementing unused methods to make APIs complete, very long inheritance chains etc. OO seems to really get the worst out of (some) mediocre programmers.
And if you look how many times programmers still reinvent the wheel, OO has not fulfilled it's promise of code re-usability either. Don't quote me on it but I think I once read it is inherent with OO and that generic programming is more fit for that.

greets,
Staf.
__________________
Trust me... I know what I'm doing
Fats is offline   Reply With Quote
Old 08-17-2011, 08:39 PM   #23
desiv
Defender of the Faith
Points: 6,144, Level: 50 Points: 6,144, Level: 50 Points: 6,144, Level: 50
Activity: 64% Activity: 64% Activity: 64%
 
desiv's Avatar
 
Join Date: Oct 2009
Location: Oregon
Posts: 1,247
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by Thorham View Post
And what exactly is wrong with object orientation?
The fact that I got out of programming before it started, so I haven't used it.


My wife spent a fair amount of time programming OO code (in Windows.. I know, and I still married her... I'll get her using gcc on Linux yet!! :-), so I could always ask her for help.. ;-)

Might drive her crazy tho; as a programmer, I'm a great sysadmin.

desiv
__________________
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
desiv is offline   Reply With Quote
Old 08-18-2011, 11:08 AM   #24
Thorham
Cult Member
Points: 5,276, Level: 46 Points: 5,276, Level: 46 Points: 5,276, Level: 46
Activity: 35% Activity: 35% Activity: 35%
 
Thorham's Avatar
 
Join Date: Oct 2009
Location: Nerd City, Nerderon
Posts: 782
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by SamuraiCrow View Post
@Thorham
OOP uses arrays of function pointers in order to implement inheritable methods. They make those methods have more calling overhead than ordinary functions. It's kind of like the way that the jump tables in shared libraries are slower than a normal function due to the calling overhead.
Yeah, I know, but I don't think function tables are a bad thing... at least not when calling overhead isn't very important.

Quote:
Originally Posted by Fats View Post
My major gripe with OO is that it often leads to overdesign by implementing unused methods to make APIs complete, very long inheritance chains etc. OO seems to really get the worst out of (some) mediocre programmers.
And if you look how many times programmers still reinvent the wheel, OO has not fulfilled it's promise of code re-usability either. Don't quote me on it but I think I once read it is inherent with OO and that generic programming is more fit for that.
Yes, but why blame oo for what people do wrong when using oo? It's like blaming your new, sharp knife for getting yourself cut. Would you rather have a blunt knife that doesn't cut well?

Another one is using the right tool for the right job. Using oo for everything is like a carpenter usinmg a hammer for everything. It's just not going to work.

Quote:
Originally Posted by desiv View Post
The fact that I got out of programming before it started, so I haven't used it.
Then read up on it. It's not very hard to understand and can be very useful sometimes (but not always).
Thorham is offline   Reply With Quote
Old 08-18-2011, 09:18 PM   #25
desiv
Defender of the Faith
Points: 6,144, Level: 50 Points: 6,144, Level: 50 Points: 6,144, Level: 50
Activity: 64% Activity: 64% Activity: 64%
 
desiv's Avatar
 
Join Date: Oct 2009
Location: Oregon
Posts: 1,247
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by Thorham View Post
Then read up on it. It's not very hard to understand and can be very useful sometimes (but not always).
I might, but with what I do, bash scripts (grep, sed, awk, etc) and sometimes perl and PHP handle most of what I need..
Sometimes I poke at C code..

But I'm thinking about it..

desiv
__________________
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
desiv is offline   Reply With Quote
Old 08-19-2011, 02:08 PM   #26
Digiman
Defender of the Faith
Points: 6,596, Level: 53 Points: 6,596, Level: 53 Points: 6,596, Level: 53
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: May 2010
Posts: 1,045
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by commodorejohn View Post
Well this makes me tingly with anticipation
We still have quite a way to go to be honest before anything is coded but I think it can be workable, if only on A1200 not A500. Think Forbidden Forest 3D in the style of Sega late 80s Arcade hardware.

We're really excited about both our games
Digiman is offline   Reply With Quote
Old 08-19-2011, 04:50 PM   #27
Fats
Cult Member
Points: 10,080, Level: 67 Points: 10,080, Level: 67 Points: 10,080, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
Fats's Avatar
 
Join Date: Mar 2002
Location: Belgium
Posts: 570
Default Re: Learn to program Amiga applications and games in #AmigaE

Quote:
Originally Posted by Thorham View Post
Yes, but why blame oo for what people do wrong when using oo? It's like blaming your new, sharp knife for getting yourself cut. Would you rather have a blunt knife that doesn't cut well?
No, but maybe OO is a two sided super sharp knife and most people should stick to using a sharp single sided knife ...

greets,
Staf.
__________________
Trust me... I know what I'm doing
Fats is offline   Reply With Quote
Old 11-09-2011, 05:01 AM   #28
kamelito
Too much caffeine
Points: 2,271, Level: 28 Points: 2,271, Level: 28 Points: 2,271, Level: 28
Activity: 2% Activity: 2% Activity: 2%
 
kamelito's Avatar
 
Join Date: Jul 2011
Posts: 122
Default Re: Learn to program Amiga applications and games in #AmigaE

hi,

Is the courses done in #AmigaE being archived somewhere for off-line reading?
I also like to know what the best choice between ECX, and PortablE. (I plan to use it under MorphOS)
Is it possible to write inline PPC assembler with them? Who's generating the fastest code?
Thanks
Kamel

Last edited by kamelito; 11-09-2011 at 05:12 AM..
kamelito is offline   Reply With Quote
Old 11-09-2011, 09:07 AM   #29
SamuraiCrow
Premium Member
Points: 14,084, Level: 77 Points: 14,084, Level: 77 Points: 14,084, Level: 77
Activity: 11% Activity: 11% Activity: 11%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,065
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: Learn to program Amiga applications and games in #AmigaE

I've started redoing certain aspects of the IRC sessions on ArosWorld.org in the PortablE forum. The first example I've done is the bitset inventory example which shows how to do a 64-bit bitset in PortablE.

I didn't archive anything offline but will be doing some of the same examples that I did in AmigaE and porting them to PortablE on the forum I described above.

It is undesirable to write PPC assembler in most compilers because the only inefficiency to be found in the existing compiled code is the cache loading optimizations. PortablE uses G++ (the C++ frontend for GCC) as its backend. It should generate clean enough code for most uses.

I forgot to mention that I'm putting the Sunday evening IRC sessions on hold for now. I'm tutoring a close friend in math at that time.

Last edited by SamuraiCrow; 11-09-2011 at 09:12 AM..
SamuraiCrow is offline   Reply With Quote
Old 11-09-2011, 12:06 PM   #30
nyteschayde
Premium Member
Points: 11,070, Level: 69 Points: 11,070, Level: 69 Points: 11,070, Level: 69
Activity: 7% Activity: 7% Activity: 7%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 428
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Re: Learn to program Amiga applications and games in #AmigaE

It is true that many junior developers write OO code, especially in Java, that has overly long inheritance chains, but junior developers make all kinds of mistakes. This is simply one of them.

I program in C, C++, Objective C, Java, PHP, Python, and web (i.e. HTML/CSS/JavaScript). I do so for a living and am considered a senior developer by my peers. What does this mean? This really means that I've worked myself out of making many of the junior level mistakes when programming.

Are there better developers than me? Hell yes.
Do I see them often? No.
Do I crave to meet and learn from them? Absolutely

For example, Karlos is a developer that I have spoken to many times on A.org and his ability and coding level usually make my head spin. He is VERY talented. I love learning from him.

How does all this pertain to OO? OO is good when used right. It generally can be a slower implementation though because any time you make the language easier for humans it becomes a bit harder for the computer. Most modern OO languages make the safe assumption that you're using a modern computer with modern programming power and therefore this extra overhead isn't much of an issue.

OO features can be leveraged on slower machines without much of a slow down as long as you don't go overboard and objectify every single possible idea in your code. There is quite a bit of reuse of code in my experience with OO design. The problem is, fundamentally, trust. Most programmers don't necessarily give trust to others code so easily. When it comes time to use another person's code, there is often a sinking feeling (when source isn't available) that bottlenecks, problems and poor implementations come from this black box code.

The amount of time saved by using many C++ STL classes for things like vectors, maps and strings over reimplementing the same thing (over and over again) in C is amazing. If I am trying to eek out the most possible performance from a game on a limited architecture (such as say an Amiga), then using C++ STL classes would have to be evaluated on a case by case basis (and obtaining the most performance would likely mean not using them).

There are several other factors such as executable size and memory consumption to consider. Modern languages can well afford to trade speed of development for heavier usage cost because most modern computers have an order of magnitude (or more) more resources to use. Don't blame OO code because it's not well suited to a machine that was built before OO was a term, let alone a popular one.


Quote:
Originally Posted by Fats View Post
My major gripe with OO is that it often leads to overdesign by implementing unused methods to make APIs complete, very long inheritance chains etc. OO seems to really get the worst out of (some) mediocre programmers.
And if you look how many times programmers still reinvent the wheel, OO has not fulfilled it's promise of code re-usability either. Don't quote me on it but I think I once read it is inherent with OO and that generic programming is more fit for that.

greets,
Staf.
nyteschayde is offline   Reply With Quote
Reply

Bookmarks

Tags
#amigae , amiga , applications , games , learn , program

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump