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
13 crawler(s) on-line.
 113 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Seiya:  38 mins ago
 matthey:  1 hr ago
 Rob:  2 hrs 10 mins ago
 vox:  2 hrs 15 mins ago
 kolla:  3 hrs 8 mins ago
 mbrantley:  3 hrs 10 mins ago
 pixie:  3 hrs 33 mins ago
 FerruleMedia:  3 hrs 41 mins ago
 amigakit:  3 hrs 54 mins ago
 DiscreetFX:  4 hrs 9 mins ago

/  Forum Index
   /  Amiga Development
      /  [Hollywood] Playing with Sprites and graphics
Register To Post

PosterThread
r-tea 
[Hollywood] Playing with Sprites and graphics
Posted on 20-Jun-2018 19:15:33
#1 ]
Regular Member
Joined: 21-Nov-2004
Posts: 315
From: Zdzieszowice, Poland

Hi guys.
I got my very first Hollywood windowed application done, and it's available on Aminet.
So, I did my first try with Sprites and drawing.
Simply it's a randomly moved circle.
And there are two things that really surprised me.
First. The sprite often changes its speed significantly, while the speed is constantly set to 1.
Second. Sprite's paths are not straight lines.
Twice: why?

Here goes the code:

--------------------------------------------------------------
@VERSION 2,0
@DISPLAY {Width = 640, Height = 480}
@SAMPLE 10, "Bells.wave"

Function p_CreateSprites()
; Circle
SetFillStyle(#FILLCOLOR)
CreateBrush(10, 12, 12)
SelectBrush(10)
Circle(0, 0, 6, #WHITE)
EndSelect
SetBrushTransparency(10, #BLACK)
CreateSprite(1, #BRUSH, 10)
EndFunction


p_CreateSprites()

x1=0
y1=0
DisplaySprite(1, x1, y1)


Function p_MoveRnd()
x=Rnd(634)
y=Rnd(474)
Circle(x,y,3,#RED)
MoveSprite(1, x1, y1, x, y, {Speed=1})
PlaySample(10)
Circle(x,y,3,#BLACK)
x1=x
y1=y
EndFunction


EscapeQuit(True)
SetInterval(1, p_MoveRnd, 40)

;
; main loop!
;
Repeat
WaitEvent
Forever
---------------------------------------------------------------------

and the executable:

Sprite 68k

_________________
I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately.

 Status: Offline
Profile     Report this post  
ilbarbax 
Re: [Hollywood] Playing with Sprites and graphics
Posted on 21-Jun-2018 11:24:59
#2 ]
Regular Member
Joined: 17-Jan-2010
Posts: 184
From: Italy

@r-tea

I think would be better to post your questions to

forums.hollywood-mal.com

However I tested your code on my 7.1 window installation and I don't note the defects you are claiming.

ciao

 Status: Offline
Profile     Report this post  
r-tea 
Re: [Hollywood] Playing with Sprites and graphics
Posted on 21-Jun-2018 22:08:48
#3 ]
Regular Member
Joined: 21-Nov-2004
Posts: 315
From: Zdzieszowice, Poland

Of course. Already posted two days ago. It seems Andreas has holidays.
At last! - considering he's the hardest working man in code business.

_________________
I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately.

 Status: Offline
Profile     Report this post  

[ 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