Play Spelunky in a GIANT randomly generated labyrinth (maze) of caverns. (64-256-512 rooms per level instead of 16)

There is a full save game system and some additions for balence such as 8 maximum life to start and 10 bombs/ 12 rope. Also, mushrooms (by picking up and pressing up + attack) give you +1 life (up to your max). Plus many other things...

The Size?The default size is 24 by 24 rooms for the total space the maze can occupy and 256 rooms that create the maze. That size, on my computer, takes ~ 20 seconds :( but to play the whole level takes ~ 15min to 1 hour ;) depending on my luck. The lag is reduced, dramaticaly, by constantly saving anything not near the player to the hard drive and loading from the hard drive things near the player. This takes alot of strain from the ram and is hardly noticible. Without this it would be imposible to have such large levels. It is theoreticaly posible to make infinantly large levels. ;) I'll post smaller and larger sized levels for your preferance and computer speed, but it's not hard to edit this to your own liking if you have GM. I will add option to change this in game soon.

LIMITATIONSBeside the long load times, you are currently restricted to an infinite dose of the first 'world'. Also, the balence is to very dificult right now. I hope to have some help adjusting that in the future. This should be considered an ALPHA demonstration of the engine additions and not a fully game, yet. New worlds will be re-added as soon as I'm able to sucsessfully write the new way of linking the worlds. (that was actualy a big reason why the was soo long coming, REALLY strange bugs with door linking)

Like it? HELP!I'd love to have a hand with making more for this game! If anyone feels like helping, or adding your own mods to mine, please write here. I am willing to teach anyone how to program if they are willing to add abit to my game. You can work on anything you want to or, if you prefer, what I feel needs the most attention and is within your skill level. In exchange, I'll teach you how to add the things you want to add. And, of coarse, you'll get full credits in the intro and ending scenes. :-*

FUTUREI'd love to see many mods that are allready made incorperated into my mod. The ones that imedatly jump out to me are the XP mod, the mushroom/potion mods, the new Mage mod, ANY new monster/item/weapon mods (shields, swords, even small changes to enemys..) I haven't had time to incorperate them myself...

The lag is reduced, dramaticaly, by constantly saving and loading from the hard drive and not from ram.

Let's see, low grade DDR2-RAM clocked in at 200 MHZ, peaks out at about 6400 mb/s. WD VelociRaptor WD4500HLHX (pretty high end hard disk), peaks out at about 120mb/s. Avoiding constant saving and loading from the hard drive also keeps increases it's longevity! I really hope you typed the opposite of what you meant!

Bad performance decisions aside, I think it would be fun to see more random room patterns that are on a grander scale like you've thought about. There's all these cool mods for Spelunky adding enemies and items, but as far as I can tell there are none that do much about adding to the structure of levels.

The way vanilla does it is to load the whole level into ram memory. That made levels bigger than 4X lag like mad. Thats why I did the load/save stuff. It's similar to how games like Oblivion deal with huge worlds.. But on a smaller scale obviously.

Was the game playable or smooth on your computer? You could try the old Spelunky Explorer if you wanna see what 4X levels are like, in your ram. I'm no pro programmer but I think I made a real good choise for how I set that up. Levels are now 16X the origonal size and still very playable.

-Cavemen die in one hit-Once I wanted to buy a shotgun, but the shoppy wanted 50000.-If you bomb into what appears to be a huge area of solid rock with no gold, a ton of gold appears through it.-Once you finish the first level(I did it once by dumb luck), you get an empty room.-There seems to be less treasure outside of the walls and more treasure in the walls than normal.

-the 'solid rock' rooms are there to reduce lag.. there was no getting around it without adding some smoke and mirrors.. I might make it better eventualy.

-level end bug is now fixed... SO SORRY for your luck wasted!!(btw.. you can backup your save game by backing up files in your 'explorer' folder. You could do that before you finish levels to make sure the level loads ok)

-there is alot of treasure 'in' the walls. Makes bombs more worth it. And in LOS mod.. specs..

-yes, I do love big snake pits!! :)

-There are now ALOT less monkeys. sorry again.

-MUSHROOMS can be used by pressing up and attack while holding it.

THANKS for the bug reports and questions!

Please keep in mind that this is a alpha 'demo' of the engine and not ment to be a 'full' game... But do tell me about bugs and anoyances and I'll try to fix it up asap. Thanks again...

Oh, and if you have compliments, please don't hold back! I can use all the encouragement I can get to help me stick with programming this REALLY hard to program mod. Hours spent so far... uncountable.

HEY KEG! you still come by here eh? ;DThanks for props! I've been real stoked on working this lately.I found out today that it runs pretty slow in LOS on old computers.. and kinda slow no my laptop. I hope to improve the formula soon.

Patrick: yeah the dificulty is too much still for the length of game I hope for.. I donno how best to solve that. any ideas? More mushrooms I guess... Inventory would really help. The compass is supose to be really hard to get but it lasts the whole game. It's broken in current release tho. I can fix it np I think. SPOILERS ALERT!! in small text:

maps can be found in bags. Pretty rarely tho.. Pause (escape) to view it.

So I still need to do alot of balencing. And, yes, big spiders are bad. ;)

I'm torn about this mod. The problem is: I like the idea very much. Great levels = very good. But this mod gets me so frustrated that it's starting to get annoying. It used to be worse with all the monkeys hidden in chest, but still, I've got quite a bit of issues with this otherwise epic mod.

- after some sort of improper closing of spelunky, I get this message if I want to start again. Spelunky will close afterwards, so now I cannot play, probably untill I download the file again.___________________________________________ERROR inaction number 1of Create Eventfor object oLevel:

File is not opened for reading.

- I also get an error while esc-f10 quitting in the main room.- what's up with the near invincible vampire? The full weight of a spelunky does nothing, yet the impact of a single thrown (not exploding) bomb knocks him out?- chest standing in front of spikes are really annoying (same square is filled with both chest and spikes). - the stairs seem underdeveloped as you cannot fully climb them.- playing for 45 minutes without getting the impression of making any progress is a bit annoying sometimes.- are gnomes actually of any use? I hardly feel compelled to carry around that little guy all the time, just in the hopes of finding an exit, and probably healing 1 health.- Refilling traps are evil. Especially if they fired at a monster before, which makes timing them really hard.

On the other end, I do like the falling blocks when detonating a bomb. That really caught me by surprise the first time. And big levels are simply amazing. I really love them, and I really love some of your future ideas as well. The mod struck a few insipre-snares in me as well, so here's a few suggestions:

- an ice level in which every detonation of a bomb has the same effect as the howl from a yeti king. The passages should be a bit less clogged though, as falling ice is a substantial risk.- an entire level underwater. Some homing fish should become fish that just swim sideways? bombs should not work/work like rushing water level?- Chest + key makes lasting compass, ordinary compass is usable for only one level?

more to come soon, I'll download the mod again and play it some more for a bit of inspiration.

A small note: playing spelunky in a smaller box greatly reduces the lag. It does suck a bit looking at spelunky in x1 though...

F

edit: crap, net even the new .exe can get it to work... sorry, no inspiration just yet...

I tried it, and to be honest I can't stand it. There's noticeable jarring interruptions whenever you move between the separately loaded cells in the game.

If you properly buffered several cells around the player and had each cell's file data being read in a separate thread that doesn't pause the main process, there wouldn't be near as much interruption from hard drive seeking (not all of us are using solid state drives yet!).

Hard drives will never be able to match the speed of RAM though, so if you really wanted this thing to run decently, there are third party dlls you can use for allocating memory/writing the level information to memory if you don't want to deal with GameMaker object management.

If you want to, I can give you a dll and give you an example on how to write the way your currently handling level data directly to the memory. Actually, you wouldn't even really need a cell buffer if you do use RAM because loading cells will be near instantaneous.

Point being, writing to the hard drive instead of using the bajigillion times faster RAM is a terrible decision. Games like Oblivion have to read from files instead of loading everything into the RAM because of how large the data for the whole world's data is, and being so much more complex there are large amounts of data they already have to always have stored in the RAM. They could have everything loaded into the RAM ahead of time, considering that now days mid-range desktops ship with 6 gigs of RAM, but then not everyone would be able to run it. Your stored level data on the hard drive, only 186kb (though it is quite a bit larger stored on a hard disk because of file cluster sizes). Plus, their engines are built on an lower level then GameMaker, and thus they can optimize the way they load data more; Additionally large areas around the player are always buffered to make movement smooth.

TOC: Thank you for the more specific information!! I'm really a novice programmer and this has been my most difficult project to date. I know very little about how computers alocate information... and I don't really know how to buffer in a different 'thread' but I'm very stoked to learn how now.

I think I get the idea... (have a process that is constantly loading / unloading while you play instead of only doing it all at once when a player moves into a new 'area') is that close??

I would be willing to drop everything right now and try to learn this, as well as trying the third party dll idea.

Will you please try and help me learn this? ::) An example of the dll would help alot. An expanded explanation of buffering with GM would help too. I'd owe you a BIG favor for your help... and big credits in the game if you like. :)

I will start reading on these topics online right now! Thanks again!

EDIT: I haven't read up yet as I'm not sure where to start and yoyo's forum isn't working... But, I just thought of an idea to maybe try:

I could load oRooms (or some new equivilate) around the player, or for the whole level, and then have a step event in each oRoom that loads the saved cells, only one object at a time. I still need to figure out the best way to keep the file data in ram.. maybe I'm overthinking and keeping them in an array/grid of strings form would be fine. Whatcha think? I go try.

Pteri and Funky: AH! I'm soo absentminded sometimes... To fix your error problem, delete all the files from the folder "explorer" in your spelunky folder. This is a dumb error that has buged me for a long time. so long I forgot to mention it. ;P

I have an idea how to fix it and I'll post an update asap. There is also an occational error of the level not loading or player apears in a wall! :S :-[ I think I may have fixed that last night (finaly!) but it will take time to know for sure.

As for all the frustrating difficultys... everything needs alot of tweaking and has been very time consuming. But I will try to work out everything mentioned. I apreaciate your input and patients!! And I will prioritize fixes on how anoying things are.. :)

-First step is to reduce lag though TOC's ideas and improve LOS lag

-Then make levels easier to find the end by.. ?? making more loops/ways to the finish... more work on room shapes to improve chance of 'stairs'... MUCH greater chance of SPOILER ALERT: Maps found in jars and crates and chests and shops I'll add that in next release, maybe today!

-Vampire could def use some work.. For now, bombs or arrows are the way to go. Any ideas to make him still REALLY hard but more options for attack? I think a shotgun would help alot... havn't tried it yet. Remeber that a machete can hit a knocked out person!

-SPOILER ALERT: Gnomes are actualy my GF's more masculine girl.. ;p if you get her to the end you get 1 extra life AND +1 to MAX life. again, could use much work

I like the temporary compass idea! But I'm not sure how to explain it's loss, unlike the *ap's. ?? And I have never seen a yeti king howl! :( Maybe I'll add a golden compass soon and make the regular one 'break' after level change. Having it in a big chest is a good idea.

THANKS for the window size tip! My buddy needs that to get it working on his laptop with LOS on... untill I get TOC's tips working.

Sorry about tempting you with all these things then making you wait, but I'm going to be really busy for the next couple of days. I'll get back to you as soon as I can! (And actually, I like the premise of this mod so much that I'll try to take your current source and integrate new loading/saving area functions myself, so that you only have to add code for any new objects or what not you start using later.)

If GameMaker was designed better you wouldn't have to go through all these extra steps, but the thing that causes lag if you loaded everything at once and then deactivated the instances like Spelunky does, is that GM was coded stupid and still uses a lot of processing power for each deactivated instance (I could probably pull better methods for generically disabling instance out of my ass, starting with making it to where the deactivate instance function doesn't iterate through already deactivated instances)!. The only way to get around that would be to code your functions for saving deactivated instances to the RAM yourself and then only load them when you need them, so that they won't use any additional processing power at all.Edit:If you want to try another possible method while I'm gone though, try to see if you can figure out how to use http://gmc.yoyogames.com/index.php?showtopic=390517 to load 2 (probably the best number, since it won't cause much a of speed issues and yet the player shouldn't be able to make it into an unloaded cell) cells in each direction around the player while the game is played.

I've so completely had it with this fantastic mod. Sounds odd, but is sums up my feelings nicely.

I've just died after playing level 1 fruitlessly for 45 minutes. I even managed to get the key and the chest together. I must have seen 50+ of both ropes and boms. And in the end I die from a stupid glitch already found in the original spelunky: grapping an edge with a slidable boulder on top of it, which somehow results in getting under the boulder. >:(This glitch certainly isn't your fault. But after having played the mod for at least three hours, and only reaching the 2nd level twice, I'm now a very frustrated man. My god, this mod is hard. Not only is it hard, but the lack of a sense of progression is horrible.

However, I did got some suggestions for changes. - make (1-time use) compasses more available. It gives you a goal to strive to, which greatly reduces the sense of lack of progression. I've noticed that I actually do not really think a compass is all that great, for it only gives you a really broad idea of the location. Getting there is still quite hard. But having a goal makes it so much more manageable. - the map is amazing. it took some time to figure out where I actually was, but I think that's a good thing. Make these slighly less rare.- the refilling arrow traps got to go. Going in the wrong direction is bad enough. Having to cross those traps while having to make a hard jump and facing a potential fall for some 30 blocks is... ugh.- The invincible vampire is pretty nasty as well. I suggest giving it something like 20 health instead, and making it's KO time a bit shorter. The cape is amazing though, and is a huge gain (as a re climbing gloves and bouncy shoes, they make life quite a bit better).- I get the impression the exit is usually quite high up. As gravity is quite hard to defy, I think it would make this mod quite a bit more playable if you'd place the exit a good bit lower than the start.- ropes seem to be more important than bombs. Perhaps a starting inventory of 8 bombs and 12 ropes would be better?- kissing a gnome is really cheap. A tiny bit too cheap if you ask me.- every maze needs its minotaur(s)...- the 2nd level bat is pretty nasty. I hope it doesn't get any worse in level 3...-on the topic of level 3: I couldn't face three area 1 type levels in a row. These long things could certainly use some diversity. Even just adding some different coloured blocks might help.- Yeti king at 2:10 (http://www.youtube.com/watch?v=pvCTY43bRtc)(oh, one more thing: is the gift from the chest+key special in any way?)

I thought I had loads more to add, but I seem to have forgotten. I'll just let the rage drop a bit :D. perhaps I'll give it a spin again tomorrow.

TOC: Nice! I'd be soo thankful for some help in this regard. I looked a bit at the link you posted and I still don't really understand threading... I look around for a simpler explanation.

I tried simply changing my code to save the data string 'clusters' into a ds_grid array stored in ram (i assumed). It seemed to run faster at first but after < 5 min of play the fps drop from 40 slowly, over time, down to < 10 :( Perhaps there is a memory leak or something?

One piece of evidence that may give you a hint about what is wrong is that:

When I made the code that saves the level and only loads around the player, it ran 'ok' but quite slow/chunky on older computers. I found that if I restarted the game and loaded the level again, the speed was DRASTICALLY improved. I didn't really understand this but as a quick cheep solution, I just made the game restart itself after every new level creation and immediately skip into the level (ie, skips the intro, ect..)

I'll try adding this cheep fix back into the version that saves to ram and see if it helps... but the ram version boggs over time and the HD version bogged at the beginning, so I don't know if it will help.

Anyway... I'll be sure to post the most recent code asap for you to look at. Maybe I'll try and do some cleaning up as well as my coding can get very messy :L

Thanks again for helping!!

Funky: Wow. 3 hours straight of exploring!! That is hardcore. I'm glad you like..ish the mod that much! I defiantly can use play testers with your addictive personality!

The lack of progression is indeed that game killer for any new folks interested in trying the game. Up to this point I have really focused all my time on creating the engine, so I think this is why the game have very little substance. (esp compared to vanilla)

I will be happy to make the changes that you suggested a I feel that having more people playing my mod will encourage me to keep developing. Not to mention increasing the chance of attracting people to 'join my team' or at least lend a hand.

eventually I hope to see more interesting encounters, but I'd kinda like to have the engine real solid before I start adding more complex 'fun' things. :SI donno, maybe not.

SPOILERS TIME:-bat get to be level 3, but no more... that was really a quickly added thing and it needs working on.

-start and finish are completely random right now. and there is a rare chance that the passage to the end will be blocked by one of two bricks... needs fixing :(

-right now key + chest gives you one random 'good' item (such as jump boots, climb gloves, shotgun, jetpack, 12bombs...) not all that great.. :/ I'll make it give a disposable compass or map AND one item perhaps.

-as for no 'world' (level type) changes.. I really want to make it so you randomly encounter special doors to new 'worlds'. This is high on my priority but... adding a whole new 'world' back into the game, I think, will be alot of work. ie, re-add the new enemies, new traps, all new room shapes ( >90 shapes in world 1), and figuring out trees... :( If you like making room shapes, and are willing to help? I'll add that ALOT sooner. ;P Maybe < a week. I can of coarse teach you how. It's easy.

I really like the LOS. You know how most games that use LOS you can still see a dim view of areas that you've already discovered but aren't currently lit? That would be nice too, especially for helping know where you've been already.

Otherwise I haven't played it much because the room design seems so random and it sort of annoys me. I'll download the source and see if i can help in some way, maybe with room templates.

As for adding variety or other 'worlds' you could maybe have 'pockets' of other worlds in the cave (a series of 2-4 connected rooms for example). Say you are exploring the caves and suddenly you come across a temple with an altar and some cultists, or an underground lush lake, or have there be a chance that the bottom of the level is lava (i'm drawing inspiration from Dwarf Fortess here..).

Hay Moloch! I had that complaint from someone else already.. personaly, I really like the organic curves of the caves and would like to keep that for the most part. I'm not very fawnd of the straight/boxy templates of the origonal. But, of coarse I'd be very happy if you'd like to add new templates of any style, that you can use in your own version and I will likely find an aproprate place for in my own. Perhaps some levels use diferent templates... would be good for adding variety.

Do you know how to make room templaits already?

I have thought of the 'pocket' worlds idea and think it would be keen! That would make alot of magic added to simple exploring. I think a combination of doors to other worlds and pockets would be the best. and, like DF, lava that bubbles up to underground caverns would be the best I thinks! Yup, DF is king.

- I found a gnome for sale outside of shop. I didn't note until I picked him up, and a shopkeeper shouted from out of nowhere that I was a thief.- usefull item from chest can become something you already have :( perhaps a mechanic like sacrificing might work.- a dropped gnome disappeared into thin air. no slidable blocks or anything. edit: see below.- i found a scroll sticking partially out of ground, yet it was not pick-upable. is that ok?- 2 health bats are too strong. without a ranged weapon they are a near auto-lose 1 health, as you fall through them on the 2nd air jump, and you can't whip em quick enough. perhaps just make them 1 health and quicker? or make them 2 health but slower? edit: After more testing, I found they just need some getting used to. They are manageable. Just hard. Always carry around throwable stuff. Always.- rescuing 2 gnomes work, though there's only one gnome kissing you in the passage shot (yuck...)- my start is regularly blocked. not much of a problem, but it looks a bit... unpolished...

speedrun! 6 minutes! woot!

I still havn't managed to get past lvl 2 though. I was doing quite good, 42 bombs, 23 ropes, cape and climbing gloves. I used a bomb to kill a vampire on the other side of a block, but then a block fell upon me from outside the screen in mid air.

I suddenly got an idea for a great upgrade: a helmet. It moves you one space sidewarsd if a block ould fall on your head. If the space is not available, you still die. god, I'd love to have one of those. The times I got killed by those stupid blocks...

F

edit: I think I found another bug, which is related to the gnomes diappearing and the scroll stuck in the ground. The following is in the same category:(http://www.members.multimania.nl/undeadonion/cavemanground.bmp)(http://www.members.multimania.nl/undeadonion/blockground.bmp)I've found this on several things, such as crates and mushrooms. Apparently things tend to enter the ground when falling inappropriatly or from large distances. I also think this causes gnomes to die without leaving a body.

Oh, and I hated being in a darkness level :(. No lamps, no golden bugs, just a box of flares to deperatly hold on to. gah. Still, I managed to hold out for a good 45 minutes. Untill I met a vampire. Vampires are ugly.

Speaking of flares, that was in idea that I got while playing: infinite flares, possibly without giving any light. Alternatively, you could use tiny-diamond-sized stones or something to represent an out of the ordinary rock picked up from the caves. As long as there's something to mark places you've been.

YEAH! I think you play the game more than I do!! I've only been to level 3 maybe 4 times. AND... I've NEVER had a dark level. I thought I took those out! WOW! 45Min in the dark! that's core.

I'd REALLY love to have 'dynamic' lighting if I can ever get the game to run fast enf. That would be lights that cast shadows, using the LOS code. (better LOS code obviously)

I'll fix the big chest as you said. + add map/compass as always in it.

I also noticed the stuck in ground error... I'm not sure how to fix it. I only ever load 2 rooms away from the player ('s view window) and objects 'deactivate' 1.5 rooms away. ?? I hope that TOC's help may sort some of that.

The $ above items *near* shops has been a bug for a really long time! I've tried REALLY hard to fix it and am still clueless. :( Sometimes leaving more than 3-5 rooms away and coming back can fix it, but not all the time.

I like the helmet idea. I think I'd make it look really dorky to balance it out! ;) Like a big orange lightning bolt on the side.

Do you like the look of the caverns? Do you think they would benefit from a less random appearance?

Maybe a temporary fix could be a button that will restart and regenerate the level.Just untill I figure out for sure that this won't happen again. ??

I've only seen that afew times in the last 6 months... But, I think I fixed it in the most recent build. I believe it had to do with the maze creation code finishing but not making an end door. I'm not positive tho.

I've been procrastinating on releasing the new stuff because I wanted to fix up the LOS to be better running (for a friend of mine with a slow computer) but... You definatly deserve an update to play with. I'll do my best to make the changes you wanted and post before I go to bed tonight. Maybe alot sooner.

Also, would you like a version with ALOT less rooms, so you can test the end door/level change code? Say 32-64 rooms instead of 256? or somthing like this.I'll even give you a map and compass for level 1 from the start.

Name it and you got it buddy! If you have anything else you'd like, write it!

:D that's sweet! I'll be away for a couple of days though, so you can take it easy. Smaller maps probably won't be necessary, though a map or compass would be good. I like to play the whole package though :). Anyways, thanks for all the effort! See you in a few days.

TOC: I tried switching over to Ram but failed my first try.. As I said, I think I've a memory leak or somthing. So, I reverted back to the old version. I'll try it again soon. If you want my atempt for any reason, just write. But I'm sure you'll do better to write your own.

Yeah, sorry about not being very active with this so far! I don't have anything planned for tomorrow so I'll sit down and multithread'n buffer the current level system and start working on a method for handling it completely in memory.

I got a prototype threaded code version of it working smoothly for 20 seconds or so before it crashed in so horrible a fashion that the Dr. Watson debugger was attached to the Dr. Watson debugger that was debugging the game.

just returned today amd figured I'd play this mod some more before going to bed. Some small things I've found:

- the new room just seems to have a ladder leading up to two signs and two lanterns. there's nothing after that. Is my version wrong?- Resurrecting gnomes, which stand up again and say 'no' if they leave the screen, but which do not pass though the exit, nor have a star above their head when dropped.- Dead shopkeeper drops new gun and money. Could possibly be exploited. - Shopkeepers are too easy to kill without fear of being hurt at that time. Simply get a movable block in the shop and shove it towards the shopkeeper untill you crush him. Free stuff and shotgun. This should probably be changed, as it hardly leaves any incentive to actually buy stuff (shopkeepers are easily dealth with in later levels, as the amount of bombs one can aquire are more than adequate).- I got as far as lvl 6, but darn, do those levels get crowded by then... I don't suppose you'll intend to keep going like this till lvl 6 though...- dark bats, especially the 3+ health kind, are seriously hard to spot in x1 format, I occasionally walk straight through them or wonder what is hurting me at the time while getting attacked by a bat. Perhaps keeping brighter eyes would help?

-the girl/gnome and the shoppy problem are the same. that is it doesn't save 'dead' it just save 'hp'.. fix is easy but abit time consuming. Might as well do it while i wait for TOC's fixs..

-have you tried bombing up from under a shoppy? it's fun. any idea's how to make shoppys harder? maybe he gets pissed if you push a block in his store? and maybe he'll dodge falling blocks...

-yeah, the game ain't really designed for people to play beyond level 2/3.. I havn't beaten level 3 and so I havn't messed with anything there yet. I hope to have inventory and expereance systems in place before balencing levels after 3 or so..

-the color to go with level are set by image_blend(red,green,blue) , so I don't have a sprite to actualy change. I'll take a look at this.

Well, I've successfully multithreaded the level loading script, but I'm going to have to either completely change the way it's currently called (likely), or have a thread constantly running that calls the level loading threads and terminates them as needed in order to keep things in sync without pausing the main game thread.

You're currently loading two chunks of the level around the chunk of the level the player is in right now, correct?

The code that loads/saves rooms/chunks at the beginning of the level, therby setting up 2 chunks left right above and below, is in the oLevel create event. Not to mention those on diagonal... :S so that would be 25 chunks in total open at any one time.. :'(

The code that loads/saves chunks as you move about (based on view port, not player) is found in oLevel step event.

Id be happy to lay out everywhere that code is used for load/save stuff, if you think it could help. ??

else, feel free to ask anything else. I may be out for an hour or so this evening but i'll be back shortly thereafter.

hey funky. I missed the 'new room' bit. Yeah, if you attack the lamps they change from green to red.That changes the size of the level and the Line of sight amount. I will be putting text onscreen to explain all this... :-[

I haven't forgotten about this! I'm still working on it, multithreaded programs are about 999X harder to code then singlethreaded programs.

I actually have a buggy prototype that works somewhat, (as long as if you click ignore and such on any error messages, and don't get a fatal error message right away), in which the game is paused while the level is loaded, though since I haven't buffered it yet you can actually watch the chunk of the level load. I'll post it up here in a minute if you want it.

Seriously though, this is going to take a while, so go ahead and keep added and doing whatever you want to this mod! Once I get the code finalized I'll grab the latest source code and implement it inside it.

I'd give you a link to the prototype right now, but I'm having issues with my ISP at the moment. Seems some idiot blocked of access to external ftp servers, so I'm going to have to yell at someone tomorrow before I can upload it.

>:( >:( They better quit that crap before I move to wherever Google announces their internet providing experiments are going to take place. >:( >:(

Hey, try this out! It's far from finished, but it gives an example of what it will be like once done. Saving and loading is broken right now, so make sure you delete the explorer folder each time before you start it.

YEah... Bloody good job! It runs on my laptop with LOS on and 256 room levels with ZERO slow down. And thats with my REALLY bad Line of Sight code. Big props!

I will try and visite my buddy and see how it runs on his computer. He get ~5fps with LOS on and maybe 15 without (with the code I made). His will be the test.

Did you end up writing all new code for keeping/loading variables for objects? I'm just guessing cuz of the error to do with enemy.level and trap.fired....

I'm even more interested in seeing the code than the results. For me, programming IS the game. I can wait till your 'more done' or complete... but, I'm pretty excited to see under the hood. :) The game is allready SOO much better!

I will try playing for along time on a 512 size level and I'll tell you how it runs after it's been running awhile. I'll also write you about how it runs on my friends slow computer.

oook. I kind spoke too soon in my previous post. :'( But the point is that it's working! Just needs a bit of tweaking, yes?

So, strange thing really... First time I booted it up, it was like I said in the last post, ran AMAZING! Butt... next time, after about 3-4 rooms over, the lag came.

I'm not sure if it was when you trigger the load/save chunk or something else... but it would slow down to a complete crawl, like 1fps, and stay that way for ~15-20 seconds. and if you wait, it goes right back to 30 fps. I would guess that you've already seen this and that is no news to you. I just write it in case it runs NP on yours.

I tried restarting the computer and optimizing by shutting down all background processes. Of coarse, I tried without LOS. And I tried in all level sizes. It's seems so strange to me that it ran so good the first time.. any idea why?

In my spare time, if I'm not trying again on LOS, I'll try save/load chunk to RAM again, so we can compare how the threaded version runs with the unthreaded RAM.

BTW... does threading only help with multi-core processors?

Anyway.. don't get discouraged!! Lots of 'FUN' still to be had I'm sure. ;)

That prototype isn't actually threaded. :P I still have the work I did on threading it, but I had a "duuuhhhhhhhh why aren't we doing that?" moment. Since the rooms are loaded into a single string from a file, I did some script rewriting and made all of the rooms be loaded to an array of strings, then saving/loading chunks being done directly on the appropriate string in the array, skipping anything that needs doing to the harddrive.

So basically, handling everything in memory without going to the effort of low level allocation of memory address and reading/writing, by using the variable management that GM already provides. And hopefully, nearly as fast once all the bugs are ironed out.

And for the theory behind threading it, multi-core processors would get a larger boost because then both the game and the loading thread would be running at a time. But! A single core will alternate between the two threads, so the player can continue playing with no FPS drop and without having to wait a second for the loading event to finish.Little text diagram:

I really need to take out giving the map at the start... Then atleast you may have walked the wrong way right from start. ;P I like that there is a chance the exit may be right next to the start.. but I want level two to basicly require that you spend time in level one in order to survive it.

Good damb... trying to optimize LOS is driving me MAD!!! Looking at the rougelike methods is so interesting but boy do I get lost real quick on it. I think I'll post a thread asking for help on this and explaining how my code works and why it's not the best.... ::)

Some odd things I found a while ago, but got around uploading just now:

unbreakable wall:(http://members.multimania.nl/undeadonion/unbreakable.bmp)No matter how I tried, the wall on the left could not be destroyed by bombs. I had to put one at the bottom of the unbreakable blocks to get them to drop down, allowing me to bomb the lower tiles. Did cost my six or seven bombs though.

Nearby exit:(http://members.multimania.nl/undeadonion/shouldbeavoided.bmp)It seems just a bit too close. (needles to say I didn't make it though. There was an angry shopkeeper doing its job just a bit too good.)

Something that make me laugh:(http://members.multimania.nl/undeadonion/noes.bmp)

I hope this mod is still being worked upon, I still love it in any case.