Infinite Adventure (Under development)
Infinite Adventure (Under development)
Mod information
=================
Mod name: Infinite Adventure
Author: starwindz
Current version: 0.1
Description: Random Level Generation Mod inspired by Spelunky
Download link: https://drive.google.com/file/d/0Bw07W8 ... sp=sharing
Version history of Infinite Adventure
=====================================
Below you find a list with the added features, changes and fixes for each version.
Version 0.1 (2017.04.09)
-----------------------------
- Initial release of prototype
* End of document
=================
Mod name: Infinite Adventure
Author: starwindz
Current version: 0.1
Description: Random Level Generation Mod inspired by Spelunky
Download link: https://drive.google.com/file/d/0Bw07W8 ... sp=sharing
Version history of Infinite Adventure
=====================================
Below you find a list with the added features, changes and fixes for each version.
Version 0.1 (2017.04.09)
-----------------------------
- Initial release of prototype
* End of document
Re: Infinite Adventure (Under development)
I see you included the source. (written in Lazarus)
-
- Calif
- Posts: 553
- Joined: August 27th, 2011, 2:04 am
Re: Infinite Adventure (Under development)
Really interesting, but a usage guide will be cool, how to change mod?, or how to create new complete level?
Re: Infinite Adventure (Under development)
Yes, I have included the source code written in Lazarus/Freepascal. The source code of the development will be fully opened for improvement of this mod.David wrote:I see you included the source. (written in Lazarus)
Re: Infinite Adventure (Under development)
Yes, a usage guide will be included to next or final version.salvadorc17 wrote:a usage guide will be cool
Generated levels.dat is saved to 'pop1' folder. You can change it using Roomshaker or Apoplexy.salvadorc17 wrote:how to change mod?
Current version is at primitive stage. Generating complete level is not yet supported.salvadorc17 wrote:how to create new complete level?
Re: Infinite Adventure (Under development)
Currently I am making the room layout generator such as attached screenshots. The original source code is written by doppelganger, so I am converting his GameMaker code to Lazarus/Freepascal code. See his article, viewtopic.php?f=73&t=3383#p18727 Thank you, doppelganger.
Code: Select all
*** This code is written by doppelganger ***
// creates the level structure
for(i = 1; i <= 47; i+=1)
{
for(j = 1; j <= 47; j+=1)
{
roomAt[i,j] = 0;
}
}
for(i = 1; i <= 24; i+=1) // init rooms
{
room_entrance_tile[i] = 0;
room_entrance_dir[i] = TILE;
room_exit_tile[i] = 0;
room_exit_dir[i] = TILE;
room_is_junct[i] = false;
room_junct_tile[1,i] = 0;
room_junct_dir[1,i] = TILE;
room_junct_tile[2,i] = 0;
room_junct_dir[2,i] = TILE;
room_for[i] = NONE;
for(j = 1; j <= 30; j+=1)
{
tileAt[i,j] = "E00";
}
room_x[i] = 0;
room_y[i] = 0;
has_guard[i] = false;
guard_at[i] = 0;
guard_skill[i] = 0;
guard_palette[i] = 0;
}
for(i = 0; i <= 255; i+=1) // init events
{
event_room[i] = 0;
event_tile[i] = 0;
event_trigger_next[i] = false;
}
currRoom = 1;
startRoom = 1;
endRoom = 0;
backToJunct = false;
roomsLeft = 24;
roomPrev = 0;
roomJunct = 0;
isJunction = false;
nextToUse = 2;
currRoom = 1
px = 24;
py = 24;
tpx = 24;
tpy = 24;
jpx = -1;
jpy = -1;
roomAt[24,24] = 1;
room_for[1] = PATH;
for(roomsLeft = 24; roomsLeft > 0; roomsLeft -= 0)
{
if(!(roomAt[px,py] == startRoom))
{
if(roomAt[px,py] == 0)
{
get_room_entrance();
room_for[currRoom] = PATH;
}
}
roomsLeft -= 1;
room_x[currRoom] = px;
room_y[currRoom] = py;
if((!(isJunction)) && ((rand(1,8) == 8) || ((roomsLeft == 2) && (rand(1,2) == 1))) && (!(room_is_junct[currRoom] == dual)) && (roomsLeft > 1) && (get_two_paths()))
{
if(room_is_junct[currRoom] == single)
{
room_is_junct[currRoom] = dual;
}
else
{
room_is_junct[currRoom] = single;
}
roomJunct = currRoom;
jpx = px;
jpy = py;
isJunction = true;
room_for[currRoom] = JUNCT;
choose_junct_dir();
if(triedall)
{
break;
}
}
else if((isJunction) && (((rand(1,3) == 1)) || (roomsLeft == 0)))
{
room_exit_dir[currRoom] = room_entrance_dir[currRoom];
room_for[currRoom] = SWITCH;
px = jpx;
py = jpy;
isJunction = false;
nextToUse = currRoom + 1;
currRoom = roomJunct;
roomsLeft += 1;
continue;
}
else
{
choose_exit_dir();
if(triedall)
{
if(isJunction)
{
room_exit_dir[currRoom] = room_entrance_dir[currRoom];
room_for[currRoom] = SWITCH;
px = jpx;
py = jpy;
isJunction = false;
nextToUse = currRoom + 1;
currRoom = roomJunct;
roomsLeft += 1;
continue;
}
else
{
break;
}
}
}
currRoom = nextToUse;
nextToUse += 1;
}
if(triedall)
{
endRoom = currRoom;
}
else
{
endRoom = currRoom - 1;
}
if(room_for[endRoom] == SWITCH)
{
endRoom = roomJunct;
}
px = 1;
py = 1;
for(i = 1; i <= 47; i+=1)
{
for(j = 1; j <= 47; j+=1)
{
if(roomAt[j,i] > 0)
{
if(j > 1)
{
room_to_left[roomAt[j,i]] = roomAt[j-1,i];
}
if(j < 47)
{
room_to_right[roomAt[j,i]] = roomAt[j+1,i];
}
if(i > 1)
{
room_to_top[roomAt[j,i]] = roomAt[j,i-1];
}
if(i < 47)
{
room_to_bottom[roomAt[j,i]] = roomAt[j,i+1];
}
}
}
}
- Attachments
-
- pop1_algh.txt
- (7.24 KiB) Downloaded 58 times
-
- sample_01.png (4.71 KiB) Viewed 3144 times
-
- sample_02.png (6.33 KiB) Viewed 3144 times
-
- sample_03.png (3.82 KiB) Viewed 3144 times
-
- sample_04.png (5.67 KiB) Viewed 3144 times
-
- Calif
- Posts: 553
- Joined: August 27th, 2011, 2:04 am
Re: Infinite Adventure (Under development)
Cool and weird, but will be better to see those in game, the "Juction" names what does mean?
Check my Prince in C# https://github.com/salvadorc17/Prince-Monogame
Re: Infinite Adventure (Under development)
"Junction room" has branched path such as the attached screenshots.salvadorc17 wrote:Cool and weird, but will be better to see those in game, the "Juction" names what does mean?
- Attachments
-
- new_sample_01.png (9.26 KiB) Viewed 3122 times
-
- new_sample_02.png (9.19 KiB) Viewed 3122 times
-
- Calif
- Posts: 553
- Joined: August 27th, 2011, 2:04 am
Re: Infinite Adventure (Under development)
Ok i get it so, the rooms are self made before level is random assined, about drawing algoriths you said, you should try to ask David, his the one that does know all snes level editing stuff.starwindz wrote: "Junction room" has branched path such as the attached screenshots.
Re: Infinite Adventure (Under development)
New development screenshots. Random room layout code is now completed. (Currently not playable)
Re: Infinite Adventure (Under development)
A screenshot of development environment. I am using Lazarus/Freepascal for making this program and mod. Development of random level generation is not easy so any idea and comment are welcome.
Re: Infinite Adventure (Under development)
Very simple randomly generated levels are shown as the attached screenshot. Still very early stage of development...
-
- Calif
- Posts: 553
- Joined: August 27th, 2011, 2:04 am
Re: Infinite Adventure (Under development)
Why to use roomshaker as default for building levels?, any cross compatibility related? Would be better standarize it for apoplexy..
Re: Infinite Adventure (Under development)
I think starwindz is just showing some examples of what generated levels look like.salvadorc17 wrote:Why to use roomshaker as default for building levels?, any cross compatibility related? Would be better standarize it for apoplexy..
The levels can be opened with any PoP1 for DOS level editor.
And RoomShaker has a better level preview, with more than just room numbers.
Re: Infinite Adventure (Under development)
That is what I intend. I use both of them. Apoplexy is the most advanced level editor and roomshaker has a simple and nice preview feature.Norbert wrote:I think starwindz is just showing some examples of what generated levels look like.salvadorc17 wrote:Why to use roomshaker as default for building levels?, any cross compatibility related? Would be better standarize it for apoplexy..
The levels can be opened with any PoP1 for DOS level editor.
And RoomShaker has a better level preview, with more than just room numbers.