A new week, a new update!
This time, Ive improved the engine. So all maps are loaded now from a seperate definition file. This gives the power to build an easy map editor.
All media files are also loaded automatically. The biggest advantage of this feature is, that I've just to add the files to the right folder, and add them over the map definition file.
If you want to take a look at the map file:
terrain,teufelskap_h.png,teufelskap_t.png,detail_land.png,0,0,0,400,20,400
model,bed,0.6,0.6,3764,7950,270,0.0,0.0,0.0
model,table,0.6,0.6,4061,7950,369,0.0,0.0,0.0
model,carpet,0.4,0.4,4061,7948,300,0.0,0.0,0.0
model,house,0.4,0.4,-250,240,-70,0.0,45.0,0.0
model,chapel,0.4,0.4,377,240,-377,0.0,45.0,0.0
model,door,0.4,0.4,15,7940,-90,0.0,0,0.0
model,tower,1.4,1.4,-1000,240,-700,0.0,45.0,0.0
model,barn,5,5,300,220,250,0.0,45.0,0.0
model,couch,0.5,0.5,4221,7948,39,0.0,90,0.0
model,frame1,0.9,0.9,4252,8040,39,0.0,90,0.0
model,frame2,0.9,0.9,3890,8040,139,0.0,-90,0.0
model,bench,0.9,0.9,-35,7940,60,0.0,0,0.0
model,bench,0.9,0.9,-35,7940,120,0.0,0,0.0
model,bench,0.9,0.9,-35,7940,180,0.0,0,0.0
model,cross,10.0,10.0,33,7940,270,0.0,90,0.0
model,box,50,50,385,270,409,0.0,40.0,0.0
model,box,50,50,385,320,409,0.0,50.0,0.0
model,box,50,50,258,270,315,0.0,40.0,0.0
model,box,50,50,258,320,315,0.0,50.0,0.0
model,box,50,50,294,270,273,0.0,40.0,0.0
model,box,50,50,294,320,273,0.0,50.0,0.0
model,box,50,50,-186,120,1898,0.0,40.0,0.0
model,box,50,50,-186,170,1898,0.0,50.0,0.0
model,ornament,1,1,-230,260,50,0.0,227,0.0
model,fountain,1.8,1.8,-70,240,150,0.0,-120,0.0
model,fountain,1.8,1.8,800,240,-800,0.0,-120,0.0
model,statue,1.8,1.8,120,240,-130,0.0,-120,0.0
model,windmill,0.4,0.4,-320,240,560,0.0,0,0.0
model,fence2,0.3,0.3,600,240,230,0.0,-120,0.0
model,fence2,0.3,0.3,-111,240,-650,0.0,-180,0.0
model,barrel,0.6,0.6,-500,240,525,0.0,-180,0.0
model,barrel,0.6,0.6,528,240,209,0.0,-180,0.0
model,barrel,0.6,0.6,590,240,136,0.0,-180,0.0
model,barrel,0.6,0.6,400,240,81,0.0,-180,0.0
model,barrel,0.6,0.6,293,250,125,0.0,-180,0.0
model,barrel,0.6,0.6,422,250,332,0.0,-180,0.0
model,barrel,0.6,0.6,120,240,-372,0.0,-180,0.0
model,sack,0.2,0.2,200,240,81,0.0,-180,0.0
model,sack,0.2,0.2,-200,240,650,0.0,-180,0.0
model,sack,0.2,0.2,-250,240,693,0.0,-180,0.0
model,fence2,0.3,0.3,-322,240,-518,0.0,60,0.0
model,fence2,0.3,0.3,-600,240,680,0.0,120,0.0
model,fence2,0.3,0.3,-800,240,280,0.0,120,0.0
model,fence2,0.3,0.3,830,190,1080,0.0,120,0.0
model,fence2,0.3,0.3,500,190,880,0.0,145,0.0
model,fence2,0.3,0.3,282,240,443,0.0,345,0.0
model,fence2,0.3,0.3,824,280,-154,180,232,0.0
model,fence2,0.3,0.3,660,280,-892,180,32,0.0
model,fence2,0.3,0.3,-836,80,-1758,0.0,0.0,0.0
model,fence3,0.3,0.3,-500,240,150,0.0,340,0.0
model,lighthouse,5.0,5.0,1500,200,1600,0.0,100,0.0
model,dock,8.0,8.0,-200,-180.0,2200,0.0,20,0.0
model,oldboat,8.0,8.0,0,70.0,1800,0.0,20,0.0
model,fishingboat,0.8,0.8,-300,0.0,2800,0.0,90,0.0
model,stone3,0.700000,0.700000,293,49,1361,0.000000,60,0.000000
model,stone1,0.100000,0.100000,1293,110,-37,0.000000,60,0.000000
model,stone4,0.750000,0.750000,-1363,45,485,0.000000,60,0.000000
model,stone2,0.750000,0.750000,-1264,56,540,0.000000,60,0.000000
model,stone3,0.050000,0.050000,1376,62,-857,0.000000,60,0.000000
model,stone2,0.750000,0.750000,252,122,-1116,0.000000,60,0.000000
model,stone2,0.200000,0.200000,-1472,98,-1232,0.000000,60,0.000000
model,stone4,0.100000,0.100000,1451,98,-182,0.000000,60,0.000000
model,stone1,0.250000,0.250000,1167,119,-381,0.000000,60,0.000000
model,stone3,0.700000,0.700000,-5,128,-1356,0.000000,60,0.000000
model,stone2,0.500000,0.500000,-1234,52,627,0.000000,60,0.000000
model,stone2,0.800000,0.800000,696,66,1258,0.000000,60,0.000000
model,stone4,0.650000,0.650000,2,58,1480,0.000000,60,0.000000
model,stone2,0.900000,0.900000,1389,47,-1407,0.000000,60,0.000000
model,stone2,0.900000,0.900000,-1424,63,978,0.000000,60,0.000000
model,stone4,0.950000,0.950000,-1408,59,348,0.000000,60,0.000000
model,stone2,0.650000,0.650000,-1488,59,989,0.000000,60,0.000000
model,stone3,0.900000,0.900000,-1156,62,1460,0.000000,60,0.000000
model,stone4,0.250000,0.250000,1373,50,-1426,0.000000,60,0.000000
model,stone4,0.250000,0.250000,-1019,52,741,0.000000,60,0.000000
model,stone1,2.150000,2.150000,851,-9,1359,0.000000,60,0.000000
model,stone3,2.500000,2.500000,812,-10,1316,0.000000,60,0.000000
model,stone2,2.650000,2.650000,-1334,-8,1057,0.000000,60,0.000000
model,stone4,2.500000,2.500000,820,-10,1325,0.000000,60,0.000000
model,stone4,3.150000,3.150000,802,-9,1383,0.000000,60,0.000000
model,stone4,2.800000,2.800000,578,-9,-372,0.000000,60,0.000000
model,stone1,2.050000,2.050000,1275,-6,-836,0.000000,60,0.000000
model,stone2,3.150000,3.150000,-1424,-7,1019,0.000000,60,0.000000
model,stone3,2.100000,2.100000,-402,-6,475,0.000000,60,0.000000
model,stone4,2.950000,2.950000,1285,-8,-846,0.000000,60,0.000000
model,fence_floor2,1.4,2.6,-1000,230,-700,0.0,45.0,0.0
transmodel,frame3,0.9,0.9,3100,8040,240,0.0,0,0.0,120
transmodel,fountain_water,1.8,1.8,-70,240,150,0.0,-120,0.0,120
transmodel,fountain_water,1.8,1.8,800,240,-800,0.0,-120,0.0,120
shadermodel,floor2, 1.4,1.4,-1000,240,-700,0.0,45.0,0.0,detail_floor.png,0.1,0.1
shadermodel,floor,20.4 ,200.0 ,0,130,-300 ,0.0,0,0.0,detail_floor.png,0.1,0.1
shadermodel,floor3,5.0,5.0,1500,200,1600,0.0,100,0.0,detail_floor.png,0.1,0.1
plant,wheat,-633.000000,247.042175,162.000000,60.000000,323,10
plant,wheat,-495.000000,240.704865,183.000000,60.000000,148,10
plant,wheat,-670.000000,248.016113,139.000000,60.000000,315,10
plant,wheat,-507.000000,242.974915,137.000000,60.000000,15,10
plant,wheat,-644.000000,247.716522,205.000000,60.000000,183,10
plant,wheat,-456.000000,240.902618,232.000000,60.000000,144,10
plant,wheat,-631.000000,246.853638,191.000000,60.000000,42,10
plant,wheat,-680.000000,248.016113,170.000000,60.000000,11,10
plant,wheat,-612.000000,246.433868,170.000000,60.000000,275,10
plant,wheat,-662.000000,247.578796,109.000000,60.000000,271,10
plant,wheat,-460.000000,239.076050,167.000000,60.000000,259,10
plant,wheat,-666.000000,247.434570,218.000000,60.000000,60,10
plant,wheat,-503.000000,241.361847,181.000000,60.000000,16,10
plant,wheat,-636.000000,246.458801,201.000000,60.000000,123,10
plant,wheat,-592.000000,246.744476,250.000000,60.000000,198,10
plant,wheat,-506.000000,238.631531,107.000000,60.000000,306,10
plant,wheat,-570.000000,242.596466,149.000000,60.000000,207,10
plant,wheat,-635.000000,246.506775,208.000000,60.000000,179,10
plant,wheat,-486.000000,237.344208,151.000000,60.000000,87,10
plant,wheat,-542.000000,243.100128,158.000000,60.000000,87,10
plant,grass,416.000000,125.838898,-1484.000000,60.000000,229,50
plant,grass,175.000000,158.000214,-741.000000,60.000000,345,50
plant,grass,1035.000000,147.857529,-1006.000000,60.000000,340,50
plant,grass,412.000000,196.294571,593.000000,60.000000,101,50
plant,grass,-1019.000000,134.945877,879.000000,60.000000,232,50
plant,grass,357.000000,167.828506,-797.000000,60.000000,22,50
plant,grass,839.000000,116.464188,615.000000,60.000000,317,50
plant,grass,787.000000,111.967239,860.000000,60.000000,153,50
plant,grass,1083.000000,96.837204,-1467.000000,60.000000,107,50
plant,grass,446.000000,181.284882,-857.000000,60.000000,38,50
plant,grass,465.000000,60.892715,1260.000000,60.000000,187,50
plant,grass,-342.000000,152.281570,-987.000000,60.000000,39,50
plant,grass,1274.000000,87.497787,534.000000,60.000000,91,50
plant,grass,674.000000,164.734818,-1455.000000,60.000000,232,50
plant,grass,-693.000000,199.338104,857.000000,60.000000,231,50
plant,grass,-1364.000000,31.446583,549.000000,60.000000,62,50
plant,grass,203.000000,98.103928,1200.000000,60.000000,53,50
plant,grass,-42.000000,128.459488,-1027.000000,60.000000,74,50
plant,grass,791.000000,122.757065,639.000000,60.000000,73,50
plant,grass,187.000000,84.174698,1274.000000,60.000000,38,50
plant,grass,-923.000000,166.831985,407.000000,60.000000,160,50
plant,grass,226.000000,36.051476,1445.000000,60.000000,190,50
plant,grass,1268.000000,87.159416,-801.000000,60.000000,263,50
plant,grass,1230.000000,87.005249,524.000000,60.000000,49,50
plant,grass,1013.000000,96.379250,809.000000,60.000000,52,50
plant,grass,-510.000000,94.367332,1488.000000,60.000000,229,50
plant,grass,914.000000,80.999374,853.000000,60.000000,176,50
plant,grass,-1397.000000,174.129166,-211.000000,60.000000,29,50
plant,grass,805.000000,119.877411,654.000000,60.000000,115,50
plant,grass,-874.000000,197.816788,275.000000,60.000000,99,50
plant,tree_main,-1479.000000,174.484833,-408.000000,60.000000,228,50
plant,tree_main,633.000000,186.956635,-960.000000,60.000000,353,50
plant,tree_main,-310.000000,140.582123,-1341.000000,60.000000,251,50
plant,tree_main,1160.000000,90.834732,798.000000,60.000000,216,50
plant,tree_main,-1269.000000,197.374054,-832.000000,60.000000,92,50
plant,tree_main,-1017.000000,146.255890,804.000000,60.000000,138,50
plant,tree_main,-1387.000000,164.306900,-91.000000,60.000000,204,50
plant,tree_main,-993.000000,124.152588,-1323.000000,60.000000,247,50
plant,tree_main,-1106.000000,138.621170,-1293.000000,60.000000,56,50
plant,tree_main,1314.000000,78.239594,-632.000000,60.000000,12,50
plant,tree_main,1066.000000,135.816467,-293.000000,60.000000,208,50
plant,tree_main,1367.000000,54.677422,-912.000000,60.000000,135,50
plant,tree_main,-1005.000000,172.639832,-1235.000000,60.000000,309,50
plant,tree_main,702.000000,134.879501,688.000000,60.000000,252,50
plant,tree_main,-82.000000,130.438950,-999.000000,60.000000,2,50
plant,tree_main,-1033.000000,127.029892,983.000000,60.000000,166,50
plant,tree_main,-1032.000000,180.742889,171.000000,60.000000,312,50
plant,tree_main,1482.000000,66.796890,-585.000000,60.000000,151,50
plant,tree_main,-683.000000,148.164001,1132.000000,60.000000,70,50
plant,tree_main,-706.000000,141.268799,-1357.000000,60.000000,305,50
plant,tree_main,-911.000000,155.670273,738.000000,60.000000,284,50
plant,tree_main,1405.000000,43.952614,-1168.000000,60.000000,324,50
plant,tree_main,-1078.000000,117.070465,809.000000,60.000000,272,50
plant,tree_main,-1246.000000,198.296173,-1021.000000,60.000000,179,50
plant,tree_main,-1475.000000,143.677582,-107.000000,60.000000,150,50
plant,tree_main,637.000000,169.875702,212.000000,60.000000,76,50
plant,tree_main,-1227.000000,185.735641,-184.000000,60.000000,258,50
plant,tree_main,-1226.000000,78.761597,1067.000000,60.000000,103,50
plant,tree_main,-1243.000000,60.277618,875.000000,60.000000,166,50
plant,tree_main,-164.000000,136.084564,-1110.000000,60.000000,130,50
plant,tree_main,1299.000000,136.802643,-734.000000,60.000000,196,50
plant,tree_main,731.000000,189.099518,-1035.000000,60.000000,145,50
plant,tree_main,481.000000,154.355301,-978.000000,60.000000,212,50
plant,tree_main,1062.000000,195.668915,1017.000000,60.000000,35,50
plant,tree_main,1324.000000,99.844749,18.000000,60.000000,324,50
plant,tree_main,256.000000,150.188049,1007.000000,60.000000,177,50
plant,tree_main,-896.000000,137.311691,625.000000,60.000000,213,50
plant,tree_main,678.000000,177.483948,-1398.000000,60.000000,96,50
plant,tree_main,940.000000,74.045921,892.000000,60.000000,334,50
plant,tree_main,-1423.000000,60.020988,1147.000000,60.000000,148,50
plant,tree2_main,-23.000000,118.365219,-1411.000000,6.000000,172,50
plant,tree2_main,1046.000000,154.514832,-979.000000,6.000000,78,50
plant,tree2_main,-794.000000,149.252472,-1304.000000,6.000000,55,50
plant,tree2_main,-1378.000000,55.651398,1175.000000,6.000000,320,50
plant,tree2_main,1131.000000,123.894592,23.000000,6.000000,262,50
plant,tree2_main,-1292.000000,188.620575,-406.000000,6.000000,42,50
plant,tree2_main,284.000000,113.569290,-1111.000000,6.000000,280,50
plant,tree2_main,-210.000000,191.167908,1384.000000,6.000000,66,50
plant,tree2_main,1050.000000,195.668915,1149.000000,6.000000,75,50
plant,tree2_main,807.000000,151.827423,916.000000,6.000000,76,50
plant,tree2_main,215.000000,90.937317,1225.000000,6.000000,106,50
plant,tree2_main,783.000000,32.652779,1280.000000,6.000000,233,50
plant,tree2_main,1188.000000,112.513947,-212.000000,6.000000,343,50
plant,tree2_main,743.000000,99.674843,1059.000000,6.000000,89,50
plant,tree2_main,506.000000,177.051407,702.000000,6.000000,292,50
plant,tree2_main,-605.000000,133.576096,-1475.000000,6.000000,144,50
plant,tree2_main,83.000000,127.784607,-902.000000,6.000000,166,50
plant,tree2_main,1325.000000,62.565971,-944.000000,6.000000,109,50
plant,tree2_main,309.000000,172.829315,-712.000000,6.000000,112,50
plant,tree2_main,-1420.000000,88.031158,-1369.000000,6.000000,38,50
teleporter,church_in,church_inside,205,300,-205
teleporter,church_out,church_outside,20,8000,-50
teleporter,lighthouse_in,lighthouse_inside,-188 ,300,553
teleporter,lighthouse_out,lighthouse_outside,1000,8000,50
teleporter,mill_in,mill_inside,1280,270,1328
teleporter,mill_out,mill_outside,3000,8000,0
teleporter,house_in,house_inside,-479,300,-93
teleporter,house_out,house_outside,4000,8000,0
target,church_inside,0,8000,0
target,church_outside,205,300,-205
target,lighthouse_inside,1000,8000,0
target,lighthouse_outside,-188 ,300,553
target,mill_inside,3100,8100,0
target,mill_outside,1280,270,1328
target,house_inside,4100,8000,0
target,house_outside,-479,300,-93
statebutton,newbutton,render1,2,3180,8010,265,0,0
statebutton,newbutton2,light_rotator,2,3020,8010,265,0,0
' two functions
worldobject,lighthouse_light,5.0,5.0,1500,200,1600,0.0,0.0,0.0,light,null,1
rotator,light_rotator,light,0.0,0.1,0.0,0
render,render1,light,1,1,255|255|255|255,1,1
' Build a button to a teleporter
' button,newbutton3,church_in,2,0,320,0,0,1
statebutton,newbutton3,church_snd,2,-75,8010,-95,180,0
button,newbutton5,p2,1,-20,280,-110,-45,0
button,newbutton5,p1,1,4300,8020,180,180,0
button,newbutton4,once,1,993,8010,-100,180,0
3dsound,once,grind,100,400,993,8000,-120,0,0
wincondition,harvest,1,1
wincondition,harvest,2,1
wincondition,harvest,3,1
missionmenu,Teufelskap,Herzliches Willkommen auf der Insel,In diesem Trainings Szenario,müssen Sie:, 1 Fische fangen, 2 Bäume fällen, 3 Weizen ernten,Viel Erfolg!
finalmenu,Mission Erfolgreich!,War doch nicht schwer?,Spielen Sie weiter,oder gehen Sie ins Menu zurück.
particle,p1,smoke,-296,500,-52,1,0,0,1
particle,p2,explosion,-70,300,150,8,1,0,1
particle,p2,explosion,800,300,-800,8,1,0,1
3dsound,,waves1,50,400,-200,0,2200,1,1
3dsound,,birds,100,400,1130,120,-150,1,1
3dsound,,birds,100,400,-835,256,892,1,1
3dsound,,wind,100,800,-1800,130,-1250,1,1
3dsound,,wind,100,800,-1230,160,-1869,1,1
3dsound,,wind,100,800,-320,149,-1870,1,1
3dsound,,wind,100,800,-5900,160,-1900,1,1
3dsound,church_snd,church,100,1200,377,240,-377,0,1
3dsound,p2,fountain,100,200,-70,240,150,1,1
3dsound,p2,fountain,100,200,800,240,-800,1,1
This readable map code was inspired by the obj file format.
There are several entities in this game now:
[terrain] - a heightmap terrain
[model] - a static world object
[transmodel] - a transparent static world object
[shadermodel] - a model with a detail shader on it
[plant] - a tree, wheat or grass
[teleporter] - use it to beam yourself to another point of the map
[target] - a target for teleporters
[button] - a simple button
[statebutton] - a button with an on/off display
[worldobject] - a triggerable transparent model
[rotator] - can rotate a triggerable model
[render] - can change the color/alpha and visibility of a worldobject
[particle] - a 3d particle
[3dsound] - a 3d sound somewhere in the map
[wincondition] - winning condition
[missionmenu] - mission text and so on
[finalmenu] - final briefing text
Edit:
[multimanager] - can trigger up to 5 entities (can also trigger itself)
[delay] - can trigger a target with a delay
[triggerstart] - triggers the target at the beginning of a roundonce
The main menu is working now
Each entity can be triggered by another one.
It is possible to build a button, which triggers a rotator,
which triggers a model so the consequence would be a button to turn the rotation of a worldobject on or off.
Each entity should be placed in the editor, so there are many of options to build a map
Iam going to build an ingame level editor. It should be fun for the players to build own maps.