Author Topic: Animated Name Data  (Read 2358 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 319
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Animated Name Data
« on: August 10, 2013 »
A previous post, animated.

Up and Down keys to highlight a name
Right key for random, Left key to reset
Keys '1', '2' and '3' to move (highlighted) name
Name list starts at '1'

Code: [Select]
restore selection
read maxnum
dim name$(maxnum)
dim type(maxnum)
for a=1 to maxnum
read name$(a)
read type(a)
next a
dim x(maxnum),y(maxnum)
dim x1(maxnum),y1(maxnum)
for a=1 to maxnum
x1(a)=x(a)
y1(a)=y(a)
x(a)=50
y(a)=270
next a
down=1
speed=2
open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
row1=0
row2=0
row3=0
c=peek("port1")
go=go+1
if go>10 go=10
if and(c,16)>0 and go=10 then
go=0
down=down-1
endif
if and(c,64)>0 and go=10 then
go=0
down=down+1
endif
if down<1 down=maxnum
if down>maxnum down=1
if and(c,128)>0 and go=10 then
for a=1 to maxnum
go=0
type(a)=1
next a
endif
g$=inkey$(0)
for a=1 to maxnum
if down=a then
if g$="1" type(a)=1
if g$="2" type(a)=2
if g$="3" type(a)=3
endif
next a
for a=1 to maxnum
if speed=1 then
x(a)=x1(a)
y(a)=y1(a)
endif
if speed=2 then
if x(a)>x1(a) x(a)=x(a)-5
if x(a)<x1(a) x(a)=x(a)+5
if y(a)>y1(a) y(a)=y(a)-1
if y(a)<y1(a) y(a)=y(a)+1
endif
if down=a then
setrgb 1,256,0,0
else
setrgb 1,256,256,256
endif
if type(a)=1 then
row1=row1+17
x1(a)=140-(len(name$(a))*10)
y1(a)=row1+50
text x(a),y(a),name$(a)
endif
if type(a)=2 then
row2=row2+17
x1(a)=340-(len(name$(a))*10)
y1(a)=row2+50
text x(a),y(a),name$(a)
endif
if type(a)=3 then
row3=row3+17
x1(a)=540-(len(name$(a))*10)
y1(a)=row3+50
text x(a),y(a),name$(a)
endif
next a
for a=1 to maxnum
if x(a)<>x1(a) or y(a)<>y1(a) then
start=0
else
start=1
endif
next a
if and(c,32)>0 and go=10 and start=1 then
for a=1 to maxnum
go=0
type(a)=int(ran(3))+1
next a
endif
setrgb 1,256,256,256
text 10,20," (1)Undecided"
text 210,20," (2)Left Wing"
text 410,20,"(3)Right Wing"
until(1=0)

label selection
data 25
data "Benny!",1
data "Bikemadness",1
data "Clanky",1
data "Clyde",1
data "Combatking0",1
data "Hellfire",1
data "Hotshot",1
data "Jim",1
data "Ninogenio",1
data "Optimus",1
data "Paul",1
data "Pixel_Outlaw",1
data "Rain_Storm",1
data "RBZ",1
data "RDC",1
data "Relsoft",1
data "Shockwave",1
data "Slinks",1
data "Staticgerbil",1
data "Stonemonkey",1
data "Stormbringer",1
data "Taj",1
data "Tetra",1
data "Va!n",1
data "Yaloopy",1

I don't know what is wrong with the world, but I know how to fix it.

Have a Yahappy day.
« Last Edit: August 10, 2013 by bikemadness »
Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

Offline Yaloopy

  • Death From Above
  • DBF Aficionado
  • ******
  • Posts: 2876
  • Karma: 35
    • View Profile
    • UltraPaste
Re: Animated Name Data
« Reply #1 on: August 10, 2013 »
Sweet. Nice improvement on the last version.

The random distribution & animation would be a nice effect for players/bots in a multiplayer game.
Fuck L. Ron Hubbard and fuck all his clones.
Challenge Trophies Won: