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
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
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).
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.
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)
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]
' 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"
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).
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"....
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