Author Topic: My Tree  (Read 2151 times)

Peter

  • Guest
My Tree
« on: November 18, 2012, 12:51:31 PM »
Hi,

here is a small NaaLaa prog.
Code: [Select]
import "speed.lib"
import "library.lib" 

visible:
co;tree;star

set window 320,200,320,280
set redraw off
rem create font 1,"verdana",24

tree = LoadBmp("tree/mytree.bmp",0,0)
star = LoadBmp("tree/starlight.bmp",3,0)

load music 1,"tree/music.mod"
play music 1

while not keydown(27)
proc SetBmp tree,0,40,0
proc SetBmp star,52,0,co

co = co  + 1
if co=3 then co=0

redraw
proc SPD_HoldFrame 10
wend   
« Last Edit: November 18, 2012, 01:00:56 PM by Peter »

Peter

  • Guest
Re: My Tree
« Reply #1 on: November 18, 2012, 01:01:48 PM »
Another thing.
Code: [Select]
import "speed.lib"
import "library.lib"

visible:
jx;mx;oA;oB

set window 320,200,640,140
set redraw off

while not keydown(27)
  proc ClearScreen 200,200,240
  cx=0
  for jx=0 to 32
      mx = mousex()/10
      oA = Rand(-mx,mx)
      oB = Rand(-mx,mx
      proc Line cx+oB,20,cx-oB,100,0,0,128
      cx = cx+20
  next
  redraw
  proc SPD_HoldFrame 60
wend

kevin

  • Guest
Re: My Tree
« Reply #2 on: November 18, 2012, 03:09:44 PM »
peter...I have done next to nothing with music in NaaLaa, but I'm very impressed with the mod file in the first example, particularly how small the file is to get such good results.. I will definitely be looking further into .mod files.....thanks you for the example....