Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: New to Amos Pro, looking to start *simple* programming in A.P  (Read 8649 times)

0 Members and 4 Guests are viewing this topic.

LordNipple

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • Wayne Ashworth Art.

Hello all.
I am an Amiga enthusiast and have been since I got my first 500. I now own several Amigas and want to start programming in Amos Pro. Now, I have tried to learn programming in the past, much to the dismay of my friend and teacher who co-made Renegades Deluxe with me, as he tried so many times to explain the simplistics of basic programming to me only to be met with a blank expression. I did the graphics etc on our games and never really 'got' programming. Unfortunately my friend refuses to program any more on the Amiga, which is a real shame but for some reason I simply cannot stop working in DPaint and cannot turn my back on this system so I decided to get a copy of Amos Pro and look to start dabbling in the murky world of programming.

I mean, I don't understand ANY of it, I think I understand basic program structure but one thing I could not wrap my brain around was arrays and how to use them.

I wouldn't be looking to create anything complex at all until I found my feet (if ever) and would concentrate on a text adventure (with use of arrays) for my first game.
It's something I have always wanted to do so I thought I would say hello. :)
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #1 on: April 01, 2015, 09:02:01 PM »

hello!

I started out with a text adventure back on the ZX Spectrum in my youth. There are complex and "proper" ways of approaching it, but even doing it the "wrong" way is always a good learning experience!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #2 on: April 04, 2015, 09:27:45 PM »

Arrays are not that hard to understand. If you have any specific questions or need examples to help you understand how they work better, just ask and we will help you :)

(Sidenote: I also started programming in the early 90s on a Spectrum when I was a teenager)
Logged

Sidewinder

  • Forum Mod
  • A600
  • *****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • http://www.liquido2.com/
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #3 on: April 05, 2015, 12:08:25 AM »

Welcome m'lord.  Arrays confused me also in my early AMOS programming days.  Ultimately I did come to understand and even love them.

An array is simply a way to store many related variables in one single place.  For instance, say I have a game with 4 players and each one has an energy level 0-100.  I can create an array to store all their energy levels together for easy access:

Dim ENERGY(4)

At the start of the game I then set all 4 player's energy to 100, we start counting with 0:

ENERGY(0)=100
ENERGY(1)=100
ENERGY(2)=100
ENERGY(3)=100

Now, during the game I can add or subtract energy using normal arithmetic, I just use the array name and the player number:

Rem This subtracts 15 energy points from player 0
ENERGY(0) = ENERGY(0) - 15
Print ENERGY(0)

So that's pretty much it.

You can also create arrays that act like grids.  These are called 2 dimensional arrays and can be useful for tracking pieces on a board game like chess or battleship.  You create one of these arrays by using Dim with more than one number in the parentheses:

Rem A 2D array
Dim CHESSBOARD(8,8)

Then you can access the value (that might indicate which pieces is at a given point on the board) like so:

Rem Find the piece located at row 4, column 7.
PIECE = CHESSBOARD(4,7)

Remember to always start counting row and columns at 0.

You can have as many dimensions in an array as you want, so a 3D array would be like a cube:

Dim CUBE(10,10,10)

Higher dimensions can also be used, but can be difficult to visualize.  Anyway, I hope this helps a little.  If not, let me know and I'll try to explain it differently.

And again, welcome!

Logged
- Sidewinder

Xertese

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 47
  • Generic Amiga User
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #4 on: April 10, 2015, 08:40:43 PM »

@Sidewinder
You have created 5 Dimensioned arrays for a four array job wasting valuable memory.
Very sloppy coding.
« Last Edit: April 10, 2015, 08:50:04 PM by Xertese »
Logged

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #5 on: April 10, 2015, 10:57:04 PM »

Dear 'Amigo' :
Welcome to the world of amos programming.
You are bound to create new amos games if you try to learn programming in amos pro.
I would start by acquiring the excellent books already printed for coding in amos. (check ebay).
The titles are: Mastering amiga amos, Amos in action, and amiga game maker's manual.
The books are really good, and explain how to easily learn to code.The game maker's manual include
how to write a text only adventure.
Also, if possible, get the amos PD cd.  It has a zillion examples of great code made in amos.
I hope this can get you started.
Love !!!
Logged
-mobilis in mobile-

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #6 on: April 11, 2015, 12:17:18 AM »

@Sidewinder
You have created 5 Dimensioned arrays for a four array job wasting valuable memory.
Very sloppy coding.

If AmosPro supported structures without using the Bank functions, he could have whittled it down to one array of structures.  It's very clumsy and fiddly to do so in AmosPro though.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #7 on: May 10, 2015, 07:30:35 PM »

Just a curios question. Is it impossible to implement structure feature in AMOS?
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #8 on: May 10, 2015, 07:52:54 PM »

It would take some doing.  Right now the priority is on bug fixes rather than new features but once the bugs are fixed, it would be a good idea to add that.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #9 on: May 11, 2015, 01:00:38 AM »

It would take some doing.  Right now the priority is on bug fixes rather than new features but once the bugs are fixed, it would be a good idea to add that.

If that is the case can I request two more features? Can I request the feature of internet support so people can write internet applications or online games? Can I also request the feature of rumble for the PSX/PS2 controller? I am sure these two features I am asking are library extensions but would be super cool to do that. Making AMOS truly the best programming language for games.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #10 on: May 11, 2015, 02:14:36 AM »

Extensions don't require prior knowledge of Amos.library but they do require knowledge of the subject matter.

Using the FD builder on BSDsocket.library should give primitive internet support but the issue of how to form packets arises there.

I know that PlayStation controllers can be used with Amigas but I know nothing of the programming APIs.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #11 on: May 11, 2015, 03:10:46 AM »

Extensions don't require prior knowledge of Amos.library but they do require knowledge of the subject matter.

Using the FD builder on BSDsocket.library should give primitive internet support but the issue of how to form packets arises there.

I know that PlayStation controllers can be used with Amigas but I know nothing of the programming APIs.

What do you mean the issue of how to form packets? Is it something difficult? If someone wishes to write their own API how does one go about doing it? Is it impossible to right an AMOS API for the controller?
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #12 on: May 11, 2015, 03:18:38 AM »

I'm saying that I don't know how to do it.  It is possible though.  Internet support will require multitasking enabled.
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #13 on: May 11, 2015, 02:33:11 PM »

how is rumble support activated on a PSX/2 pad adaptor?  I have several but none have this feature.

I assume there is a specific library for the adaptor, and it should just require a library call to activate?
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: New to Amos Pro, looking to start *simple* programming in A.P
« Reply #14 on: May 11, 2015, 09:09:45 PM »

how is rumble support activated on a PSX/2 pad adaptor?  I have several but none have this feature.

I assume there is a specific library for the adaptor, and it should just require a library call to activate?

There is non but there is no programming feature that support it so therefore there is no hardware that support it. Sorta like you need job experience to get hired but you need to get a job to get the experience kinda of thing. So unless someone build the hardware and the driver API for it at the same time I guess it will never happen.
Logged
Pages: [1] 2   Go Up
 

TinyPortal 2.2.2 © 2005-2022