Skip to content

Commit

Permalink
Complete graphics overhaul.
Browse files Browse the repository at this point in the history
50 levels in total, designed by @AndyGFX.
Soundtrack by Bobby Cole, Neil Cross, Alex Khaskin, William Lamy, Bartek Niedzwiecki, Tom Spianti and Mazami Tanzi.
  • Loading branch information
astrofra committed Sep 16, 2024
1 parent 7a5faaf commit 4881094
Show file tree
Hide file tree
Showing 1,356 changed files with 1,667,022 additions and 4,171 deletions.
940 changes: 940 additions & 0 deletions src/Default

Large diffs are not rendered by default.

Binary file added src/Sounds/music/music-haunted_indian_village.wav
Binary file not shown.
Binary file added src/Sounds/music/music-roof_of_the_world.wav
Binary file not shown.
Binary file added src/Sounds/music/music-strangers_on_the_train.wav
Binary file not shown.
Binary file added src/Sounds/music/music-untold_story.wav
Binary file not shown.
Binary file added src/Sounds/music/music_arctic_depth.wav
Binary file not shown.
Binary file added src/Sounds/music/music_celtic_lullaby.wav
Binary file not shown.
Binary file added src/Sounds/music/music_children_of_science.wav
Binary file not shown.
Binary file added src/Sounds/music/music_future_transport.wav
Binary file not shown.
Binary file added src/Sounds/music/music_in_the_air.wav
Binary file not shown.
Binary file added src/Sounds/music/music_intro_mix.wav
Binary file not shown.
Binary file added src/Sounds/music/music_level_selection.wav
Binary file not shown.
Binary file added src/Sounds/music/music_masami_future_003.wav
Binary file not shown.
Binary file added src/Sounds/music/music_my_hero.wav
Binary file not shown.
Binary file added src/Sounds/music/music_mystery_remains.wav
Binary file not shown.
Binary file added src/Sounds/music/music_native_mistery.wav
Binary file not shown.
Binary file added src/Sounds/music/music_shadow.wav
Binary file not shown.
Binary file added src/Sounds/music/music_slow_move.wav
Binary file not shown.
Binary file added src/Sounds/music/music_sunrise_in_a_desert.wav
Binary file not shown.
Binary file added src/Sounds/music/music_urban_digital.wav
Binary file not shown.
Binary file added src/Sounds/music/music_visiting.wav
Binary file not shown.
Binary file added src/Sounds/sfx/gui_game_pause.wav
Binary file not shown.
Binary file added src/Sounds/sfx/gui_up_down.wav
Binary file not shown.
Binary file added src/Sounds/sfx/gui_validate.wav
Binary file not shown.
Binary file added src/Sounds/sfx/robot_movement_1.wav
Binary file not shown.
Binary file added src/Sounds/sfx/robot_movement_6.wav
Binary file not shown.
Binary file added src/Sounds/sfx/robot_movement_9.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sci_fi_computer_console_tone_2.wav
Binary file not shown.
Binary file added src/Sounds/sfx/servomove_07.wav
Binary file not shown.
Binary file added src/Sounds/sfx/servomove_09.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_explosion.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_01.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_02.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_03.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_04.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_05.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_06.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_07.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_08.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_09.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_servomove_blocked_01.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_0.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_1.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_2.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_3.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_4.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_5.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_speech_tut_6.wav
Binary file not shown.
Binary file added src/Sounds/sfx/sfx_teleport.wav
Binary file not shown.
4 changes: 4 additions & 0 deletions src/bootstrap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<NML=1.0>
<ViewMode="Project">
<Input="project.ngp">
<IgnoreEsc=True><IgnoreMissingResource=True>
Binary file added src/builtin/maps/flare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/builtin/maps/time_of_day.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions src/builtin/particle/default.ems
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<NML=1.0>
<ParticleModel=
<Material=
<Id="Emitter">
<AlphaThreshold=0.0>
<PhysicMaterial=
<StaticFriction=0.750000>
<DynamicFriction=0.500000>
<Restitution=0.100000>
>
<RenderMask=
<Shadeless>
<VertexColor>
<NoZWrite>
<FixedFunction>
<AlphaToFrame>
<AlphaSoftZ>
>
<TextureStage=
<Index=0>
<Active>
<Texture="builtin/particle/default.tga">
<UV=0>
>
<TextureStage=
<Index=1>
<Active>
<Texture="builtin/particle/default.tga">
<UV=0>
<Channel="Opacity">
>
>
<TTL=5.000000>
<Damping=0.800000>
<Gravity=
<X=0.000000>
<Y=0.000000>
<Z=0.000000>
>
<AngleCurve=
<Curve=
<Knot=
<Count=2>
<Knot="0.000:0.000000">
<Knot="5.000:6.283185">
>
>
>
<SizeCurve=
<Curve=
<Knot=
<Count=4>
<Knot="0.000:0.000000">
<KnotEx="1.000:4:0.600000:0.000:0.000:0.000:0.000:0.000:0.000:0.000:">
<KnotEx="2.500:4:1.000000:0.000:0.000:0.000:0.000:0.000:0.000:0.000:">
<KnotEx="5.000:4:1.200000:0.000:0.000:0.000:0.000:0.000:0.000:0.000:">
>
>
>
<RedCurve=
<Curve=
<Knot=
<Count=4>
<Knot="0.000:1.000000">
<Knot="2.000:1.000000">
<Knot="3.000:0.500000">
<Knot="5.000:0.250000">
>
>
>
<GreenCurve=
<Curve=
<Knot=
<Count=4>
<Knot="0.000:1.000000">
<Knot="2.000:1.000000">
<Knot="3.000:0.450000">
<Knot="5.000:0.200000">
>
>
>
<BlueCurve=
<Curve=
<Knot=
<Count=4>
<Knot="0.000:1.000000">
<Knot="2.000:1.000000">
<Knot="3.000:0.450000">
<Knot="5.000:0.200000">
>
>
>
<OpacityCurve=
<Curve=
<Knot=
<Count=4>
<Knot="0.000:1.000000">
<Knot="2.000:1.000000">
<Knot="3.000:0.700000">
<Knot="5.000:0.000000">
>
>
>
>
Binary file added src/builtin/particle/default.tga
Binary file not shown.
Binary file added src/builtin/probes/beach_probe.hdr
Binary file not shown.
45 changes: 45 additions & 0 deletions src/builtin/probes/beach_probe_smooth.hdr

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions src/builtin/script/camera_auto_dof.nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
class BuiltinCameraAutoFocus
{
/*<
<Script =
<Name = "Digicam Auto-Focus">
<Author = "Emmanuel Julien">
<Description = "Simulate the auto-focus servo of a digital camera.">
<Compatibility = <Camera>>
<Category = "FX">
>
<Parameter =
<focal_offset = <Name = "Focal offset (m):"> <Description = "Offset the focal point by a given value in meters."> <Type = "Float"> <Default = 0.0>>
<focal_fstop = <Name = "F-Stop (m):"> <Type = "Float"> <Default = 5.0>>
<focus_on = <Name = "Focus on item:"> <Type = "String"> <Default = "">>
>
>*/

//-------------------
focal_offset = 0.0
focus_on = ""
focus_on_item = 0
//-------------------

focal_cdist = 0.1

function OnUpdate(item)
{
local camera = ItemCastToCamera(item),
m = ItemGetMatrix(item)

local scene = ItemGetScene(item)

local distance_to_focus_item = ItemGetWorldPosition(focus_on_item).Dist(m.GetRow(3))
local hit = SceneCollisionRaytrace(scene, m.GetRow(3), m.GetRow(2), ~0, CollisionTraceAll, distance_to_focus_item * 1.5)
if (!hit.hit)
return

local tdist = focus_on_item ? hit.d * 0.5 + distance_to_focus_item * 0.5 : hit.d
focal_cdist += ((tdist + focal_offset) - focal_cdist) * 0.1

ItemRegistrySetKey(item, "PostProcess:Dof:FDist", focal_cdist)
}

function OnSetup(item)
{
if (focus_on)
focus_on_item = SceneFindItem(ItemGetScene(item), focus_on)
}
}
147 changes: 147 additions & 0 deletions src/builtin/script/group_merge_items.nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
class BuiltinMergeGroup
{
/*<
<Script =
<Name = "Merge Group Items">
<Author = "Emmanuel Julien">
<Description = "Merge a group of items during scene setup to improve performance.">
<Compatibility = <Scene>>
<Category = "Scene Management">
>
<Parameter =
<group_name_0 = <Name = "Merge Group A"> <Type = "String"> <Default = "">>
<item_name_0 = <Name = "Merged Item A"> <Type = "String"> <Default = "">>
<group_name_1 = <Name = "Merge Group B"> <Type = "String"> <Default = "">>
<item_name_1 = <Name = "Merged Item B"> <Type = "String"> <Default = "">>
<optimize = <Name = "Optimize geometry"> <Type = "Bool"> <Default = False>>
>
>*/

item_name_0 = ""
group_name_0 = ""
item_name_1 = ""
group_name_1 = ""

optimize = false

function MergeItemList(scene, items)
{
print("Merging " + items.len() + " items:")

// Might be an instance.
if (scene.type() == objectTypeItem)
scene = ItemGetScene(scene)

local start_clock = SystemGetClock()

while (items.len() > 1)
{
print(" " + items.len() + " items left...")

local merged_items = []
for (local n = 0; n < items.len(); )
{
merged_items.append(SceneMergeItems(scene, items[n], items[n + 1]));

SceneDeleteItem(scene, items[n])
SceneDeleteItem(scene, items[n + 1])
SceneFlushDeletionQueue(scene)

n += 2
if ((n + 1) == items.len())
{
merged_items.append(items[n])
break
}
}
items = merged_items
}

print("Done merging in " + (SystemGetClock() - start_clock) * 1000 / SystemGetClockFrequency() + "ms.")
return items[0]
}

function DoMerge(scene, group_name, item_name)
{
local group
try
{ group = SceneFindGroup(scene, group_name) }
catch (e)
{ return }

if (group.isNull())
return

// Build merge list.
local group_items = GroupGetItemList(group)
local items = []

foreach (item in group_items)
switch (ItemGetType(item))
{
case ItemTypeObject:
items.append(item)
break

// Expand instance.
case ItemTypeInstance:
{
local instantiated_items = InstanceGetItemList(ItemCastToInstance(item))

foreach (instantiated_item in instantiated_items)
if (ItemGetType(instantiated_item) == ItemTypeObject)
if (ObjectGetGeometry(ItemCastToObject(instantiated_item)).isValid())
items.append(instantiated_item)
}
break;
}

if (items.len() < 2)
return

// Build a list of items whose parenting will need to be corrected after merging is complete.
local children = []

foreach (item in items)
foreach (child in ItemGetChildList(item))
{
// Skip children that we are going to merge.
if ((ItemGetType(child) == ItemTypeObject) && GroupItemIsMember(group, child))
continue

// Save child and its matrix.
children.append({ Item = child, Matrix = ItemGetMatrix(child) })
}

// Parent item.
//local parent = ItemGetParent(items[0])
local root_item = MergeItemList(scene, items)
ItemSetName(root_item, item_name)
//ItemSetParent(root_item, parent)

// Setup geometry.
local geo = ObjectGetGeometry(ItemCastToObject(root_item))
if (optimize)
GeometryOptimize(geo)
GeometrySetup(geo)
ItemSetup(root_item)

// Restore children parenting.
foreach (child in children)
{
try
{
ItemSetParent(child["Item"], root_item)
ItemSetMatrix(child["Item"], child["Matrix"])
}
catch(e)
{}
}
}

function OnSetup(scene)
{
DoMerge(scene, group_name_0, item_name_0)
DoMerge(scene, group_name_1, item_name_1)
}
}
Loading

0 comments on commit 4881094

Please sign in to comment.