PDA

View Full Version : Hi all plus YEARS later I have almost got a roguelike finished



foxfire29
10-30-2012, 04:24 PM
Hi all,

I always have stuff in life to do but I seem to always drift back to Adom and its forums. Just saying hi yet again and also that FINALLY I have got to grips with the A* algorithm and I am going to use it to do random dungeon generation.

My current roguelike has some monsters implemented, every monster has all the player abilities. I also have a basic spell system immplemented where you actually see the spell firing and the spell can bounce of walls, believe it or not this feature is what I loved about Adom.
2 final tasks are random dumgeon generation and LOS

For random dungeon generation I plan the following :
the
>while (count < say500)
while(acurrentmaderoom)
{
> using A* pick a random start and end point within the confines
}
>draw a patheoint of the path make a room with door at newendpoint
make new door on opposite side of room and use that as new start path point
create a path to new path endpoint
create a room
rinse/repeat for a set amount of times

Just so happy since I cracked a*nd I have also done breadth first search before so I am doing great nwith my new RL. I am no developer great by any stretch of the imagination but i am starting to love coding as since i started seeing results

Anyways HI all and if anyone has any better ideas than I have or advice fire way!

As it stands i have masde so much progress with my coding i havent been sleeping well so I am spending a night on adom :)

prime
10-30-2012, 06:02 PM
Congrats!

but if you're picking random endpoints, why are you using A* search? perhaps you mean you're using A* for the pathfinding?

foxfire29
10-30-2012, 07:10 PM
Congrats!

but if you're picking random endpoints, why are you using A* search? perhaps you mean you're using A* for the pathfinding?

Thank you :D and yes you are correct, basically ive been thinking about a good way to make self contained room dungeons and I was thinking choose 2 points, put a door on the second point IF theres space for a room; if there is space burst a door into the opposite side of where the door was created, create a new door the choose to points again.

tbh i should have taken the advice to create other gamess first before a roguelike but heck it covers all the concepts :)

(finally in the position where I can finish a game of my own, even if that means ditching LOS which I dont intend to do :)

prime
10-30-2012, 07:25 PM
Interesting... I guess you'll have a lot of diagonal hallways? What do you do if you don't have space on the opposite side of the room?

foxfire29
10-31-2012, 11:57 AM
Interesting... I guess you'll have a lot of diagonal hallways? What do you do if you don't have space on the opposite side of the room?
Hiya and you are bang on my logic on the this forum post is very sort of hodge podge :), it doesnt deal with what happens if no space at opposite side of the room. Also my A star only caters for 4 directions N,E,S and W which seems sensible in terms of path generation at least for me atm as im developing on my laptop but i have got an enum that has numbers in for diagonals when i decide to add them and will costthose at 14e on

foxfire29
10-31-2012, 03:35 PM
Btw Prime thanks showing interest in a constructive way and not mistaking what I said as a flexing of ones Epeen :), heck I still have TONS to learn but the enthusiasm is because its so cool to be able to make my own crude worlds and ai(Ive not got a latent god complex honest lol)

Additionally a few folk on these forums sent me PMs with other examples as well as there own ai algorithms so its good to have actually got there in the end with it all. Tbh i should have listened to those books that said start making many other games before a roguelike but ahh well at least I can finish something now .

prime
11-02-2012, 04:35 PM
I'm always glad to see that roguelikes are under active development! I'm thinking of making one myself, sometime.

ilsekko
11-02-2012, 05:04 PM
you should check Grey's page, he developed several rouguelike with a great atmosphere..glad to see he's not the only one, foxfire, best wishes for yer work!

foxfire29
11-03-2012, 09:48 PM
you should check Grey's page, he developed several rouguelike with a great atmosphere..glad to see he's not the only one, foxfire, best wishes for yer work!

Cheers to you both :)

Also I believe I used Grey's site tons in the past for Adom guides but I forgot he was developing RLs so I will go and check that out now, ty!

Tbh I made loads of progress with my roguelike all at once after hitting a brick wall for about 3 weeks but Im over that now and going to try getting a basic random dungeon generator working from tommorow until however long it takes :)

Yeah prime , even if you fail, each time you attempt it you will learn something knew, if theres any sort of advice I would give its probably to keep regular versions of your code because when you get to path finding and ai there may be times where you want to revert back somewhat and rewrite a section(If u dont keep versions it means you can end up having uneccesary rewrites) Also have a goal in mind so when starting out it would be say game UI (This is actually alot more involved than what I thought it would be but im not using any externally written ui libs, just my own for the sake of understanding)

Anyways gl, I am getting loads out of the experience and whilst I have coded small Apps for a good few years now, I am by no means a guru RL developer :)