NaaLaa

Full Version: Space Pooper (N7)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
[Image: bnwsf.jpg]

Do you still remember https://naalaa.com/forum/thread-9.html Space Pooper N6 by JSM (John Master) ?

What if ... there's an N7 version coming ?
Could Space Pooper N7 be real ?

Stay tuned ... the countdown has begun
Looking forward to it! Shame it only has one level Sad
I remember it... I still have it installed within N6.... Cool game... But yes, extra levels would be nice...

Good luck with an N7 version... So many libraries... Tilemap, Speed, Keycodes, Random, BezierCurve, SimpleParticle and Bass. (Speed and Keycodes may not be needed). But sounds like fun. Looking forward to any attempt... Yes! A shootem-up!!
John used music made by me on Amiga, a long time ago. Is it in mod/xm format? N7 only supperts wav and mp3, but I think you can export music in those formats in ModPlug Tracker.
(08-14-2026, 05:22 AM)Marcus Wrote: [ -> ]John used music made by me on Amiga, a long time ago. Is it in mod/xm format? N7 only supperts wav and mp3, but I think you can export music in those formats in ModPlug Tracker.

[attachment=620]
click the image to zoom in

It's a little strange - I can't find any music files in MOD or XM format in the Space Pooper assets folder. They may have been accidentally lost or deleted somehow.

As you can see in the attached image, the assets folder only contains some *.png, *.txt and *wav files. That's why I don't hear any background music during gameplay.  Confused
(08-14-2026, 06:08 AM)1micha.elok Wrote: [ -> ]
(08-14-2026, 05:22 AM)Marcus Wrote: [ -> ]John used music made by me on Amiga, a long time ago. Is it in mod/xm format? N7 only supperts wav and mp3, but I think you can export music in those formats in ModPlug Tracker.


click the image to zoom in

It's a little strange - I can't find any music files in MOD or XM format in the Space Pooper assets folder. They may have been accidentally lost or deleted somehow.

As you can see in the attached image, the assets folder only contains some *.png, *.txt and *wav files. That's why I don't hear any background music during gameplay.  Confused

Ah, okay, sorry, my bad! There was music in the version I used for this YouTube video:

(08-14-2026, 12:29 PM)Marcus Wrote: [ -> ]
(08-14-2026, 06:08 AM)1micha.elok Wrote: [ -> ]
(08-14-2026, 05:22 AM)Marcus Wrote: [ -> ]John used music made by me on Amiga...
click the image to zoom in
It's a little strange - I can't find any music files ...
Ah, okay, sorry, my bad! There was music in the version I used for this YouTube video:
...

Don't worry, I can try to extract the title background music from your YouTube video. Hopefully, it works out okay.
[title.mp3]
(08-13-2026, 08:12 PM)johnno56 Wrote: [ -> ]I remember it... I still have it installed within N6.... Cool game... But yes, extra levels would be nice...

Good luck with an N7 version... So many libraries... Tilemap, Speed, Keycodes, Random, BezierCurve, SimpleParticle and Bass. (Speed and Keycodes may not be needed). But sounds like fun. Looking forward to any attempt... Yes! A shootem-up!!

Though the Space Pooper - N6 version uses 7 libraries, I think the N7 version only needs to use 
  • `tilemap.n7` (= `tilemap.lib`) 
  • `polyline.n7` (= `BezierCurve.lib`) 

The other libraries such as
  • `Speed.lib` (frame rates), 
  • `Keycodes.lib` (keyboard keys), 
  • `Random.lib` (random numbers), 
  • `SimpleParticle.lib`,  
  • `bass.lib` (audio) 
... are no longer needed... I think  Big Grin Big Grin Big Grin

In the meantime, I am thinking about adding more levels to the N7 game version and making a few small adjustments.
If memory serves correctly, I believe that BezierCurve, is needed to create the "path" for the attacking enemy to follow and polyline would be used to create polygons... but I could be wrong... lol Still sounds like a fun project! All the best!
(08-15-2026, 12:14 PM)johnno56 Wrote: [ -> ]... Still sounds like a fun project! All the best!

[Image: bnq3E.gif]

File [simple.zip]

This week progress :
- scrolling tilemap
- generating path using polyline
- adding background music 

Next :
- bullets
- shooting
- collision detection
- more levels
- title screen
- boss level
- bonus, power up, shield
-  Big Grin Big Grin Big Grin

Code:
' ==========
' Path Demo
' ==========

#win32

include "tilemap.n7"
include "polyline.n7"

set window "Path Demo", 256, 240, false, 2
set redraw off
randomize time()

visible player, enemy
visible backMusic
visible ply = []
visible enemies = dim(5)
visible scrollY, scrollTimer


'----------------
' Initialization
'----------------
LoadAssets()
InitPlayer()
InitEnemies()

'loop background music
play music backMusic,true

'tilemap background
if TM_LoadMap("assets/1.txt") = 0 then end
scrollY = TM_MapHeight() * 16 - height()
TM_SetView(0, 0, width(), height())
TM_SetCamera(16, scrollY)


'------------
' Main Loop
'------------
while not keydown(KEY_ESCAPE, true)
    'clear screen
    set color 0, 0, 0; cls
    set color 255, 255, 255

    'tilemap scrolling
    scrollTimer = (scrollTimer + 1) % 4
    if scrollTimer = 0 then
        scrollY = scrollY - 1
        if scrollY <= 0 then scrollY = TM_MapHeight() * 16 - height()
    endif
   
    ' Check if current wave is completely cleared
    if WaveClear() then SpawnWave()
   
    UpdatePlayer()
    UpdateEnemies()
   
    'tilemap camera
    TM_SetCamera(int(ply.x) * 32 / width(), scrollY)
    TM_Render()
   
    DrawObject(ply)
    for i = 0 to 5 - 1
        if enemies[i].img <> 0 then DrawObject(enemies[i])
    next
   
    redraw
    fwait 60
wend

end


'------------
' Functions
'------------

function LoadAssets()
    player = loadimage ("assets/player.png")
    set image colorkey player, 255,0,255
    set image grid player, 2, 1
   
    enemy = loadimage ("assets/enemy_1.png")
    set image colorkey enemy, 255,0,255
    set image grid enemy, 4, 2
   
    backMusic = loadmusic("assets/title.mp3")
endfunc

function InitPlayer()
    ply.x = width() / 2
    ply.y = height() - 100
    ply.img = player
    ply.cel = 0
    ply.t = 0
endfunc

function UpdatePlayer()
    ply.t = (ply.t + 1) % 8
    if ply.t = 0 then ply.cel = 1 - ply.cel
endfunc

function InitEnemies()
    for i = 0 to 5 - 1
        enemies[i] = []
        enemies[i].img = 0
    next
endfunc

function WaveClear()
    for i = 0 to 5 - 1
        if enemies[i].img <> 0 then return false
    next
    return true
endfunc

function SpawnWave()
    wavePath = GenCirclePath()
   
    for i = 0 to 5 - 1
        enemies[i].img = enemy
        enemies[i].cel = 0
        enemies[i].dist = -(i) * 50
        enemies[i].spd = 2
        enemies[i].f = 0
        enemies[i].w = width(enemy)
        enemies[i].h = height(enemy)
        enemies[i].path = wavePath
    next
endfunc

' Generate path using polyline
function GenCirclePath()
    points = []
    cx = width() / 2
    cy = height() / 2
    r = 100
   
    ' Entry point
    points[0] = [rnd(width()), -20]
   
    ' circle points
    steps = 36
    for i = 0 to steps
        angle = rad(i * 360 / steps) - PI / 2.0
        px = cx + cos(angle) * r
        py = cy + sin(angle) * r
        points[sizeof(points)] = [px, py]
    next
   
    ' Exit point
    points[sizeof(points)] = [360, height()]
   
    return PolyLine(points, false)
endfunc

function UpdateEnemies()
    for i = 0 to 5 - 1
        if enemies[i].img <> 0 then
            e = enemies[i]
            e.dist = e.dist + e.spd
           
            if e.dist < 0 then
                enemies[i].x = -100
                enemies[i].y = -100
            elseif e.dist >= e.path.GetLength() then
                enemies[i].img = 0
            else
                pos = e.path.GetPoint(e.dist, false)
                enemies[i].x = pos[0] - e.w / 2
                enemies[i].y = pos[1] - e.h / 2
               
                enemies[i].f = (enemies[i].f + 1) % 8
                if enemies[i].f = 0 then enemies[i].cel = (enemies[i].cel + 1) % cols(enemy)
            endif
        endif
    next
endfunc

function DrawObject(o)
    draw image o.img, int(o.x), int(o.y), o.cel
endfunc
Pages: 1 2 3 4