Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Conal

Pages: [1] 2
1
Classic Roguelikes / Re: Dear Mr. Biskup
« on: December 22, 2010, 08:03:48 PM »
Quote
What makes you think he is working on JADE? Let's deal with it, his game development hobby is now over. He's working in real job and has a real girlfriend (not just jpeg ones like we have).

lol krice one day you should really speak your mind :D

Although theres truth in what you say , it is nice to think he is still working on Jade but the realist in me says its well on the back burner.

I liked ADOM alot but it seems to get grindy as hell about mid to late game which is always what stops me playing, I am tempted to start a new game but around about the time you get the portal open its a total grind for gear and I never seem to manage it

2
Programming / Re: Thanks all + Roguelike dev journey+AI hassles overcome!
« 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 :)

3
Other Announcements / Re: Acquiring feedback for your roguelike project
« on: December 10, 2010, 09:17:57 PM »
Nice post bear, if Im being honest I do see there being danger with regards to the initial concept becoming boring, owing to the fact that it lacks the other diverse features in other roguelikes.

The above said, I would hope that if such a game were made that it would encompass things such as leveling, fighting(with cops etc) , (Maybe even some unique form of questing?)

It is hard to know how good such a game is in the game playing sense, until some good coders have brought such a theme to fruition. I guess the reason this fake theme got so much interest is reminiscent of the fact theres many older gamers out there looking for something differant/unique that is going to hold their interest for longer than 2 hours to 1 week .


The following applys not so much to the roguelike crowd but more so to gamers at large:

- Many of them want a game which has a pull to it and they upon stopping a play session cant wait to play again and are wandering what has to happen next!

In my view one of the main reasons ADOM did so well is it was one of an extreme minority which had the feel of being in a properly done bustling world where quests you partake in could effect that world. (Granted that was not the only reason and that differant people may well not see it this way)

4
Other Announcements / Re: Acquiring feedback for your roguelike project
« on: December 02, 2010, 03:37:25 AM »
Quote
Both guesses wrong. DF and Elona are popular, because they have a lot of gameplay content. In other words they are "large scale", something that -most- new roguelike projects are not. Games like ADOM are not original, but ADOM has its fans, because the size of the game. Sometimes original ideas are ok, but as we can see from some 7DRLs (that have a somewhat original idea) the idea itself is not really that important if there is not much to play.

While its a completely common ressponse to say our comments pertaining to such things are very subjective, I do understand the points you make.

With regards to taking the genre to new heights I still do think I am correct in that Elona achieves this via quite massive scope in terms or quests and world, and this certainly has an appeal, also Elona , in my eyes anyway does well in the graphics department whilst still maintaining the fact its a roguelike. (If it doesnt take the game to new heights I would hope thats because such games have already been done to such a standard and beyond; if this were the case please enlighten me  ;) )

Thanks for the link Getter, my enthusiasm for this concept stems from the fact it has the potential to bring people into the roguelike community, I have  been trying to get my group of Uni friends to play for over 2 years then we find out about this and instead of me trying to brainwash them into playing they mention to myself about trying one! While I can see both sides of the coin regarding how people could love or loathe this fake concept it is actually bringing new people into the roguelike community(Slight deviation getter but I believe you may have helped me with ai code in the past or given me advice, I didnt get it but I have nailed it now and I am just about complete with regards to makng a space invaders game in j2me, for a while there I thought I had got to a point where I would not be able to improve my coding so very pleased the obssesiveness has paid off! - see other post about that if you havent spotted it already)

Large scale does play a part in Elona I agree but while that be a valid point I personally think Elona does break the mold a touch since roguelikes generally dont have storys , LOTS of quests and graphics as well as custom save systems, genetic engineering and what I see as very original game subsystems. Dont get me wrong Im not saying its some perfect game but its clear to see the affort thats went into it and players who get this impression are going to more willingly invest time, additionally scope as a sole quality is actually many times a negative since people just see it as a grind fest. I think the roguelikes must feel alive so to speak for them to not be more than a flash in the pan. (I really hope someone can point me in he direction of  some really nice roguelikes which are original and better than Elona if Im seen as incorrect by most; this is fine btw, just saying :) )

Perhaps I should have stated that some of Elonas subsystems were original and been a bit clearer in my initial attempt to share my views on the said games.

Im kinda in shock this is back on topic though, thank you all and Slash, I will go re-read the rules, cheers :)

Just to finalise and be on topic, I shall just mention the fact that what I state about friends doesnt even cover the other aspect of how many new projects that concept is going to generate/IS generating! Now it is still possible to look at the negative side that many people undertaking such a project wont have the ability to follow it through but on the positive side , so many people and/or teams working on such a project, as time passes must surely yield some new games in the future which pertain to this concept?

5
Other Announcements / Re: Acquiring feedback for your roguelike project
« on: December 01, 2010, 02:36:34 AM »
Hmm nice community perspective here, I get blatently trolled for posting in an active post, you guys see it as okay to go blatently offtopic, point is no matter the semnatics you put on it I dont care what you think so please refrain from posting your offtopic trash Fenrir, nice post degradation, I'm sure thats satisified you.(Best real help to the community is if you dont like a topic or dont agree with it, go and speak to an Admin in private or just don't answer it, not adhering to this just makes you come across bad and that is putting it politely, I can't believe whats happened to this topic, is it jealousy perhaps that a mere concept is netting a massive amount of interest?)

If the Admin wants to lock the thread feel free but I respectively ask you to only answer me with on topic stuff Fenrir as I am not intersted in whether you think I'm beating a dead horse; I can see you are a pretentious twat as well, owing to the fact you start clarifying what "beating a dead horse means"

Start picking up spelling mistakes next and you fit the profile of a real asshole.

I will treat the final posts with the contempt they deserve since its clearly a case of the "me to!" mentality If you don't follow the point of that go use google.

Your post counts dont impress me either but I can see this community is going the same way as many on the web. I come here for some light discussion and to speak about, as well as participate in Development. I really detest what you represent Fenrir, you are the typical example of what is in essence the catalyst for communities going bad long term, however I am sure it will be myself who gets the most hassle for this since for most, respect is governed by post count. I believe respect is earned not demanded. (Silly troll, go pester someone else who cares, high five if you or one of your alt accounts doesnt answer this though!)

Thats all your getting though, I have just wasted 5 mins or so of my life reading this trash! Enjoy yourself in your herd, safe in the knowledge that you managed to drop a community member in the crap who could not be done with the trviality of your comments, also be proud that you have derailed a post and you and your buddys can wallow in group stupidity now until the Admin has to lock this thread. (In future maybe let an Admin deal with forum affairs you jobsworth - only you dont work here do you? Else that description would fit well)

6
Other Announcements / Re: Acquiring feedback for your roguelike project
« on: November 28, 2010, 05:22:10 AM »
With respect, it may seem that way to you but I am short on time at the momment and hence this has relevance because I am only on these forums once in a while, my point being that they are new topics to me even if they are not to yourself.

If its an old thread and no use it should be locked, I have never believed it's my job to date check threads which are sitting with massive views and at the top of the forum listing. (The old admin/user whining about a necro thread or somesuch but really its a crazy mentality since its not rocket science to have a script that locks posts that are a certain age , this would mean one less triviality on the forums at large)

I am crazy for justifying answering a post on a forum anyway but never the less owing to being busy both myself and one of my friends only found out about that serial killer rouguelike but a week ago and we both really like the concept, albeit a fake.


7
Programming / Re: Rdc's wikibook "Let's Build a Roguelike"
« on: November 28, 2010, 03:31:51 AM »
Its in free basic and Im well on my way doing my one in C but I have to say the guy thats done those tutorials has also produced a damn nice looking roguelike.

I wish more people would have step by step guides of that quality for say C , I appreciate they are time consuming as hell but, anyway thats one hell of a good tutorial and roguelike by the looks of it. I fired up the roguelike expecting it to look like something just in it's infancy and it actually looks quality whats been done, great job!

8
Other Announcements / Re: Acquiring feedback for your roguelike project
« on: November 28, 2010, 03:17:26 AM »
I think the prime reason that serial killer roguelike got so much interest is :

1: Awesome video
2: Video at least seems very original
3: Original/Awesome concept -
[
The awesomeness is perhaps compounded with all the too small roguelikes or clone roguelikes and because of various forum feedback which portrays a message of total reluctance to anyone who trys to break the mold of the traditional RL model - then theres the other extremes where a Developer will make lots of over the top changes that break to much with tradition and drag the game down. It seems like a balancing act and so much gets compared to traditional roguelike rules BUT the serial killer roguelike concept broke all these rules and luckily got away with it, unfortunately I would not be surprised , if for ever 200 rogues 1 roguelike gets away with that.

I can understand what may be slight disillusionment of the developers who are dealing with the reality of implementation and who see this as another concept thats probably not going to see the light of day but on the bright side I have a friend who I have been trying to get into roguelikes for 2 years now and this serial killer roguelike has made him go and try some.
]

I have to admit, lately I have implemented proof of concept for various, roguelike tough implementation areas that I have decided to have a go at coding a somewhat similiar theme but on a much smaller scale for my own use. (I would not release a game until I am confident my code is refined/clean enough but perhaps thats the wrong attitude) I shall be attempting this in the Summer as busy as hell at University but I did take note of the link which is so a bunch of people can collaborate.

If anything I would say the best thing people can take from it is to do development based on an enjoyable concept and if something has been cloned over 3 times before then think hard before you go hoping to release it to the public in the hope of making it a big roguelike. I dont dislike doom the rl as an example but its by far not the best in my eyes however people love it , why do you think that is? (I think what I have written covers that questions as well!)

Marketting may be essential in a commercial project but where roguelikes are concerned the majority are mainly hardcore/geeky people(Thats a compliment in my book for the record, I class myself as one, maybe both of those) who are always on the net looking for games, new projects, reading whenever it is possible and they will be looking first and foremost for a good concept before they waste their time looking through rogue clone 55b , all the more modern succesful games such as :

Elona
Dwarf Fortress

Are orginal in some ways OR they take the genre to new heights.


Food for thought I hope :), Also apologies if this post is not written well , the main reason being that when you right a couple of paragraphs on this forum the scroll system screws up.

Finally, Slash! I like that motivation points post, lol I may put it on my wall to give me motivation while coding haha


9
Programming / 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




10
Programming / Are any of you familiar with certain rl sources?
« on: June 17, 2010, 01:32:45 AM »
HI again guys I am getting somewhere with my project all be it progress has slowed owing to pathfinding.

Anyway I got further because I cut out certain datastructures and opted for something that would help me understand.

However its not perfect and I am looking for source code to aid my learning which immplements a BFS for ai, I am preferably looking for a respectable rl but not one thats so well done its overly fancy using trees etc, or if it does use trees it only uses them in conjunction with nodes that are formed via a struct pointer.

Im looking for code that is as basic as possible, no added extras to the bfs but at the same time node creation and use is done in a simple manner, I like using basic arrays for an open and closed list or even a vector in c++ , I know there are lots of examples but I have yet to find one in the context of a full rl


I am not hopeful of getting my hands on really readable stuff pertaining to how I have done my rl map i.e in a 2d map array and then bfs with just 2 search arrays but I figured I would fire it out there :)

Thanks

11
Programming / Re: need help with theory for nodes and adjacency lists
« on: June 16, 2010, 05:06:58 PM »
I have replied instead of edited so that people who are considering bfs can see some of the stupid mistakes I made along the way.

Anyway pretty much every piece of advice given in this thread played a part in helping me to get something like bfs working

In essence I know have a testcase where by the ai finds its way to the player, the only situation which is not catered for is if the ai mob ends up in a dead end and evey node around it is visited, at least I think that ones not covered, I know how to rectify though I believe which I will do tommrow

I ditched the binary tree and the guy who debated OO with me can have a laugh to himself because I ended up after all this taking his advice and used 2 vectors, an openlist vector of points(nodes) and a closed list(I will be adding functionality to this so that the algoithm wont ever get stuck)

anyway the vector meant I didnt hav to worry so much about memory management and I am really happy with the progress made all be it my solution is no where near as cool as a TREE


I was making the mistake of trying to have it so the ai had eveything like flood fill mapped.


Really pleased and I got some good help of the RGRD chat room but aparently I am a sneak professional, thats no biggie, its bull but no problem its just Im guessing I may get banned if people are implying I am some how sneaking their code, I learned to declare a vector via the chat room if that constitutes a professional I think I better come out off education! Yes my code is really leet aand Im a secret microsoft employee ROFL

Anyway thanks those of you who utilise some common on a daily basis and who have helped.

12
Off-topic (Locked) / Re: Happy Birthday, Slashie!
« on: June 11, 2010, 12:57:59 AM »
Happy Birthday Slashie.

13
Programming / Re: need help with theory for nodes and adjacency lists
« on: June 10, 2010, 01:17:40 AM »
Hey :)

Last post is really really useful reply! Some of what you say that I am confusing a node with a tree(Then again maybe I was lol, I just figured each tree element was a node or a pointer to a list of nodes, the tree is what I am most new at but I am getting there - narray codee has really helped since I believe I can do the tree at least on arbitary data, fitting it into neighbours + the seach is the final hurdle I am tustling with though as my neigbours code atm is having problems) is perhaps a bit of but this is bang on:

Quote
- a node in the search space (where the BFS is at a particular time) is not a node on the map (a cell).

I was gradually comming toward this realization and was incorrectly mixing display of the screen with order of search. I totally agree with what you said though and the code provided is exactly what I was looking for.

I think I am close, i honestly believe its just down to a few silly things and I can have this completed.

.......

I just started doing this the last 2 days and I am at the stage where I fall over after a couple of iterations of checking neighbours, I debugged and it looks like a pointer is pointing to gabage at some point so going to fix tommrow

Quote
Just image you already have magically implemented all your data structures, but are missing the procedures/functions to make your pathfinding work.
Write your BFS algorithm using these magic data structures. Then write the data structures.


I am determined to do this so rather than sticking to one project I am making like multiple mini test case type pojects as I google and get forum and book info and uit is helping

Feels like so near but yet so far :)

Huge thanks all!

edit..................

I have done some work today based on the replies. Anyway I know that this is not corect but it does at least run in essence whats happening is I have 1 tree root node whicj connects to a linked list

so node at 0,0 is root (Btw Im just trying to create a map of cells plus neighbours at this time not bfs and I am making some mistakes

anyway fom root it has 4 children : , East, south, north and west

so Tree node root points to list elements , East, north, south and west nodes , each list node points to their espective child nodes so I have one root and a massive list

I want 1 root, a list of 4 child nodes and then another tree node which points to its child nodes, in short I am unsure if I have done this correctly although I think all data is now stored, anyway I submit the full coding, if anyone feels like verifying it works or is wrong in a certain way then copy and paste the below code into a visual studio console c++ project in your main file and you can witeness it running

btw I must stress I am not at the stage I am doing bfs , I realised its the neighbours and whole adjency of the map setup I am botching so I took it back a level and I know once I see a working example of this part I can do the rest, th is part is where all botch ups have eminated from anyway heres the code :)

I wouldnt usually do this but I have read like hell and I cannot find source code that shows how to setup the map then lists how I am trying to do so

Code: [Select]
#define MWIDTH 9
#define MHEIGHT 9

// a tree
struct Tree_t
{
// root of the tree, null if tree is empty.
struct TreeNode_t *m_Root;
};

struct ListOfTreeNode_t
{
// entry into the list, null if list is empty.
struct ListElement_t* m_FirstElement;
};
typedef struct NodeData_t
{
int x;
int y;
char str;

}cell;
// a tree node
struct TreeNode_t
{
// node can have any number of children, from zero to a lot.
// so we use a list.
// if no children, the list is empty.
// no pointer as we own the list.
struct ListOfTreeNode_t m_Children;

// node specific data, like position, value whatever... defined by you somewhere else.
struct NodeData_t m_Data;
};

// a list of nodes.


// an element in the list.
struct ListElement_t
{
// the node being hold there.
// its a pointer because the node might be in many more lists, we do not own it.
struct TreeNode_t* m_Element;
// next element in the list, null if end of list.
struct ListElement_t* m_Next;
};


cell acell[MHEIGHT][MWIDTH];
int iter = 0;
struct TreeNode_t *tnode = new TreeNode_t;
struct Tree_t *troot = new Tree_t;
struct ListElement_t *lsthead = new ListElement_t;


void initMap(void)
{

for(int y=0; y<MHEIGHT; y++)
{
for(int x=0; x<MWIDTH; x++)
{
if(y == 0 || x == 0 || x % (MWIDTH-1) == 0 || y % (MHEIGHT-1) == 0)
{
acell[y][x].str = '#';



}else
{
acell[y][x].str = '.';
}

acell[y][x].x = x;
acell[y][x].y = y;


}

}




}

void setupMapTree(TreeNode_t *tn,int ax,int ay)
{


if(tn == NULL)
{
//first time so create a new tree node
tn = new TreeNode_t;

tn->m_Children.m_FirstElement = NULL;
tn->m_Data = acell[ay][ax];
troot->m_Root = tn;
}

for(int y = 0; y < MHEIGHT; y++)
{
for(int x = 0; x < MWIDTH; x++)
{
if(x < MWIDTH-1)
{
//has east

if(tn->m_Children.m_FirstElement == NULL)
{
tn->m_Children.m_FirstElement = new ListElement_t;
                    tn->m_Children.m_FirstElement->m_Element = new TreeNode_t;

tn->m_Children.m_FirstElement->m_Element->m_Data = acell[y][x];
lsthead = tn->m_Children.m_FirstElement;



}
else
{


//we should have a next element thats free
lsthead->m_Next = new ListElement_t;
                    lsthead = lsthead->m_Next;
lsthead->m_Element = new TreeNode_t;
     lsthead->m_Element->m_Data = acell[y][x];
                  


}
}

if(y > 0)
{
//has north

lsthead->m_Next = new ListElement_t;
                    lsthead = lsthead->m_Next;
lsthead->m_Element = new TreeNode_t;
     lsthead->m_Element->m_Data = acell[y][x];
}

if(y < MHEIGHT-1)
{
//has south

lsthead->m_Next = new ListElement_t;
lsthead = lsthead->m_Next;
lsthead->m_Element = new TreeNode_t;
     lsthead->m_Element->m_Data = acell[y][x];
}

if(x > 0)
{
//has west
   lsthead->m_Next = new ListElement_t;
                    lsthead = lsthead->m_Next;
lsthead->m_Element = new TreeNode_t;
     lsthead->m_Element->m_Data = acell[y][x];
}

}
}

}

void showScreen(void)
{
for(int y=0; y<MHEIGHT; y++)
{
for(int x=0; x<MWIDTH; x++)
{
printf("%c",acell[y][x].str);

}

}


}

void addtoQueue(void)
{
}

void getUnvisitedNeighbours(void)
{
}
int _tmain(int argc, _TCHAR* argv[])
{
initMap();
showScreen();
setupMapTree(NULL,0,0);
return 0;
}

note resize your console window, I made the console window rediculously small for testing purposes until I get this neighbours in a map setup corectly, I am almost certain I understand A* as well as BFs but I dont 100% follow how to get neighbous setup and checked , its kinda frustrating , still Im learning I guess :)
 

.....
Its alot to expect someone to check my code but even if someone could point me in the direction of source code that immplements a breadth first search as well as setting up nodes and their neighours iin a TREE and in C then I would be grreatful. I checked some source but could not find anything that is using core c, however I will have a proper look tommorow for something that uses c and has non library made TREES and then a bfs

14
Programming / Re: need help with theory for nodes and adjacency lists
« on: June 08, 2010, 09:30:58 PM »
Thanks for your addition, it helps,

I can print out nighbours with just linked list structures however each node   points to an independant version of its neighbours i.e things arent interlinked as I should have them so it looks like I am going to have to do a rewrite but I am unsure of how to do trees that are not binary trees but rather every node has x neighbours , for instance in a binary tree we do bintree->left then bintree->right so could I just change each tree element to have say

Struct bintree
{
struct bintree *current
struct bintree *neighbourNORTH; //or should these be struct nodes?
struct bintree *neighbourNE;
struct bintree *neighbourEAST;
struct bintree *neighbourSE;
struct bintree *neighbourSOUTH;
struct bintree *neighbourSW;
struct bintree *neighbourWEST;
struct bintree *neighbourNW;
};

struct bintree *btree;





Btw I just realised now that I know the neighbou coords I could adjust the array direcly and re display to screen

I have been doing alot of testing today I just need to make some headway in certain areas pertaining to structure since theres alot of ways and additionally alot of pitfalls :)





In theory what would be the best steps

Read into 2d array a map;
display 2d array map
simulate an ai move to some location
do bfs


As it stands I read the array cells into a linked list of nodes where each node is a cell , I can printf every cells neighbours but updating the actual search path so I can show temporarly the oder of steps taken is kinda tricky because of how I made neighbourrs an independent  structure that gets pointed tio by a pointer in the node struct

Im also looking for c examples of how to do TREES that have more than 2 branches well any amount, I believe these are narray trees?


15
Programming / Re: need help with theory for nodes and adjacency lists
« on: June 08, 2010, 02:11:37 PM »
No problem :)

I am away to do some coding now so I will let you folks no in a couple of days. No worrys about the formatting although your latest addition really helps even more.

I have had grief about my own formatting before but as you say it is indeed a knightmare to format certain stuff in a forum post, still the meaning is conveyed and that is what counts.

I did binary trees in college waaay back but this is the first time I have used them in a project along with linked lists and I believe once I up my coding skill just a little more and get my binary trees layed out well I will have my ai done as I more or less understand the searches. After AI my project will have some life and I dont think I will have any motivation issues when I get to that point; I see at this time a hurdle overcome and soon after actually being able to play my game. (I imagine that must be a great place to be as a developer)


Btw It seems like my previous way of a linked list then a neighbours list within each node MAY have worked, I am about to create a new project and try things the way suggested however I ran a heap of test data into a file and I included the LAST portion of that test data

I did all this and not the whole file because people may have taken it as spam even though it is not, anyway here it is :)

IT starts from X[67] Y[23[ , coord base just means the curent element hasneighbour [someneighbou, has neighbour[some nighbour] etc

Coordbase: X[67], Y[23] Has neigh: X[67], Y[22]


Has neigh: X[67], Y[24]


Has neigh: X[66], Y[23]


Has neigh: X[68], Y[23]


Coordbase: X[68], Y[23] Has neigh: X[68], Y[22]


Has neigh: X[68], Y[24]


Has neigh: X[67], Y[23]


Has neigh: X[69], Y[23]


Coordbase: X[69], Y[23] Has neigh: X[69], Y[22]


Has neigh: X[69], Y[24]


Has neigh: X[68], Y[23]


Has neigh: X[70], Y[23]


Coordbase: X[70], Y[23] Has neigh: X[70], Y[22]


Has neigh: X[70], Y[24]


Has neigh: X[69], Y[23]


Has neigh: X[71], Y[23]


Coordbase: X[71], Y[23] Has neigh: X[71], Y[22]


Has neigh: X[71], Y[24]


Has neigh: X[70], Y[23]


Has neigh: X[72], Y[23]


Coordbase: X[72], Y[23] Has neigh: X[72], Y[22]


Has neigh: X[72], Y[24]


Has neigh: X[71], Y[23]


Has neigh: X[73], Y[23]


Coordbase: X[73], Y[23] Has neigh: X[73], Y[22]


Has neigh: X[73], Y[24]


Has neigh: X[72], Y[23]


Has neigh: X[74], Y[23]


Coordbase: X[74], Y[23] Has neigh: X[74], Y[22]


Has neigh: X[74], Y[24]


Has neigh: X[73], Y[23]


Has neigh: X[75], Y[23]


Coordbase: X[75], Y[23] Has neigh: X[75], Y[22]


Has neigh: X[75], Y[24]


Has neigh: X[74], Y[23]


Has neigh: X[76], Y[23]


Coordbase: X[76], Y[23] Has neigh: X[76], Y[22]


Has neigh: X[76], Y[24]


Has neigh: X[75], Y[23]


Has neigh: X[77], Y[23]


Coordbase: X[77], Y[23] Has neigh: X[77], Y[22]


Has neigh: X[77], Y[24]


Has neigh: X[76], Y[23]


Has neigh: X[78], Y[23]


Coordbase: X[78], Y[23] Has neigh: X[78], Y[22]


Has neigh: X[78], Y[24]


Has neigh: X[77], Y[23]


Has neigh: X[79], Y[23]


Coordbase: X[79], Y[23] Has neigh: X[79], Y[22]


Has neigh: X[79], Y[24]


Has neigh: X[78], Y[23]

Pages: [1] 2