Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Snippets : OldSchool Sinus Wave Scroll

Author
Message
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 8th Sep 2011 16:47
Hi everybody,

Here is a new snippet for you, to make a sinus scroll, like we had , on Amiga in the 80's

I provide you in this topic a zip file that contains all you need to test, this is the entire project (see file attachment)

Here's some explanations and a screenie.

The screenie first :



Usually, we use a command like "CopyRect" to cut a picture into some pieces and draw them in the same time.

But here, we can't do that so there is an other method.

We setup a sprite and setup frames animation. That permits us to cut the image into some pieces. But these parts are in the same sprite (subimages).

So, we clone the first sprite we made, a number of time to have "several parts" In fact we draw each sprite with a special frame that is calculate in a loop. (Because all clone have each subimage like the first sprite)

We use an array to store the sinus coordinate. But as you can see this is an array of 255 and not 360 (for 360 degrees). In fact this is to have a smaller array. If you multiply 255 * 1.406 (see the code), we have : 360 or almost.

Finally we make a for next loop that draw sprites with a subimage selection on each, in fact each sprite are one small part of the image.

It's difficult to explain in english for me but try it and read the code, it's not difficult in fact

You can download it by clicking on the small download button at the bottom on the right of this message

Have fun !

Happy AppGameKit !

PS : Sorry for my english lol

Attachments

Login to view attachments
RickV
TGC Development Director
23
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 8th Sep 2011 17:22
Very cool! I really like your demos.

Rick

Financial Director
TGC Team
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 8th Sep 2011 17:28
Thx Rick
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 8th Sep 2011 19:03
Very clever

I drink tea, and in my spare time I write software.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2011 19:39
Maybe rick and lee should add an map called old school demo effects in the agk samples where they could put some of your samples

Cool style!

With the floppy did i mean retro
Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 8th Sep 2011 19:55
Thank you all
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 8th Sep 2011 21:17 Edited at: 8th Sep 2011 21:19
OK, I would love a forum thread on demo effects!

Here is my first 90's demo effect made with AGK.

It's a port from my old AMIGA 1200, and AMOS basic, I made it 20 years ago originally.

Who said you can't do 3D in AppGameKit? You can allways fake it





----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Sep 2011 21:51
I can't wait to try these.
I'm not at my AppGameKit computer at the moment, but I'll try these asap.

They look like very nice effects.

Crystal Noir
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 8th Sep 2011 21:52
Excellent effect Yes we can fake the 3D, I did it with my Starfield demo

Very nice demo
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2011 22:35
The fun part with agk !

Is that it seam to attract alot of old boys like me from the amiga and atari days

And gets people back to the basics thanks to its 2d only support
RickV
TGC Development Director
23
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 9th Sep 2011 00:27
Cool demo Impetus73! Loving this retro demo scene that's started.

Who can do better?



Financial Director
TGC Team
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Sep 2011 03:38 Edited at: 9th Sep 2011 17:29
Quote: "Don't even try to make sense of this, I broke my brain making it 20 years ago :-P"

lol
I wish I had my code from 20 years ago.
Not that it was as good, just that I wish I didn't have to break my brain again for the same things I figured out back then.

Quote: "Who can do better?"

lol
It won't be me, but I'll enjoy watching the competition.


I finally got a chance to try this.
I was confused at first, but then figured out what was going on with the SetSpriteAnimation().
Try stepping the for y = 1 to 110 in the main loop.

Your examples are really cool.

Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Sep 2011 17:44 Edited at: 9th Sep 2011 17:53
I can't get Impetus' demo to work

When I try to run it, the window is created but the app stays on the task bar locked up.
I can't pull it up , and all I can do is exit the window.
I tried redownloading it but that did not work

EDIT
I had to start a new project then copy/paste the code in and the image to the media folder too.
That worked... nice demo Imoetus73

I'm not sure why copying the whole folder over crashed it, but it did.
That didn't happen with the other demos, so I'm not sure what is going on with the download.

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 9th Sep 2011 20:28
hmm.. thats odd CE, I have no idea why it does not work, have anyone else tried it?

I'm almost done with my next demo effect, just need to add some music, hehe

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 9th Sep 2011 20:48
Ok, next effect: Interference

This one uses your brain to create the effect. Yes, I am programming YOUR brain to see the effect how is that for coding?

Might not be wise to watch for prolonged times, as you could get hypnotized, dizzy or just plain crazy (like me)...

I also added some demostration of loop timed, event based timers in the code for you to study.

Pic:


----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Attachments

Login to view attachments
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 11th Sep 2011 00:21
@Impetus73 : I was also fanatical AMOS programmer back in the day. That language was years ahead of it's time - really opened a lot of doors for me that one!

I drink tea, and in my spare time I write software.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 11th Sep 2011 10:26
Thats good to hear Lee, I was going to suggest that you took a look at AMOS to get some ideas for AGK. You and the rest on this forum can actually download it now, from: http://eab.abime.net/showthread.php?threadid=60144 and start using it on your PC.

It was years ahead of it's time yes, and severely limited by the hardware of the time. Imagine if we had todays hardware back then, ohh lala. I especcially liked commands like LOCATE to move the text cursor, and ADD to make wrapping increasing/decreasing values. You should add those to AGK. " ADD x,2 0 to 359 "

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Sep 2011 11:47
Quote: "I was going to suggest that you took a look at AMOS to get some ideas for AGK"


You might find Lee already did get LOTS of his ideas from AMOS...



Login to post a reply

Server time is: 2024-04-26 20:56:12
Your offset time is: 2024-04-26 20:56:12