Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 755
» Latest member: Genar
» Forum threads: 239
» Forum posts: 1,717

Full Statistics

Online Users
There are currently 81 online users.
» 0 Member(s) | 81 Guest(s)

Latest Threads
NED?
Forum: Questions and discussions
Last Post: Marcus
41 minutes ago
» Replies: 7
» Views: 129
n7 files not loading in N...
Forum: Bugs and suggestions
Last Post: Aurel
6 hours ago
» Replies: 5
» Views: 1,371
Animated String Art
Forum: N7
Last Post: johnno1956
10-03-2022, 10:53 AM
» Replies: 2
» Views: 81
Unfinished shoot 'em up g...
Forum: N7
Last Post: johnno1956
09-17-2022, 10:06 PM
» Replies: 4
» Views: 201
Sorry for being absent
Forum: Announcements
Last Post: johnno1956
09-17-2022, 10:01 PM
» Replies: 3
» Views: 311
Nice shoot em up sprites ...
Forum: Local pub
Last Post: johnno1956
09-15-2022, 11:07 PM
» Replies: 3
» Views: 275
Naalaa logo and icons
Forum: Showcase
Last Post: Aurel
09-04-2022, 07:47 AM
» Replies: 93
» Views: 21,161
Moon Lander
Forum: Showcase
Last Post: Aurel
09-03-2022, 06:06 PM
» Replies: 5
» Views: 408
experiments with turtle g...
Forum: N7
Last Post: Rick3137
09-03-2022, 12:26 PM
» Replies: 0
» Views: 139
Pang
Forum: Showcase
Last Post: kcfb
09-01-2022, 02:38 PM
» Replies: 1
» Views: 210

 
  Animated String Art
Posted by: johnno1956 - 10-01-2022, 11:09 AM - Forum: N7 - Replies (2)

Set the 'way back machine' back to the 70's. We were introduced to the fascinating hobby that was String Art.

Piece of decorated wood; A bunch of nails; Coloured string or wool...

Here is little something from bplus of the QB64pe community. String Art. One colour. Animated.

Code:
set window "Animated String Art by Bplus", 600, 600
set redraw off
set color 0, 0, 0
cls

visible r = height(primary) / 2.1
visible cx = width(primary) / 2
visible cy = height(primary) / 2
visible n = 250
visible s = 360 / n

visible red = 175
visible green = 255
visible blue = 155

visible pi = 3.141592654

for t = 1 to 50 step 0.00125
    set color 0, 0, 0
    cls
    set color red, green, blue
    draw ellipse cx - 1, cy, r, r
    for i = 1 to n
        a1 = s * i
        a2 = s * i * t
        set color red, green, blue
        draw line cx+sin(d2r(a1))*r, cy+cos(d2r(a1))*r, cx+sin(d2r(a2))*r, cy+cos(d2r(a2))*r
    next
    redraw       
next

function d2r(angle)
    return angle * (pi / 180)
endfunc

Keep watching and the patterns will synchronise... Experiment with the colour... Hypnotise your cat... lol

J

ps: I tried to drop in a 'if keydown(KEY_ESCAPE) end' but it was ignored... Thankfully it does not run for very long...

Print this item

  NED?
Posted by: Aurel - 09-20-2022, 09:39 PM - Forum: Questions and discussions - Replies (7)

What you use for NED ..a richedit or something else?
how i can compile just edit control?
thanks

Print this item

  Unfinished shoot 'em up game
Posted by: Marcus - 09-16-2022, 02:35 PM - Forum: N7 - Replies (4)

I started working on something using the graphics found here:

https://opengameart.org/content/vertical...m484-games

I abandoned the project quickly because of boredom, but maybe the code might be interesting for someone.


.zip   PlanesWithGuns.zip (Size: 440.55 KB / Downloads: 8)

Print this item

  experiments with turtle graphics
Posted by: Rick3137 - 09-03-2022, 12:26 PM - Forum: N7 - No Replies

I expect you all have already seen turtle graphics on other websites.

 I decided to try it on NaaLaa.  (Good for fighting boredom.)


 It involves drawing lines from a start position, using an angle plus a distance.

 Feel free to use any code that looks interesting. I have a long way to go, and it may take awhile.

Code:
visible p2 = PI * 2.0
visible pen = 0
visible tx = 0  ' turtle x
visible ty = 0
visible anglet =  0.0  ' The angle that the turtle is pointing
visible angletd = 0       
visible cost = 0.0
visible sint = 0.0

visible d1 = p2 / 360 ' 1 degree angle

set redraw 0
' 1368,768  my display size
set window " Turtle graphics ",1368,768,1 
    pen = 0
      hexagon(600,400,100)

      set color 0,0,255
      circle(600,400,200)
      wait 5000
      startangle = 20 ; clr = 0
      for cnt = 1 to 100
        spiral1(600,400,startangle)
        startangle = startangle + 10
        if startangle > 360 then startangle = 0
        zcolor (clr)
        clr = clr + 1
        if clr > 36 then clr = 0
        wait 1
        cls
      next
     
while not keydown(KEY_ESCAPE)  fwait 60 

function plotline ( x1,y1,x2,y2,steps )
  ct = 1
  for cnt = 1 to steps
     
      draw ellipse x1,y1,ct,ct
      ct = ct + 1
      if ct > 40 then ct = 1
      y1=y1 - sin ( anglet )
      x1=x1 + cos ( anglet )
  next
endfunc

function move ( steps )
   x = tx ; y = ty
   ty = ty - (sin(anglet) * steps)
   tx = tx + (cos(anglet) * steps)
   if pen = 1 then  plotline (x,y,tx,ty,steps)
     
       
endfunc

function rturn ( degrees )
  anglet = anglet - degrees * d1
  angletd = angletd + degrees
' anglet = anglet + rad(degrees)
  sint= sin(anglet)
  cost = cos(anglet) 
endfunc

function lturn ( degrees )
  angletd = angletd + degrees
  anglet = anglet + rad(degrees)
  sint= sin(anglet)
  cost = cos(anglet)
endfunc

function locate ( x,y ,angle )
  tx = x
  ty = y
  angletd = angle 
  anglet = angletd * d1
  sint= sin(anglet)
  cost = cos(anglet) 
endfunc

function spiral(x,y)
   pen = 0; a1 =20.0; a2 = 0.01; a3 = 0.01; m1 = 1.1; m2 = 4.1; m3 = 0.3; locate ( x,y,0 );  pen = 1
            z = 1
           
            pen = 0; a2 = 0.01; a3 = 0.01; m1 = 1.1; m2 = 4.1; m3 = 0.3; locate ( x,y,0 )
            pen = 1           
            for cnt = 1 to 1200
                zcolor(z)
                move(m1 + m2)
                lturn(a1-a2)
                a2 = a2 + a3
                m2 = m2 + 0.1
               if ty < 0 then break
               z = z + 1
               if z > 38 then z = 1
            next
         
   redraw
endfunc

function spiral2(x,y)
    angle =60
       subangle = 0.01
       
    m1=20.0
   
   
    c3 = 0.01
    pen = 0
    locate ( x,y,0 )
        pen = 1
        for cnt = 1 to 400
            move(m1)
            lturn(angle - subangle)
            m1 = m1 + 0.001
            if cnt > 20 then subangle = subangle + 0.1
            if cnt< 10 then subangle = subangle + 01.1
            redraw
        next

endfunc

function spiral1(x,y,a1)
   pen = 0; a2 = 0.01; a3 = 0.01; m1 = 1.1; m2 = 4.1; m3 = 0.3; locate ( x,y,0 );  pen = 1
            z = 1
           
            pen = 0; a2 = 0.01; a3 = 0.01; m1 = 1.1; m2 = 4.1; m3 = 0.3; locate ( x,y,0 )
            pen = 1           
            for cnt = 1 to 1200
                zcolor(z)
                move(m1 + m2)
                lturn(a1-a2)
                a2 = a2 + a3
                m2 = m2 + 0.1
               if ty < 0 then break
               z = z + 1
               if z > 38 then z = 1
            next
         
   redraw
endfunc

function circle(x,y,radius)
    x = x - radius/2
    z = radius/ 57.0
    z2 = radius / 57.6
    set caret 10,20
    set color 255,255,255
    wln " Turtle Graphics function test.  Hit Escape key to exit"
    set color 0,0,255

    pen = 0
    locate ( x,y,0 ); draw pixel tx,ty ;draw pixel tx-1,ty ;draw pixel tx+1,ty ;draw pixel tx,ty-1 ;draw pixel tx,ty+1
   ' set color 255,255,255
    move(radius)
    pen = 1
    lturn(90)
    for cnt = 1 to 360
      lturn(1)
      move(z)   
    next

    redraw         
endfunc

function hexagon(x,y,size)
    set caret 10,20
    set color 255,255,255
    wln " Turtle Graphics function test.  Hit Escape key to exit"
    set color 0,0,255
    pen = 0
    angletd = 90
    anglet = rad( angletd )
    locate ( 500,400,90 ); draw pixel tx,ty ;draw pixel tx-1,ty ;draw pixel tx+1,ty ;draw pixel tx,ty-1 ;draw pixel tx,ty+1
     
    move(size)
    lturn(120)
    pen = 1
    move(size)
    lturn(60)
    move(size)
    lturn(60)
    move(size)
    lturn(60)
    move(size)
    lturn(60)
    move(size)
    lturn(60)
    move(size)   

  redraw 
endfunc

function zcolor(clr)

    if clr = 0 then set color 0,0,0       ' black
    if clr = 1 then set color 255,255,255 ' white
    if clr = 2 then set color 255,0,0     ' red
    if clr = 3 then set color 0,0,255     ' blue
    if clr = 4 then set color 0,255,0     ' green
    if clr = 5 then set color 255,255,0   ' yellow
    if clr = 6 then set color 0,255,255   ' blue green
    if clr = 7 then set color 255,0,255   ' violet
    if clr = 8 then set color 255,0,200   ' red violet
    if clr = 9 then set color 200,0,255   ' blue violet

    if clr = 10 then set color 0,0,240       ' blue2
    if clr = 11 then set color 0,0,220       ' blue3
    if clr = 12 then set color 0,0,200       ' blue4
    if clr = 13 then set color 0,0,180       ' blue5
    if clr = 14 then set color 0,0,160       ' blue6
    if clr = 15 then set color 0,0,140       ' blue7
    if clr = 16 then set color 0,0,120       ' blue8
    if clr = 17 then set color 0,0,100       ' blue9
    if clr = 18 then set color 0,0,80        ' blue10
    if clr = 19 then set color 0,0,60        ' blue11
   
    if clr = 20 then set color 0,240,0       ' green2
    if clr = 21 then set color 0,220,0       ' green3
    if clr = 22 then set color 0,200,0       ' green4
    if clr = 23 then set color 0,180,0       ' green5
    if clr = 24 then set color 0,160,0       ' green6
    if clr = 25 then set color 0,140,0       ' green7
    if clr = 26 then set color 0,120,0       ' green8
    if clr = 27 then set color 0,100,0       ' green9
    if clr = 28 then set color 0,80,0       ' green10
    if clr = 29 then set color 0,60,0       ' green11
   
    if clr = 30 then set color 240,0,0       ' red2
    if clr = 31 then set color 220,0,0       ' red3
    if clr = 32 then set color 200,0,0       ' red4
    if clr = 33 then set color 180,0,0       ' red5 
    if clr = 34 then set color 160,0,0       ' red6
    if clr = 35 then set color 140,0,0       ' red7
    if clr = 36 then set color 120,0,0       ' red8
    if clr = 37 then set color 100,0,0       ' red9
    if clr = 38 then set color 80,0,0       ' red10
    if clr = 39 then set color 60,0,0       ' red11                     
endfunc

Print this item

  Moon Lander
Posted by: johnno1956 - 08-30-2022, 09:39 PM - Forum: Showcase - Replies (5)

I found that I had a spare 20 minute window available... Here is another conversion...


.zip   moon_lander.zip (Size: 5.19 KB / Downloads: 5)

I hope that you last longer than I did... lol

J

Print this item

  Pang
Posted by: johnno1956 - 08-30-2022, 09:10 PM - Forum: Showcase - Replies (1)

Ok. Yet another conversion to N7...

This is Marcus' classic, Pang.

Most of the code converted with little to no modification...

Couple of potential problems. 1. Fonts... Pang may need the use of the courier font. As Linux/N7/Fonts do not see eye to eye on all occasions, I did not include the font, but ran with my system default..  2. Line #120 refers to a procedure "running()". I understand its purpose. I could not see the 'procedure' in the listing, so I am going to assume that this is an in-built function of N6. That line is commented out. Possible alternative is to detect the pressing of the ESC key?

Other than that, the game runs as designed... and I am STILL getting killed off too quickly... lol

Enjoy!

J


.zip   pang.zip (Size: 85.23 KB / Downloads: 4)

Print this item

  Nice shoot em up sprites and tiles
Posted by: Marcus - 08-26-2022, 04:27 PM - Forum: Local pub - Replies (3)

Vertical Shmup Set 2 (M484 Games) | OpenGameArt.org

These certainly made me wanna make a shoot em up game.

Print this item

  Sorry for being absent
Posted by: Marcus - 08-26-2022, 03:40 PM - Forum: Announcements - Replies (3)

Sorry for being absent for a while. Been really busy with "stuff". I promise I'll give you a new version soon, have made some fixes to audio quality and added some commands and functions, still working on the help though - writing examples is tedious Big Grin  I'll try and catch up on the posts now.

Print this item

  More N6 conversions
Posted by: johnno1956 - 08-22-2022, 12:40 PM - Forum: Showcase - No Replies

Had a few minutes to spare - actually more than a 'few' minutes... While I was tinkering with Gargoyle Attack I figured, why not? So I began converting some of the 'advance demos' of N6...

A couple of "golden oldies"....


J


.zip   starScroll.zip (Size: 808 bytes / Downloads: 3)

.zip   cosmicParticles.zip (Size: 834 bytes / Downloads: 4)

Print this item

  Gargoyle Attack
Posted by: johnno1956 - 08-22-2022, 09:53 AM - Forum: Showcase - Replies (2)

Here is my attempt to convert the N6 game, Gargoyle Attack, to N7.

Be warned... It may contain, shall we say, random features. Although it uses a simple particle system, to create explosions, it would be nice if it were more 'erratic' than 'circular'.

I will also attach Mr. Masters original code for reference.

Constructive criticism and suggestions are always welcome.

J


.zip   GargoyleAttack.zip (Size: 283.83 KB / Downloads: 2)


.zip   gargoyle_attack.nala.zip (Size: 4.08 KB / Downloads: 0)

Print this item