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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 30
» Latest member: Technopeasant
» Forum threads: 100
» Forum posts: 767

Full Statistics

Online Users
There are currently 52 online users.
» 2 Member(s) | 49 Guest(s)
Bing, 1micha.elok, kevin

Latest Threads
Wolf3D test
Forum: NaaLaa 7 Code
Last Post: johnno56
4 hours ago
» Replies: 0
» Views: 11
Wolf3D
Forum: NaaLaa 7 Questions
Last Post: johnno56
Yesterday, 08:22 AM
» Replies: 15
» Views: 232
The Maze II
Forum: NaaLaa 7 Code
Last Post: johnno56
Yesterday, 07:44 AM
» Replies: 3
» Views: 42
The Maze
Forum: NaaLaa 7 Code
Last Post: Marcus
04-24-2024, 06:46 AM
» Replies: 15
» Views: 1,283
That 3d thing
Forum: NaaLaa 7 Code
Last Post: johnno56
04-21-2024, 12:19 PM
» Replies: 6
» Views: 311
N7 Lander 2
Forum: NaaLaa 7 Code
Last Post: johnno56
04-20-2024, 11:33 AM
» Replies: 3
» Views: 257
HELP. The Mummy in s3d
Forum: NaaLaa 7 Questions
Last Post: 1micha.elok
04-19-2024, 02:39 AM
» Replies: 3
» Views: 264
Circle-line collision
Forum: NaaLaa 7 Code
Last Post: 1micha.elok
04-19-2024, 02:12 AM
» Replies: 9
» Views: 612
Flappy Bird
Forum: NaaLaa 7 Code
Last Post: johnno56
04-17-2024, 05:00 AM
» Replies: 4
» Views: 329
N6 Lander
Forum: NaaLaa 7 Code
Last Post: johnno56
04-16-2024, 08:03 PM
» Replies: 3
» Views: 355

 
  Wolf3D test
Posted by: johnno56 - 4 hours ago - Forum: NaaLaa 7 Code - No Replies

This is just a walls, floor and ceiling layout of the first level modeled after the actual Wolf3D game... This is just a navigable concept level of 64x64 tiles... just to see how N7 copes performance wise...

I will probably use a different tileset for the complete game (assuming I can get that far... lol)... It would be a good idea not to step on Apogee's toes... lol

Of course, the usual constructive criticisms and suggestions, are always welcome....

J


.zip   level1a.zip (Size: 470.2 KB / Downloads: 5)

ps: I modified the display to "double" for "my" screen. Edit as you see fit...

Print this item

  The Maze II
Posted by: 1micha.elok - Yesterday, 06:23 AM - Forum: NaaLaa 7 Code - Replies (3)

THE MAZE II
       
click each image to zoom in

Disclaimer                                                        
No person or entity associated with this game received payment or anything of value, or entered into any agreement,              
in connection with the depiction of the ancient egyptian culture  and with any game assets used in this game.                                          \
No mummies were harmed in the making of this game. Any similarity to any person living or dead is coincidental      

Stage
 Stage 1. Sand Desert in s3d
             First thing first, find a hieroglyph magic spell. Without the spell, you can't eliminate a mummy.
             Cast the spell in a relative close distance. But, don't too close to the mummy.
             control key : SPACE BAR, Mouse, S

 Stage 2. Maze inside the Pyramid in wolf3d
              The maze grid size is small, so you don't need a map. 
              The maze is auto-generated using random maze algorithm.
             control key : LEFT, RIGHT, UP, DOWN, SPACE BAR

          -. Find a key to hidden knowledge
          -. Enjoy your egyptian treasures
          -. Taste the magical amulet
          -. Wear a super diamond
          -. Search for the Pharaoh's Sceptre

 Hints :
 1. Turn on your best sound system. Experience the creepy atmosphere. Don't play this game after midnight.
 2. Don't skip or press ESC too soon, just enjoy every scene.

Note :
This game uses new library of s3d.  It's really injected new fresh energy into the classic horror theme  with its contemporary and somewhat experimental approach to the 3D world. Thanks to Marcus for providing feedback especially on how to put a mummy and example on how to use heightmap using s3d library and thanks to Johnno for MazeGen



Attached Files
.zip   maze2_v2.zip (Size: 2.01 MB / Downloads: 4)
Print this item

  Wolf3D
Posted by: johnno56 - 04-23-2024, 10:04 PM - Forum: NaaLaa 7 Questions - Replies (15)

@Marcus,

If memory serves correctly, at one time, you stated that Wolf3D did not have an editor...  I have noticed that the command structure for Wolf3D is quite similar to that of N6's Raycaster. Is it at all possible that the RC editor may be modified for Wolf3D use? But, then again, what about using the Tilemap Editor? Even if it is to just create the a "map[]" file to be read by Wolf3D... Just a thought or two... (Ok... You can stop chuckling now... *sighh*)

I made a very crude "platformer" 'map' editor, using a language that shall not be named, but it is quite limited in what it can do... but, what it does do, is create a text file of the level map. I suppose, assuming I have the ability to do so, I could try to modify the output file to reflect the same structure "map = []" uses... Warning: This will be a "stretch" for me... I am not certain that I can properly convert the base program to N7... If I can, then I shall discuss the limitations in more detail... Please do not hold your breath whilst you wait.... lol

J

Print this item

  That 3d thing
Posted by: Marcus - 04-20-2024, 11:34 PM - Forum: NaaLaa 7 Code - Replies (6)

I just thought I'd post an example of the current state of that 3d thing I'm working on. It's just an executable where you walk around in a level created with the editor. No source code or editor included this first time. There are still no "sub sectors", so a single sector always have the same floor and wall height. Next time I promise you more advanced rooms and some decoration meshes.

Walk with WASD and look around with the mouse. There is a settings menu where you can change some graphical things and mouse sensitivity (the menu pops up as soon as you start, and you can bring it up again with the escape key).

[Image: that_thing_editor.jpg]

[Image: that_thing.jpg]

Edit You will see that the walls "wiggle" when you walk along them at close range. That's an effect caused by lerping instead of doing fully perspective correct texture mapping. I may improve that the next time I update the S3D library. But that will have to wait until this engine is ready and I've made a game with it.



Attached Files
.zip   that_thing.zip (Size: 777.82 KB / Downloads: 5)
Print this item

  N7 Lander 2
Posted by: johnno56 - 04-19-2024, 11:12 PM - Forum: NaaLaa 7 Code - Replies (3)

Do not ask about version one. Let's not go there... lol

Anyway... Here is version 2 using the new pixeli() command for collision detection.

You know how it works. Left and right arrow keys to move left and right. Up arrow to apply vertical thrust. Land on the green Pad. (Not too fast) Watch your fuel... there is no more until the very last level. Spoiler alert: Hold your breath for level nine.

ToDo:

Collision detection still flaky for level 10.
No background noise or music track.... open to suggestions.
Add "your" recommendations... (assuming "I" can do it. lol)


.zip   lander2.zip (Size: 952.26 KB / Downloads: 12)

Print this item

  HELP. The Mummy in s3d
Posted by: 1micha.elok - 04-18-2024, 12:52 PM - Forum: NaaLaa 7 Questions - Replies (3)

New S3d Library

           
click each image to zoom - in

The mummy is everywhere when I am facing North, South, West etc ... lol .....
Is there a way to put the mummy somewhere in certain coordinate (x,y,z) ?

Code:
'==================================================
' THE MAZE II
' Part 1. Sand Desert
' Part 2. to be
' Part 3. to be
'
' Control :
' SPACE     = move forward
' Mouse     = see around
'
' Reference :
' - s3d.n7 library, ex6_heightmap.n7 by Marcus
'
' Sand texture https://images.app.goo.gl/QwsHZq7hZVdyNXB76
' Mummy1 https://images.app.goo.gl/uiosCKdMHraZPfoC7
' Title https://images.app.goo.gl/AGLmRC8g9vQDg21Q6
'==================================================


'----------------
' INITIALIZATION
'----------------
include "data_maze2/heightmap_library.n7"
include "s3d.n7"; S3D_SetView(primary, rad(90), 0.1, 5)
set window "Maze 2 - Part 1.Sand Desert",400,200,false,3
set mouse off
set redraw off

'color definition
gray         = [128,128,128]
black        = [0,0,0]
white        = [255,255,255]
red          = [255,0,0]
green        = [0,255,0]
darkgreen    = [0,128,0,120]

' Heightmap and Ground
heightmapImg = loadimage("data_maze2/heightmap.png");hm = CreateHeightmap(heightmapImg, 8)
groundImg    = loadimage("data_maze2/ground.png")

' Camera
camX         = 32   ; camY          = 0 ; camZ      = 32 'position
camYaw       = 0    ; camPitch      = 0                  'rotation
camBobAngle  = 0    ; camBobEffect  = 0                  'when the user moves

' Mummy
mummy = []
mummy[1] = []
mummy[1].img = loadimage("data_maze2/mummy1.png")

' misc initial value
dt = 0.003
map = [] 'little map
map.x = width(primary)-100
map.z = height(primary)-80
map.w = width(heightmapImg)
map.h = height(heightmapImg)
map.r = map.w/2        'radius
map.cx = map.x+map.w/2 'center
map.cz = map.z+map.h/2 'center
map.a  = 0             'angle
pos = [] 'player's position
pos.x = 0
pos.y = 0
pos.z = 0

'-----------
' GAME LOOP
'-----------
while not keydown(KEY_ESCAPE, true)
    '----------
    ' control
    '----------
    ' Rotation
    mdx = mouserelx(); mdy = mouserely()
    camYaw = (camYaw + mdx*45*dt)%360 ; camPitch = min(max(camPitch - mdy*45*dt, -60), 60)
    set mouse width(primary)/2, height(primary)/2
   
    ' Movement
    dx = 0; dz = 0
    if keydown(KEY_SPACE)
        dx = dx + sin(rad(camYaw))
        dz = dz + cos(rad(camYaw))
    endif
    if dx or dz
        camBobAngle = camBobAngle + 500*dt          'when the user moves
        k = dt/sqr(dx*dx + dz*dz)
        camX = camX + k*dx                          'position X                 
        camZ = camZ + k*dz                          'position Z
        camBobEffect = min(camBobEffect + 4*dt, 1)  'when the user moves
    endif
    camY = hm.GetY(camX, camZ) - 0.5                'position Y
    pos.x = str(camX,0,1)
    pos.y = str(camY,0,1)
    pos.z = str(camZ,0,1)   
    map.a = 90-camYaw

    '------------
    ' rendering
    '------------
    ' Fill screen with the fog color.
    set color gray; cls

    ' Rendering Process
    S3D_Clear()
    S3D_SetSorting(S3D_BACK_TO_FRONT)
    S3D_SetDepthBuffer(S3D_Z_BUFFER_WRITE)
    S3D_RotateX(rad(-camPitch))
    S3D_RotateY(rad(-camYaw))
    S3D_Translate(-camX, -camY + 0.04*camBobEffect*sin(rad(camBobAngle)), -camZ)
    S3D_Texture(groundImg)
    S3D_Mesh(hm.mesh, 0)
    S3D_Render()
    S3D_RenderFog(gray[0],gray[1],gray[2],false)
       
    ' Just simple draw image
    set color white
    draw image mummy[1].img, 20,20               
       
    '------------
    ' navigation
    '------------
    set color black
        set caret 0,0; wln "Angle "+camYaw 'camYaw = 0 south, 90 east, 180 north, 270 west
        wln "Position "+pos.x+","+pos.y+","+pos.z
    set color darkgreen ; draw ellipse map.cx,map.cz,map.r,map.r,true
    set color green     
        draw ellipse map.cx,map.cz,map.r,map.r
        draw line    map.cx,map.cz,map.cx+map.r*cos(rad(map.a)),map.cz+map.r*sin(rad(map.a))
    set color red       ; draw ellipse (map.x+int(pos.x)),(map.z+int(pos.z)),2,2,true
    set color white     ; draw ellipse (map.x+int(pos.x)),(map.z+int(pos.z)),2,2
        set caret map.cx-18, map.z-13; wln "North" 
        set caret map.cx-18, map.z+map.h; wln "South"
        set caret map.x-35, map.cz-5; wln "West"
        set caret map.x+map.w+5, map.cz-5; wln "East"
   
    redraw
    wait 1
wend



Attached Files
.zip   maze2.zip (Size: 93.07 KB / Downloads: 5)
Print this item

  Circle-line collision
Posted by: Marcus - 04-16-2024, 03:59 PM - Forum: NaaLaa 7 Code - Replies (9)

I wrote a quick test for how collisions between moving objects (player and enemies) and the static walls should work in that 3d thing I'm working on. In the game/engine I will just check for collisions with walls close to the moving objects (a uniform grid will contain information about which walls passes through each cell). But maybe someone may still find this test useful for their own purposes:

Code:
set window "Collision", 640, 480
set redraw off

lines = []
randomize 11
for i = 1 to 8
    ln = [rnd(640), rnd(480), rnd(640), rnd(480)]
    dx = ln[2] - ln[0]; dy = ln[3] - ln[1]
    ln[6] = sqr(dx*dx + dy*dy)
    ln[4] = dx/ln[6]
    ln[5] = dy/ln[6]
    lines[sizeof(lines)] = ln
next

obj = Object(320, 240, 16)

while not keydown(KEY_ESCAPE, true)
    'obj.x = mousex(); obj.y = mousey()
    if keydown(KEY_LEFT)  obj.x = obj.x - 4
    if keydown(KEY_RIGHT)  obj.x = obj.x + 4
    if keydown(KEY_UP)  obj.y = obj.y - 4
    if keydown(KEY_DOWN)  obj.y = obj.y + 4   
    PushOut(obj, lines)
   
    set color 0, 0, 0
    cls
    set color 255, 255, 255
    DrawLines(lines)
    obj.Draw()
   
    set caret width(primary)/2, 0
    center "Use the arrow keys to move the circle around"
   
    redraw
    fwait 60
wend

function DrawLines(lines)
    foreach ln in lines  draw line ln[0], ln[1], ln[2], ln[3]
endfunc

function Object(x, y, r)
    return [x: x, y: y, r: r, rsqr: r*r,
            Draw: function(); draw ellipse .x, .y, .r, .r, false; endfunc]
endfunc

function PushOut(obj, lines)
    ' Let all lines push the object around a maximum of 10 times. This is not a recommended
    ' approach, just for testing.
    tests = 10
    for i = 1 to tests
        col = false
        foreach ln in lines
            dp = max(0, min(ln[6], (obj.x - ln[0])*ln[4] + (obj.y - ln[1])*ln[5]))
            px = ln[0] + dp*ln[4]; py = ln[1] + dp*ln[5]
            dx = obj.x - px; dy = obj.y - py
            d = dx*dx + dy*dy
            if d < obj.rsqr
                k = 1/sqr(d)
                obj.x = px + dx*k*obj.r
                obj.y = py + dy*k*obj.r
                col = true
            endif
        next
        if not col break
    next
endfunc

This is pretty much how I did it in the GLOOM library for n6 too, if my memory is correct (source code since long gone).

Print this item

  Flappy Bird
Posted by: johnno56 - 04-16-2024, 12:17 PM - Forum: NaaLaa 7 Code - Replies (4)

This is a project I started back on 19th October 2016 using SDLBasic...
Over the years it has been ported to QB64 and RCBasic (Jan 2022)

The game is simple. Left Mouse Button or Space to flap. Fly through the "gaps" in the pipes. Each pipe passed is one point. Warning: The game will speed up gradually (usually after every 5 pipes) to a maximum speed of "8"....


.zip   flappy.zip (Size: 95.22 KB / Downloads: 5)

Be careful... index finger fatigue warning!

(ps: Had to mute the "flapping" sound... so annoying... needs a type of timer mod...)

Print this item

  Pixeli Lander Test
Posted by: johnno56 - 04-15-2024, 12:48 AM - Forum: NaaLaa 7 Code - Replies (5)

Ok. This is a VERY crude Lander test. It uses "pixeli()" for collision with the Landing Pad and normal AABB for the ground...

I would appreciate an examination of how I have implemented the pixeli command and suggest any and all corrections.

Note: The ship can land from beneath the pad... Not an error. The landing pad (except for a concept level) is always on the ground.

The usual controls: Arrow keys.
Note: BOTH landing struts MUST contact the pad.
Watch your landing velocity.


.zip   pixelTest.zip (Size: 70.7 KB / Downloads: 5)

Print this item

  n7 version 24.04.14 released
Posted by: Marcus - 04-14-2024, 10:28 AM - Forum: Announcements - Replies (2)

You can now use 'pixeli(x, y)' or 'pixeli(image_id, x, y)' to get the color of an image's pixel as a single number. You can also use 'set colori' to set the current drawing color using such a number.

If you need to convert RGB or RGBA values to a single number color, you can use functions like these:

Code:
function ToRGB(r, g, b)
    return 255*16777216 + r*65536 + g*256 + b
endfunc

function ToRGBA(r, g, b, a)
    return a*16777216 + r*65536 + g*256 + b
endfunc
 
And to get the RGBA components of a single number color:

Code:
function Alpha(c)
    return int(c/16777216)
endfunc

function Red(c)
    return int((c/65536))%256
endfunc

function Green(c)
    return int((c/256))%256
endfunc

function Blue(c)
    return c%256
endfunc

2024-04-14
Added the 'pixeli' function and 'set colori' command to get and set colors as single numbers

Print this item