![]() |
![]() |
#1 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
AMOS examples
I've just created a repo on github where I will regularly put Amos (short) sources. Some of them will be extracted from the demos I make from time to time :
https://github.com/alain-treesong/amiga_coding_in_amos These sources are made to work in Amos pro with two extensions that have become standard (amcaf and amos turbo). I put a link in the main page to download a version of Amos Pro with these extensions. The target platform is A500 vanilla but it should work on most of the configuration. Second example : a rotating star extracted from "Happy new year 2021" : I think some cool demoscene relative things can be done in Amos so perhaps some coder will find theses sources usefull... |
![]() |
![]() |
#2 |
Junior Member
Join Date: Sep 2001
Location: No(R)Way
Age: 42
Posts: 3,258
|
Really nice, will follow with great interest!
|
![]() |
![]() |
#3 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Dual playfield
Here is a new example : https://github.com/alain-treesong/am...eDualPlayfield
This a simple dual playfield scrolling with the nice graphics of Ansimuz. In a next example, I will add a third animated static background. |
![]() |
![]() |
#4 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Third playfield example
Hi,
I've uploaded a 4th code example : a trial playfield. Some explanation and source here : https://github.com/alain-treesong/am...threePlayfield Here is a little video of this example in action : [ Show youtube player ] Aghnar Last edited by alain.treesong; 13 June 2021 at 14:07. |
![]() |
![]() |
#5 |
Junior Member
Join Date: Sep 2001
Location: No(R)Way
Age: 42
Posts: 3,258
|
Thanks, very nice!
|
![]() |
![]() |
#6 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Vector balls
Hi,
I've just pushed a new example. This time this is a little vector balls scene. You can find the source here : https://github.com/alain-treesong/am...05_vectorBalls A video of the result : [ Show youtube player ] SeeU |
![]() |
![]() |
#7 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Hi,
New entry in the repository, an horizontal scroll text algo with a cool font : https://github.com/alain-treesong/am...ntalScrollText Bye |
![]() |
![]() |
#8 |
Registered User
Join Date: Sep 2021
Location: Nottingham, UK
Posts: 8
|
Nice, thanks for this.
I'm trying to learn AMOS coming from R/ Python and I am finding it hard to find examples to this is great |
![]() |
![]() |
#9 |
Moderator
Join Date: Jan 2002
Location: Chicago, IL
Posts: 3,454
|
Great examples thank you. I never knew AMOS Pro was so good at Parallax scrolling!
|
![]() |
![]() |
#10 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Thanks @kriz, @chrisbeeley, @Pyromania
@Pyromania All the demos done by "Agima" are coded in Amos and run on a "normal" A500 512K/512K. You can see them in pouet.net or demozoo.org. I will continue of course to publish some examples in 2022. |
![]() |
![]() |
#11 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Hi,
Here is a demo, that can be found in the zone or on usual website like demozoo : https://demozoo.org/productions/303755/ This demo gathers some examples of the code that I spoke about in this thread and that are available in the github repo (https://github.com/alain-treesong/amiga_coding_in_amos) I added two or three lines of code between the scenes to make it a bit prettier. I will add some new snippets in 2022 of course. Happy new year Aghnar / Agima |
![]() |
![]() |
#12 |
Junior Member
Join Date: Sep 2001
Location: No(R)Way
Age: 42
Posts: 3,258
|
Sweet stuff, thanks and keep the tutorials coming.. Happy new year Aghnar!
|
![]() |
![]() |
#13 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Hello,
New entry in the repo github, this time about music : https://github.com/alain-treesong/am...impleMusicDisk A quick video about that : [ Show youtube player ] |
![]() |
![]() |
#14 |
Eleventh Hour Games
Join Date: Feb 2011
Location: Carnforth, England
Age: 50
Posts: 564
|
Brilliant! Thank you for these!
![]() |
![]() |
![]() |
#16 |
Registered User
Join Date: Jul 2022
Location: Australia
Posts: 8
|
Hi all!
Thanks Alain for the great examples. I am fairly new to AMOS (and loving it!). I noticed in the manual for AMCAF mention of a starfield generator. I am trying to get an example working with horizontal animated stars as a background for a space shooter. Any chance someone could post a working example for me to follow?? Thanks! |
![]() |
![]() |
#17 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,224
|
AMCAF starfields are first-person, not sideways. You might have to settle for using the Turbo Draw commands in AMCAF.
|
![]() |
![]() |
#18 |
Aghnar
Join Date: Jan 2019
Location: France
Posts: 156
|
Amos turbo and Amcaf
Hello @GamerGrug
2 classical extensions are included in Amos Community : Amcaf : which has the "td stars" instructions Amos turbo : which has the stars instruction I attached the doc and example of amos turbo : some example like star_snow will be interesting for you. docs_turbo.zip One limitation for turbo is that stars are drawn only in first bitplane. But using set bobs command or dual playfied, you will be able to manage that. Amcaf contains also command for stars as you said. You can download this distib on aminet (some stars example inside): https://aminet.net/package/dev/amos/AMCAFExt140Exa Bye |
![]() |
![]() |
#19 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,321
|
my own low effort attempt, just pasting bobs of dots
it auto does different speeds/planes of stars, just have STARFIELDS = how many planes you want, PLANE1 is always the fastest, extra ones are slower, speed auto calculated. STARSPERFIELD = how many dots/stars you want per field. So you can set them low and quick or over the top till you crash, nothing else is required except setting those 2 values, there is a STARSPEED value farther in you can mess with, which is the initial/fastest speed. This is an example of zero practical use for anyone, i just wanted to try anyways, never actually made one before, made this in an emulator and at a guess this will probably choke a real amiga to death. EDIT: Fixed stupid errors, had it drawing offscreen which is dumb, fixed that, also the max number of starfield "planes" was technically the max number of screen colors, as i had it use a different ink color per plane, now you can specify any number of planes and the colors are simply randomised if the number of planes exceeds the screen colors/depth. [ Show youtube player ] Code:
Rem STARFIELDS controls how many planes of stars there are Rem Each plane moves at a different speed Rem ----- Rem STARSPERFIELD controls how many stars are drawn on each Rem Starfield plane, excessive numbers will slow things down. Set Buffer 80000 STARFIELDS=20 STARSPERFIELD=5 FIRSTSTART=True Fix(2) Dim STARLR#(STARFIELDS,STARSPERFIELD) Dim STARUD#(STARFIELDS,STARSPERFIELD) Global STARLR#(),STARUD#() Global STARFIELDS,STARSPERFIELD,FIRSTSTART Screen Open 0,320,256,8,Lowres Paper 0 Flash Off Palette 0,$222,$444,$666,$A2A,$2AA,$AA2,$FFF Double Buffer Autoback 0 Hide Cls 0 Get Rom Fonts Set Font 1 Rem Grab Some Bobs to use as stars we will later paste MAKESTARS Repeat Bob Update Off Sprite Update Off Rem Do the starfield thing STARFIELD Rem Do other clever stuff here OVERLAYTEXT Bob Update On Sprite Update On Wait Vbl Screen Swap Until Inkey$=" " Show End Procedure STARFIELD Rem Avoid blank screen, instead fill screen with a starfield Rem Rather than have it scroll into play gradually... If FIRSTSTART=True For ZX=0 To STARFIELDS-1 For ZZ=0 To STARSPERFIELD-1 STARLR#(ZX,ZZ)=Rnd(Screen Width) STARUD#(ZX,ZZ)=Rnd(Screen Height) Next ZZ Next ZX FIRSTSTART=False End If Rem Scroll visible stars left in crappy parallax effect Rem ---- Rem Set fastest speed allowed Rem And set how slower stars get per plane STARSPEED#=3 STARSTEP#=(STARSPEED#)/(STARFIELDS) Cls 0 For ZX=0 To STARFIELDS-1 For ZZ=0 To STARSPERFIELD-1 If STARLR#(ZX,ZZ)>-10 STARLR#(ZX,ZZ)=STARLR#(ZX,ZZ)-STARSPEED# Else STARLR#(ZX,ZZ)=Screen Width+Rnd(Screen Width) STARUD#(ZX,ZZ)=Rnd(Screen Height) End If If STARLR#(ZX,ZZ)>-1 and STARLR#<(Screen Width+1) Paste Bob STARLR#(ZX,ZZ),STARUD#(ZX,ZZ),1+((STARFIELDS-1)-ZX) End If Next ZZ STARSPEED#=STARSPEED#-STARSTEP# Next ZX End Proc Procedure MAKESTARS Rem Make stars and other random stuff we can paste to the screen For ZZ=0 To STARFIELDS-1 CLRTOUSE=ZZ+1 If ZZ>Screen Colour CLRTOUSE=Rnd(Screen Colour)+1 End If Cls 0 Plot 0,0,CLRTOUSE Get Bob ZZ+1,0,0 To 1,1 Next Cls 0 Gr Writing 0 TXT$="Lives: 3" Ink 1,0 Text 1,6,TXT$ Text 1,8,TXT$ Text 0,7,TXT$ Text 2,7,TXT$ Ink 7,0 Text 1,7,TXT$ Get Bob STARFIELDS+1,0,0 To Text Length(TXT$)+1,13 Cls 0 TXT$="Score: 1,234,567" Ink 1,0 Text 1,6,TXT$ Text 1,8,TXT$ Text 0,7,TXT$ Text 2,7,TXT$ Ink 7,0 Text 1,7,TXT$ Get Bob STARFIELDS+2,0,0 To Text Length(TXT$)+1,13 Cls 0 End Proc Procedure OVERLAYTEXT Paste Bob 20,Screen Height-20,STARFIELDS+1 Paste Bob Screen Width-150,Screen Height-20,STARFIELDS+2 End Proc Last edited by DisasterIncarna; 07 September 2022 at 20:11. |
![]() |
![]() |
#20 |
Registered User
Join Date: Jul 2022
Location: Australia
Posts: 8
|
Hi all, WOW! I really appreciate the replies. I'll let you know how I go!
Thank you all!!!!! |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Wip] Amos Professional X : Bring AGA to Amos Pro! | freddix | Coders. AMOS | 53 | 22 July 2023 09:53 |
AMOS Files from Writing RPG's in AMOS | supercruiser | request.Other | 0 | 21 April 2020 13:03 |
Any good AMOS examples and tutorials? | amiman99 | Coders. AMOS | 14 | 03 April 2016 05:36 |
Plasma examples anyone? | jobro | Coders. General | 5 | 27 November 2005 17:25 |
Where's the amos.library on the 3-disk AMOS set? | andreas | support.Apps | 0 | 15 November 2001 16:04 |
|
|