Author Topic: Thanks all + Roguelike dev journey+AI hassles overcome!  (Read 6249 times)

Conal

  • Newcomer
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Thanks all + Roguelike dev journey+AI hassles overcome!
« on: November 15, 2010, 02:39:26 AM »
I hope I have posted this in the correct place, it rather semi development+ feedback related. It is a long post so if that puts anyone off better stop reading now. (Since I want to share this success since it has been so long in comming and its not for the lack of good advice, I just didnt get AI for a while it seems)

Essentially I have used this site on an off for some time. I learned what I have done pertaining to roguelike development in the C language, I wanted proper understanding so I'm not one for using premade librarys until I had sucessfully coded a proof of concept for each part of the roguelike. I learned in a modular fashoin and the best I ever had was:
1: a UI
2: a basic turn based system
3: a dungeon map(had a rough as hell procedurally generated one but Im taking advice for once and going static maps so I can get my first rl finished this time)
4: a character class for implementing levels later
5: character movement
6: NPC placement (NO AI)

I did lots and lots and even more lots of reading on A* + breadth first search and other things, I would always end up with some broken form of a search, I spent months! People on this forum gave me lots of help but I still couldnt put it all together in a neat way that worked. Anyway so I leave it for ages thinking its beyond me, and for some mad reason I took a differant approach I spent 2 days drawing p pseudo code but the clincher was I had 2 people to follow my pseudo code logic to the letter and if it failed I would add in the relevant conditional code.

Suffice to say having studied in various educational establishments sometimes I find they want documentation for things before you even get your hands dirty to learn the exact basics of your enviroment, documentation is essential but I sometimes find its abstraction and documentation for documentations sake to the point of detracting from the real problem area. In short I have a healthy dose of cynisism but doing the pseudo code and also involving other people to follow it has had a remarkable positive effect(1 was a ccoder, one was not) In the end when I came to do the code I was seeing strange behaviour at each development stage of my ai except this time I understood with some precision why it was behaving as such and how to fix it!


Something thats stopped me going further for months I come back after a long break, read no more books/no google and just follow my pseudo code and wham I have really cool search AI, I even catered for the situation where the player doesnt get found from the monster and the ai searches eventually every damn square! The way it briefly works is with a visited array and if it gets caught down a 1 wide alley or similiar where all squares are vistited it backtracks until it finds unvisited squares and trys another route . It seems that I just needed to have alot more patience than anticipated but Im so happy to get this done and hopefully this will help someone motivation wise who is feeling a bit down hearted trying to get the ai working, also now that I finally have something stable Its helped me understand why I was failing and some of the caveats that were catching me out. The AI was the missing link now I know I can make a full but basic roguelike and I am so pleased.


Thanks for the patience throughout the last year or maybe more? Its so good as I finally feel I have gotten to the point in my game where it has a bit of life/fun to it and Im in shock how teaming up with someone to follow your pseudo code to the letter can make such a differance.

MY AI is the most basic of the basic , I know this but am very happy with it all the same but I have a healthy respect for AI programmers! Its so tough and theres so many variations/more complicated ways of doing things but for anyone considering their first roguelike AI well from one newbie to another get all the stages of the ai in your head and coded in such a way that you completely comprehend each stage and how it pertaings to your screen array . I understood most of the basic c language structure etc but Iin hindsite I realise my understanding of 2d arrays 1d arrays and pointers maybe wasnt as good as I thought it was so in short understand everything you are using, assume nothing, make sure your conditionally stuff its not vague and cleanly pertains to a certain stage of the AI process.


Ive got a new enthusiasm for development of this genre again, things I need to do is sort the screen flicker, I know this is because I clear the screen which is bad and I need to utilise some windows.h functions/api calls however its been a long while so I willl google that again but tbh I dont know whether to sort the screen flicker out later when I break my record for getting further in development than I ever have.


Thanks a bunch to the community who has stayed patient with mee and keep working on it to the fellow newbies :)


Happy times my little AI 'M' sign is Alive lol



« Last Edit: November 15, 2010, 02:41:58 AM by Conal »

getter77

  • Protector of the Temple
  • Global Moderator
  • Rogueliker
  • *****
  • Posts: 4957
  • Karma: +4/-1
    • View Profile
Re: Thanks all + Roguelike dev journey+AI hassles overcome!
« Reply #1 on: December 02, 2010, 01:13:15 PM »
Congrats on making progress on extending your grasp to match your reach---always nice to see people becoming more potent and solid fodder for inspiration.

Rather sure it was somebody else that gave any AI advice though, as technical topics along those lines are still very much beyond me.   :D
Brian Emre Jeffears
Aspiring Designer/Programmer/Composer
In Training

guest509

  • Guest
Re: Thanks all + Roguelike dev journey+AI hassles overcome!
« Reply #2 on: December 05, 2010, 11:30:27 AM »
  Yay. /dance

Conal

  • Newcomer
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Thanks all + Roguelike dev journey+AI hassles overcome!
« Reply #3 on: December 18, 2010, 08:41:03 PM »
Thanks guys also Getter apologies  if I misnamed who gave me the AI help, its in one of my older posts but didnt want to post there owing to the thread being very old.

I know I am getting well pleased with what some of the veteran coders will no doubt class as the basics but as of late I have managed to complete a 2d graphics game (not a rougelike) My point is that I had that ow so mentioned issue for a long time where I would never finish my applications/games! So I had to admit I needed to brain bash many fundementals again . (I did this for a long time actually and then finally after many failures have had lots of little breakthroughs)

I am confident I can get something like a roguelike completed now but I cant really start until summer owing to RL work and study. If I get through my studying faster than anticipated I may be able to get coding during the christmas period.

Since I have proof of concepted all the parts of a roguelike the temptation is to think up some really cool concept but I had better be careful with that lest feature creep reappears, thats killed a few of my previous projects. I do feel I need to keep things as simple as possible whilst making my game fun, also considering how many roguelikes are out there and that many are quality I think its going to be tough for me to make something that feels original and/or very fun. I need not complain though my motivation is extremely high atm (Hence the appreciation of Slashies exhert/quote that he put in one of the posts pertaining to how roguelike developers work :)  )


Until I get free time again though I am just comming up with ideas and thinking about structure for any future programs(I must be getting old :P ) I am also regularly lurking these forums for incentive and to see if theres any new concepts in new RLs in the RL scene. (This forum, the bay 12 forums and a minority more are the only forums I put much stock in these days as they , for the most part seem to be a better , and have an older crowd(No offence intended about the old part :D )


Offtopic I know but I also liked one of the articles here pertaining to program planning , especially when it says that good planning is based somewhat one ones ability to immplement, that is so true. I am doing much more planning these days but the times when I have done it when learning the language it has always fell to pieces. (Anyway thanks again all, Im just lurking the dev forums for some inspiration and maybe can help someone sometime who ends up in the same position I was!



<<<<<<Does somemore of the yay dance :)
« Last Edit: December 18, 2010, 08:45:13 PM by Conal »