10.10.2016, 21:50
Falls es wen interessiert, wie man sowas macht: Die Karte
Das Skript (total quick&dirty, mein Perl ist etwas eingerostet)
und das WadC-Skript
Simpel. Aber bei mir kommt schon ein wenig Schick-Feeling auf. Mit ein paar passenden Texturen und etwas Feinschliff...
Code:
'''''''''''''''''''''''''~''''''
~'''.H'''~~~'''''''''''''~~'''''
~''H.+''~~~~~'''''''''''''~~''''
~''H.H'~~~~~~~'''''''''H.HH~''''
~''H.HH~~~~~~~~'''''''HH.HH~''''
~''H.H.~~~~HHHHHHH.H'H....H~~'''
~H.H.H.H~HHH.......HHH.HH.H'~~''
~'...........H.HHH.HHH.HH.HHH~H'
~'.H.H.H~HHH.H.H'H.HHH.........+
~H.H.H........HHH......HH.HHH~H'
~'.H.HHH~.........HHH...H.H'H~''
~H.H.HH~~...HHHHHHHHH.....HHH~''
~'.H.H~~~H.HHHHHH.....HH+....~~'
~'.HH~~~HH.H......HHH.H~~~HHH'~'
~'H'~~+....H.HHHH~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Das Skript (total quick&dirty, mein Perl ist etwas eingerostet)
Code:
@thorwal = <STDIN>;
for($x=0; $x<16; $x++) {
@zeile = split(//,$thorwal[$x]);
for($y=0;$y<32;$y++) {
if(ord($zeile[$y])==ord('.')) {
print("strasse(", 15-$x,",",$y,")\n");
}elsif(ord($zeile[$y])==ord('~')){
print("wasser(", 15-$x,",",$y,")\n");
}elsif(ord($zeile[$y])==ord('\'')){
print("wiese(", 15-$x,",",$y,")\n");
}
}
}
und das WadC-Skript
Code:
#"standard.h"
#"monsters.h"
#"pickups.h"
#"control.h"
#"water.h"
strasse(x,y) {
pushpop(
movestep(mul(x,256),mul(y,256))
box(0,128,160,256,256))
}
wiese(x,y) {
pushpop(
floor("GRASS1")
movestep(mul(x,256),mul(y,256))
box(0,128,160,256,256))
}
wasser(x,y) {
pushpop(
movestep(mul(x,256),mul(y,256))
water(box(-32,128,160,256,256),-32,128)
)
}
main {
controlinit
movestep(0,64)
waterinit_fwater(-16)
pushpop(movestep(add(32,mul(5,256)),mul(16,256)) thing)
ceil("F_SKY1")
-- hier kommt die Ausgabe von Perl hin
}
Simpel. Aber bei mir kommt schon ein wenig Schick-Feeling auf. Mit ein paar passenden Texturen und etwas Feinschliff...