Create an account


Poll: Do you want to attempt RPLG?
This poll is closed.
Yes!
47.37%
9 47.37%
No!
36.84%
7 36.84%
What? I don't care.
15.79%
3 15.79%
Total 19 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SUGGESTION] Random Procedural Level Generation

#26
I'm surprised you know about OpenCL. Actually, I'm studying it right now. It's not that hard to implement, but I'm not sure if it's mandatory to implement it on OpenCL.

After the algorithm is made, I'd be happy to take a shot of implementing it on OpenCL. But the priority should be to get it working.
Reply

#27
(03-25-2010, 08:58 PM)Erusavion Wrote: For something this big, we'd need an entire development team. I'd be happy to dedicate my time to this during the summer but right now I'm very busy with school and work.

But if we are to see this through we'd need several people working on this.

I fully agree. That's why I brought it here. I could never start, much less complete this idea. I'm willing to both learn, and then program for this. I am in my Senior year of high school, but I have few extracurriculars. I should have at least a decent amount of time to help.
Reply

#28
I lied. I have a recursive algorithm to SOLVE a 2D maze. Although, the algorithm to creating it could be edited to make it random pretty easily. Also, the recursive algorithm could be used to help testing the randomly generated map.
Reply

#29
(03-25-2010, 09:05 PM)Aleator Wrote: I'm surprised you know about OpenCL. Actually, I'm studying it right now. It's not that hard to implement, but I'm not sure if it's mandatory to implement it on OpenCL.

After the algorithm is made, I'd be happy to take a shot of implementing it on OpenCL. But the priority should be to get it working.

Agreed. I don't think generation should require OpenCL, but Testing the map most definitely would. It would not be good to have server side delays between rounds for testing. I have read a small portion of the OpenCL docs. Parallel computing fascinates me(probably why I enjoy graphics rendering Big Grin ) I knew about CUDA for a little while, but it's more commercial. OpenCL, was an awesome announcement for me. I want to attempt some applications with it at some point in time(which means never Big Grin ).

Erusavion Wrote:I lied. I have a recursive algorithm to SOLVE a 2D maze. Although, the algorithm to creating it could be edited to make it random pretty easily. Also, the recursive algorithm could be used to help testing the randomly generated map.

That it would! Post it on here? I need to learn some of this stuff. Like I said, I'm inexperienced, and a little overzealous, not bad qualities, but it means I can get myself in over my head sometimes(and I have Sad ). Heh... Blush

Edit: Sorry 'bout the name mixup...
Reply

#30
I'm like that also. I don't have much experience either.

Yes, OpenCL really is a big step. In case you didn't know, they have bindings for C++ and python, so it might be an advantage if you don't want to write the code in C.
Reply

#31
I'm actually more comfortable with C. The whole Object Oriented thing is nice, but confusing to code. Python uses tabs. Tabs are bad. Big Grin
Reply

#32
I hope you don't mind, I'm going to post it in c++ because I don't feel like rewriting it in pseudo code. If you want me to, though, I will.

Quote:bool Maze::findPath(int nextRow, int nextColumn)
{
delay(100);

if(grid[nextRow][nextColumn] != ' ')
return false;
if(nextRow > rows - 1 || nextRow < 0 || nextColumn > columns - 1 || nextColumn < 0)
return false;

grid[nextRow][nextColumn] = 2;

gotoXY(nextColumn, nextRow);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 14);

cout << (char)2;

if(nextRow == endRow && nextColumn == endColumn)
{
gotoXY(0, rows);
cout << "The " << (char)2 << "s found a solution!!!" << endl;

return true;
}

if(findPath(nextRow + 1, nextColumn))
return true;
if(findPath(nextRow - 1, nextColumn))
return true;
if(findPath(nextRow, nextColumn + 1))
return true;
if(findPath(nextRow, nextColumn - 1))
return true;

grid[nextRow][nextColumn] = ' ';

gotoXY(nextColumn, nextRow);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_INTENSITY | FOREGROUND_RED);
cout << "!";
delay(500);
gotoXY(nextColumn, nextRow);
cout << " ";

return false;
}

Keep in mind, this is solving a 2d maze so it is based on a grid (column, row).
Reply

#33
Thanks...now for some deep studying...

Edit: 'k got the first portion.
Eureka! I can't mentally execute code, but I get the idea. Brilliant use of recursion...I thought I'd never see that in use...wow...
That would be the most efficient way of testing for at least x number of open pathways. That's...amazing.
I'll PM you tomorrow to see if I figured it out right.
Reply

#34
If you would like, I could comment it to make it easier to read. Also, I could send you my source code and you could compile it and see how it runs.
Reply

#35
Will it compile on DevC++(the included gcc, not the IDE)? That's all I have access to right now.
Reply

#36
Do you have linux or windows?
Reply

#37
Windows and Linux, but Linux is not available. Here's the issue. I usually "maintenance" my computer(don't install software), but I ordered a new graphics card(GTX 260). That was going to be my reinstall point(for both Win/Lin). Graphics Card died, and there was no replacement. I am saving my money for a GTX 470. I am going to build a Windows based "Gaming PC" and use the "older" parts for a Linux workstation(Gentoo and Awesome yeehaw!) That will be my official setup, but until then, only Windows Vista is set up for use(git is a pain in Windows Sad ). DevC++ should compile the code.(minus a need for the main function.)
Reply

#38
Sweet, you used awesomeWM? I didn't know anybody else that did. I loved awesomeWM.

Yes, DevC++ should compile it. I just don't have any experience with it so I can't help you with troubleshooting. Also, just a reminder, since this is just a recursive function visiting one block at a time this isn't a very efficient way of doing it. I only coded my code this way because we were doing a 2D maze. Basically it is going to slowly visiting the top block, bottom block, left block, and right block. Depending on which is empty first, it will move to that block, even if it leads to blocked off spaces. Now, that sounds wonderful right? Because it should visit all blocks. That is not the case, though. If the path leading to the exit is down, but there happens to be a path to the right also, it is going to ignore the right because it never recursively comes back to try another path.

With all that being said, I'm not sure how much data structures experience you have, but I think that the structure of the map should also be organized in a graph structure and then we could use breadth first/depth first traversal. This would visit each point on the map efficiently.
Reply

#39
Haven't used(man I'm lazy) but will definitely be using. It is, in my opinion, the best tile wm available. Lua scripted configs makes it even better.

Anyways, splitting the recursion up into separate threads for openCL might make the process better than on a CPU. Can you expound on the graph concept? I'm not sure I understand the process. More specifically, the breadth depth use of the graph.
Reply

#40
If you pm me your email I actually have a slide that describes graphs and such that I can send to you.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  [SUGGESTION] Some unique ideas about single player level design zwz 0 2,772 05-09-2014, 12:24 PM
Last Post: zwz
  [SUGGESTION] Some unique ideas about single player level design zwz 0 2,552 05-06-2014, 04:47 PM
Last Post: zwz
Lightbulb [SUGGESTION] Pseudo-random faces. RedGuff 1 2,255 04-03-2014, 10:15 AM
Last Post: unfa
  [SUGGESTION] random hagar idea frostwyrm333 7 5,468 02-05-2014, 12:11 PM
Last Post: asyyy
  [SUGGESTION] Measuring a player's skill level. unfa 6 5,962 11-16-2011, 07:40 AM
Last Post: Mirio
  [SUGGESTION] Random thoughts frostwyrm333 4 4,462 04-20-2011, 04:01 PM
Last Post: Lee_Stricklin

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-