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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 35
» Latest member: coronaman
» Forum threads: 137
» Forum posts: 1,162

Full Statistics

Online Users
There are currently 163 online users.
» 0 Member(s) | 160 Guest(s)
Applebot, Bing, Google

Latest Threads
Manual
Forum: Everything else
Last Post: johnno56
Today, 11:11 AM
» Replies: 0
» Views: 10
Xmas New Year
Forum: Suggestions
Last Post: Marcus
Yesterday, 03:36 PM
» Replies: 17
» Views: 3,038
Santa by Marcus
Forum: NaaLaa 6 Code
Last Post: johnno56
11-18-2024, 05:41 PM
» Replies: 7
» Views: 156
How to code efficiently
Forum: NaaLaa 7 Questions
Last Post: 1micha.elok
11-17-2024, 09:31 AM
» Replies: 4
» Views: 171
How to make a race track ...
Forum: NaaLaa 7 Questions
Last Post: kevin
11-10-2024, 04:02 PM
» Replies: 8
» Views: 426
Start of a silly Galaga s...
Forum: NaaLaa 7 Code
Last Post: johnno56
11-08-2024, 08:22 AM
» Replies: 3
» Views: 201
Theme Editor
Forum: Everything else
Last Post: johnno56
11-05-2024, 06:45 PM
» Replies: 2
» Views: 155
Scrolling Text
Forum: Everything else
Last Post: kevin
11-04-2024, 02:17 PM
» Replies: 10
» Views: 485
Naalaa origins
Forum: Everything else
Last Post: johnno56
10-25-2024, 07:21 AM
» Replies: 2
» Views: 296
Maze generation
Forum: NaaLaa 7 Code
Last Post: johnno56
10-23-2024, 09:05 AM
» Replies: 17
» Views: 1,679

 
  Dino Simplified
Posted by: 1micha.elok - 11-28-2023, 02:27 PM - Forum: NaaLaa 7 Code - No Replies

[Image: images?q=tbn:ANd9GcSGahYamJXIqCJgjZhJzRW...A&usqp=CAU]

Running Dino ( inspired by the Dino in Chrome browser ) in a very very simplified version.
This simplified version is only an animated one.

Here is the structure of the program :
1. Initialization
    -load image : ground
    -load image : dino
2. Main Program (Looping)
    -define ESC key to quit
    -moving background
    -our main character :-) .... the one and only 'Dino'

It still needs improvement on these features that haven't been implemented yet :
- Animated running dino
- Jump over obstacle / cactus
- Avoid a flying bird
- etc.

You are most welcome if you are interested to improve this very simple 'Running Dino'  Big Grin
It's better to start with a simplified version to understand the logic before making it more sophisticated Big Grin

Note : this code below has used 'set redraw off' .... 'redraw' to avoid flickering graphics as it was suggested by Marcus on the '1945 simplified' post / thread.

Code:
'INITIALIZATION
set window "Dino Simplified",640,480
set redraw off 'to avoid flickering graphics
load image 1,"data_dino/ground.png" 'length = 2400 px
load image 2,"data_dino/ground.png"
load image 3,"data_dino/dino1.png"

speed = 10
ground1X = 0    ; ground1Y = 400
ground2X = 2400 ; ground2Y = 400
dinoX    = 40   ; dinoY    = 330

'MAIN PROGRAM
do
   'ESC TO QUIT
    if keydown(KEY_ESCAPE) then end

   'MOVING BACKGROUND
    cls
    draw image 1,ground1X,ground1Y
    draw image 2,ground2X,ground2Y
               
    if ground1X = -2400 then
        ground1X = 0
        ground2X = 2400
    else
        ground1X = ground1X - speed
        ground2X = ground2X - speed       
    endif

    'DINO
    draw image 3,dinoX,dinoY
   
    'WAIT BEFORE LOOPING
    redraw 'to avoid flickering graphics
    wait 40
loop



Attached Files
.zip   dino.zip (Size: 3.77 KB / Downloads: 8)
Print this item

  1945 simplified
Posted by: 1micha.elok - 11-28-2023, 09:17 AM - Forum: NaaLaa 7 Code - Replies (6)

[Image: ?attachment_id=1703]

Air fighter 1945 in a very very simplified version

The main structure of code is divided in two sections :

1. Initialization
    load image : plane
    load image : bullet
    load image : enemy
    load image : background

2. Main Program (Looping)
    Draw the plane
    Define keys : Esc to quit, Left and Right to move the plane
    Draw enemies
    Bullet is auto shoot

Still have miss lots of features  Big Grin ... somebody please add some code to detect collision between a bullet and an enemy, I am running out of idea on how to code collision detect  Sad

Code:
'INITIALIZATION
set window "1945 Simplified", 640, 480
load image 1,"data/plane.png"
load image 2,"data/bullet.png"
load image 3,"data/enemy.png"
load image 4,"data/black.png"

speed=4
planeX=640/2        ; planeY=400
bulletX = planeX+15 ; bulletY = planeY
enemyX = []         ; enemyY = []
enemyX[0] = 40      ; enemyY[0] = -10
enemyX[1] = 300     ; enemyY[1] = -50
enemyX[2] = 400     ; enemyY[2] = -30

'MAIN PROGRAM
do
    'SET BACKGROUND
     cls
     draw image 4,0,0

     'THE PLANE
     draw image 1,planeX,planeY
                       
    'ESC TO QUIT, LEFT AND RIGHT KEYS TO MOVE THE PLANE
     if keydown(KEY_ESCAPE) then end
     if keydown(KEY_LEFT)   then planeX=planeX-speed
     if keydown(KEY_RIGHT)  then planeX=planeX+speed

     'ENEMIES
     for x=0 to 2
        if enemyY[x]>480 then
            enemyX[x]=rnd(640)
            enemyY[x]=-rnd(50)
         else
            enemyY[x]=enemyY[x]+speed
         endif
      next

      for x=0 to 2
        draw image 3,enemyX[x],enemyY[x]
      next
           
     'BULLET, AUTO SHOOT   
      if bulletY < 480 then
        bulletY   =   bulletY - speed*3
      endif
     
      if bulletY = 100 then
        bulletX = planeX+15
        bulletY = planeY
      endif         
                                
      draw image 2,bulletX,bulletY

     'WAIT BEFORE LOOPING
      wait 40
loop



Attached Files
.zip   1945simplified.zip (Size: 16.2 KB / Downloads: 8)
Print this item

  Problem with constant - maybe
Posted by: johnno56 - 11-27-2023, 07:14 AM - Forum: NaaLaa 7 Questions - Replies (4)

   

I am attempting to "restock" my "to N7" conversions and have come across a bit of a puzzle in regards to "constant"

The error in line #10 seems to be objecting to "pr". If I change "pr" to the value of "pr", as in the previous constant, to 16 - "constant pr2 = 2 * 16" the error clears. Then the same error occurs for line #11 and 12. Keying in the actual value of "xmax" and "tl" clears the error.

Similar error for lines 14 and 15.

It looks like that constant does not like using or referring to a previous constant value.

Also, constant does not seem to like int(), in lines 14, 15 and 17.

Could there be an issue with 'constant' or perhaps I am doing this incorrectly... My money is on the latter... lol

J

Print this item

  Bomb Sweeper - N5 to N7
Posted by: Marcus - 11-25-2023, 08:14 AM - Forum: NaaLaa 7 Code - Replies (3)

I found the source code of a minsweeper game on a backup drive. I think it's for n5, but it might be even older than that. It's a short program, so translating it line by line to n7 only took me a couple of minutes. As with the Robowack translation, this code doesn't take advantage of the new stuff in n7. The original n5 source code is included.



Attached Files
.zip   bomb_sweeper.zip (Size: 3.14 KB / Downloads: 12)
Print this item

  Robowack - N7 version
Posted by: Marcus - 11-24-2023, 08:33 PM - Forum: NaaLaa 7 Code - Replies (6)

Here's an N7 version of the N5/N6 game Robowack.

[Image: robowack.jpg]

I'm using a version of the wolf3d library that has not been released yet, but it's included in the zip. The support for loading maps created with the RC Editor (n6) is not complete yet, so some parts of the code may look a bit weird.

The lines in the original source code (robowack_n6_version.txt) match those in the n7 version (robowack.n7). So if you look at line 503 in the n6 code and wonder how to do that in n7, you can simply look at line 503 in the n7 version Smile

I made some small changes to the game:
* The aspect of the window now matches that of the screen (monitor)
* Increased the field of view to 72 degrees
* Picking up a golden cross now gives you +5 health

I translated the n6 version line by line to n7, so the game does not take advantage of the "new stuff" in n7.



Attached Files
.zip   robowack.zip (Size: 13.46 MB / Downloads: 14)
Print this item

  Rock Blaster by me
Posted by: Marcus - 11-23-2023, 06:41 PM - Forum: NaaLaa 6 Code - Replies (5)

Here's Rock Blaster, source code included, by me. It was written in n5 though ...

[Image: rock_blaster.jpg]

The controls are weird. It's an asteroid style game that you control with the mouse. Hold down the right button and the ship will move towards the mouse cursor. Hold left mouse button to shoot.



Attached Files
.zip   rock_blaster.zip (Size: 7.34 MB / Downloads: 14)
Print this item

  Zombie Tumult by me
Posted by: Marcus - 11-23-2023, 06:04 PM - Forum: NaaLaa 6 Code - No Replies

Here's Zombie Tumult, with source code, by me.

[Image: zombie_tumult.jpg]



Attached Files
.zip   zombie_tumult.zip (Size: 1.23 MB / Downloads: 8)
Print this item

  Pat by JSM
Posted by: Marcus - 11-23-2023, 05:55 PM - Forum: NaaLaa 6 Code - No Replies

Here's Pat, with source code, by JSM.

[Image: pat.jpg]

Edit That dialog is lying though. You jump with arrow key up. Silly John.



Attached Files
.zip   pat.zip (Size: 1,017.54 KB / Downloads: 10)
Print this item

  Space Pooper by JSM
Posted by: Marcus - 11-23-2023, 05:33 PM - Forum: NaaLaa 6 Code - No Replies

Here's the N6 game Space Pooper, with source code, by JSM.

[Image: space_pooper.jpg]



Attached Files
.zip   space_pooper.zip (Size: 1.38 MB / Downloads: 9)
Print this item

  Old Stuff
Posted by: johnno56 - 11-23-2023, 07:32 AM - Forum: NaaLaa 6 Questions - Replies (6)

I just found the Youtube Naalaa channel....  https://www.youtube.com/channel/UCRwL0Jj...X0w/videos

Am I correct in assuming that "all" of those programs are gone? No chance that at least a few may have been tucked away on some forgotten drive somewhere? There are such a lot of cool games on that channel... It would be a shame if they were all lost... *sigh*  

I will look through my old drives, just in case, but I cannot be sure that I have any of them... I think I may have the 'example' programs for N5 and N6 but that may be all... I will still look none the less...

J

Print this item