Re: Infinite Adventure (Under development)
Posted: April 25th, 2017, 2:23 pm
New screenshots of development. Level generation is still very simple and basic.
Prince of Persia community forum
https://forum.princed.org/
Could you share this development versions, really want to try myself..starwindz wrote:New screenshots of development. Level generation is still very simple and basic.
Okay. After fixing some bugs, I would upload the development version within this weekend.salvadorc17 wrote:Could you share this development versions, really want to try myself..starwindz wrote:New screenshots of development. Level generation is still very simple and basic.
Code: Select all
[template info]
enter_and_exit_dir = left-right
enter_and_exit_num = 0-0
one_way_passage = false
[basic tile layout]
line_ = 0123456789
line_0 = 0 __________
line_1 = 1 ##########
line_2 = 2 ##########
[test]
position = 0, 0
[script]
var
r, c, p, start : byte;
gap : byte;
fake_floor_middle, fake_floor_top : byte;
spike_bottom, spike_top : byte;
guard_top : byte;
door_top : byte;
begin
////*** jump making ***///
// select gap: 0 to 4
gap := RandomInt(0, 4);
//gap := 2;
start := RandomInt(1, 4);
//start := 1;
fake_floor_top := RandomInt(0, 1);
//fake_floor_top := 1;
fake_floor_middle := RandomInt(0, 1);
//fake_floor_middle := 1;
spike_bottom := RandomInt(0, 1);
//spike_bottom := 1;
spike_top := RandomInt(0, 1);
//spike_top := 1;
guard_top := RandomInt(0, 1);
//guard_top := 1;
door_top := RandomInt(0, 1);
//door_top := 1;
for c := start to start + gap - 1 do begin
if fake_floor_top = 1 then begin
SetTile(0, c, '~');
end
else begin
SetTile(0, c, '.');
end;
if fake_floor_middle = 1 then begin
SetTile(1, c, '~');
end
else begin
SetTile(1, c, '.');
end;
if spike_bottom = 1 then begin
SetTile(2, c, '+');
end
else begin
SetTile(2, c, '_');
end;
end;
if spike_top = 1 then begin
if RandomInt(0, 1) = 0 then begin
SetTile(0, start + gap, '+');
end
else begin
SetTile(0, start + gap + 1, '+');
end;
end;
////*** guard making ***///
if guard_top = 1 then begin
if (start + gap + 4 <= 9) then begin
SetTile(0, start + gap + 4, '&');
end;
if RandomInt(0, 1) = 1 then begin
if (start + gap + 4 <= 8) then begin
SetTile(0, start + gap + 5, '.');
SetTile(1, start + gap + 5, '.');
SetTile(2, start + gap + 5, '+');
end;
end;
end;
////*** door making ***///
if door_top = 1 then begin
SetTile(0, start - 1, 'A');
SetTile(0, start + gap, '1');
SetTile(0, start + gap + 1, 'A');
end;
(*
for c := 0 to 9 do begin
if GetTile(0, c) = '_' then begin
SetTile(0, c, 'h');
end;
end;
*)
end.
I really thank you so much for your great work.doppelganger wrote:Oh man, I never thought anyone would even bother looking at what I did.
Thanks, starwindz!
I think that the algorithm of solution path with gates would be quite a complicated. Maybe you can get some idea from following post. It contains some research documents which have academic theory.doppelganger wrote:I am currently thinking on how to implement gates. When I wrote the algorithm, I thought of placing gates in the main path, and its switch in the branching rooms. But the switch shouldn't be placed too far away (making the level impossible), or too close (making that section of the level easy) to the gate. Any ideas?
Thats weird but cool idea for mod, but still you need to add more documentation about how to use this program...starwindz wrote:I have decided to make a sub-mod called 'Infinite Adventure - Descent'. This mod has levels which have 'up-to-down' rooms only. My intention for this mod developement is mainly to test and improve the script engine for room tile generation. The status will be uploaded within several weeks.