Recently, I have been spending some time looking at videos posted by user Javidx9 on Youtube. Although these all relate to the C++ programming language (which I am not familiar with), the videos explain the principles behind the code in such a clear way, that I find it releatively easy to follow, and have been able to convert some of the projects to Naalaa 7. I actually used one of his videos when I was writing the Asteroids game for Naalaa that is included in the examples folder of the distribution, and I am currently using this video: Circle collisions
...for a pool game that I am working on at the moment.
May be worth a look at his Youtube channel if you have a few moments to spare, or are looking for inspiration for ideas for gaming projects in Naalaa 7?
I found Naalaa 6 - Linux Installer on my harddisk (please find the attachement file included here).
I don't know whether it is still working or not, but it may bring a good old time memories
This is a game that I started working on but abandoned because I didn't feel like drawing more enemy sprites (I even stole and NES:ified the two enemies there are from my n6 game Likker). It comes with a level editor.
Cast your minds back to before the arrival of Mario when Dinosaurs walked... Sorry. Too far back...
Back when Naalaa 6 reigned supreme... with its Tile Map editor and Raycaster... from the minds of Allan Alcorn and Nolan Bushnell (1972) came the awe-inspiring spectacle that was to be known as "Pong"... made its way to our monitors in all of its monochromatic glory!! The Naalaa 6 version was produced by none other than Marcus (drum roll) Johansson. (see screen grab)
... do not forget the original N6 code...
Code:
rem ==================================================================
rem Pong, from basicprogramming.org.
rem
rem By Marcus Johansson.
rem ==================================================================
import "Speed.lib"
set window 0, 0, 320, 240, false, 2
set redraw off
July 16, 1973 saw the release of Atari's, Space Race. Designed by Ted Dabney and assisted by Nolan Bushnell and Allan Alcorn on the heels of Pong, that released on November 29 of the previous year... https://en.wikipedia.org/wiki/Space_Race_(video_game)
This is my feeble attempt to recreated the game... It is not exact and is not complete. Complete in the sense that it is playable.
I have used colour... Sorry. The 'classics' were done in black and white. Like the dinosaurs, black and white, have had their day.
The code is not optimized and may contain 'random features'...
Controls are simple. Player 1 uses "A" and "Z". Player 2 uses "Up" and "Down". (Up and down movement "only").
The game: Both players have a limited amount of time to reach the top of the screen as many times as is possible. Colliding with "objects" will send the player back to the bottom of the screen.
The original game needed quarters to replay... My 7 year-old grand daughter would find the game "boring" but back in 1973... this was the next best thing to magic...
Ideas for improvements will of course be appreciated... but this was just a "fun" project and may not go any further. Mainly a "see if I can" type of game. There is no original source code as the game was purely electronic(?).
Here are some spare snowflakes, plenty of them in Sweden!
Something very similar was written in n6 many years ago.
Code:
' Snowflakes
' ----------
include "list.n7"
#win32
constant BG_R = 16, BG_G = 24, BG_B = 64
set window "Snowflakes", 480*screenw()/screenh(), 480, true
set redraw off
snowflakeImage = loadimage("snowflake.png")
stars = List()
for i = 1 to 200 stars.Add([x: rnd()*2 - 1, y: rnd()*2 - 1, z: 0.1 + rnd()*0.9])
set color BG_R, BG_G, BG_B
cls
do
for i = 0 to stars.size - 1
s = stars[i]
s.z = s.z - 0.01
if s.z < 0.1
s.z = s.z + 0.9
s.x = rnd()*2 - 1
s.y = rnd()*2 - 1
endif
next
stars.Sort(function(a, b)
return b.z - a.z
endfunc)
set color BG_R, BG_G, BG_B, 96
cls
wp = width(primary)/2
hp = height(primary)/2
for i = 0 to stars.size - 1
s = stars[i]
x = wp + s.x*wp/s.z*0.75
y = hp + s.y*hp/s.z*0.75
size = 16/s.z
set color BG_R, BG_G, BG_B, s.z*255
DrawScaledImage(snowflakeImage, x - size/2, y - size/2, size, size)
next
fwait 60
redraw
until keydown(KEY_ESCAPE) or mousebutton(0)
function DrawScaledImage(img, x, y, w, h)
du = 1/w
u = 0
for dx = 0 to w - 1
draw vraster img, x + dx, y, y + h - 1, u, 0, u, 1
u = u + du
next
endfunc