YaHooka Forums  

Go Back   YaHooka Forums > The Chronic Colloquials > Multimedia And Technology
Home Register FAQ Social Groups Links Mark Forums Read

Multimedia And Technology A place to discuss TV, movies, games, graphics, art, computers, technology, the internet and more.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 01-25-2012, 07:26 AM   #81 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
AHHA!

January 25, 2012 -- log

WOW. I'm on the second last step of finishing the path finding algorithm. Days away from completion and I can move on to the next thing, finally. Came upon an unexpected challenge when I decided to make a function that would condense a series of objects linked to other objects into groups.
Basically so if for example object 1 is linked to object 3 but not object 2, and object 3 is linked to object 2 and not object 1, and object 2 is linked to nothing, all three of these objects will be put into the same group because a link association can be found between them.

ie:

A list of objects and objects linked specifically to each object (numbers mean object number)
1 = 6
2 = 4
3 = 2, 5
4 = N/A
5 = N/A
6 = 2


If you look at that for a bit, you can see that all objects are linked together through associating their links. The tricky part is that the way these links are defined is through a one way hierarchy, where an object may be linked to another object and that link may or may not be reciprocated (in the context of a variable assigned to the other object). Essentially, the objects store data containing the objects they are linked to, but do not store any data about which objects they are links of.

This causes complications when you're dealing with a larger number of objects with what can end up being a fairly complex series of links.

And so, it took about 5 or 6 hours of conceptualizing and coding and recoding to come up with a method that works in any circumstance, and then another few hours to finish coding and debugging.

AND NOW

I can turn a raw string that has each level object followed by their linked objects, which looks like this:

(%loString = Level Object String)

%loString = 1901 SPC "links" SPC 1906 SPC 1902 SPC "links" SPC 1904 SPC 1903 SPC "links" SPC 1902 SPC 1905 SPC 1904 SPC "links" SPC 1905 SPC "links" SPC 1906 SPC "links" SPC 1902;


into a group string that looks like this:

(%gString = Group String)

%gString = clump 1905 1903 1902 1904 1901 1906




It just so happens that the exampled raw string expresses a group of Level Objects that are close enough together to each other that there is no possible way that the Player can fit through at any point, so it makes one group. The method is capable of producing any number of groups from any arrangement of level objects.



To this I say woot.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
The Following User Says Thank You to Sir-Ex For This Useful Post:
Roach (01-25-2012)
Old 01-25-2012, 02:46 PM   #82 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
And the accompanying code, if you're brave

__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 01-26-2012, 05:13 PM   #83 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
January 26, 2012 -- log

A glorious day for programming. Got 5 hours in today and almost finished the thing I'm working on. Very close now.

Learned some interesting patterns in the relationships between corners and edges today. Nothing very complex, but something I'd never really noticed before because I've never really looked too hard at the relationships between corners and edges before lol.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
The Following User Says Thank You to Sir-Ex For This Useful Post:
Being (01-26-2012)
Old 01-26-2012, 05:17 PM   #84 (permalink)
I am different
 
Being's Avatar
 
Join Date: Jun 2006
Location: Rosamond, CA
Posts: 3,597
Thanks: 1,113
Thanked 547 Times in 351 Posts
Wish i would have stuck with the coding back in high school. lack of patience just wouldn't allow it lol.

Did you see my post in the other thread about the business/empire excited me so much? good stuff man, good stuff
__________________
R.I.P. Gov

Quote:
Originally Posted by The Rev View Post
It's not a bad thing. We all chubbed a little on that one. The Reps really needed to be called out on their obstructionist ways. It's like they're stuck in Gingrich mode, and can't get out. They really need to reinvent themselves, bring in some new people, and really REALLY become the party of self-reliance and small government they'd like us to believe they are. Right now, they just seem like a bunch of pies.
Being is offline   Reply With Quote
Old 01-26-2012, 05:25 PM   #85 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
No, link me dude.




btw, I dunno what you guys were doing in high school but the shit they taught us in my high school in programming was so stupidly simple I finished the entire course in a matter of a couple weeks. You must've gone to a better school in that regard.



I love this bit of code below. A bit of the algorithm I did today.
\/\/\/\/\/\/
__________________
Smile

Ditch the cigs!!!!!!

Last edited by Sir-Ex; 01-26-2012 at 07:16 PM.
Sir-Ex is offline   Reply With Quote
Old 01-26-2012, 07:10 PM   #86 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
I love this bit of code. A small portion of the algorithm I did today.

PHP Code:
if (%checkCorner $= 1) {
                  
//1st Determine if Inset 
                  
for (%c2 0; %c2 1001; %c2++) { 
                     %
word getWord(%checkObj.ChokeInsetList, %c2); 
                     if (%
word $= "corner1") { 
                        %
slot = %c2 1
                        %
word getWord(%checkObj.ChokeInsetList, %slot); 
                        if (%
word >= 1) { 
                           
//There is a Choke Inset between this corner and the next 
                           //The Choke Bridge will connect Corner 1.01 to Corner 4 of link object 
                           //It is not Possible in this circumstance for there to be any other Choke Bridges from the Link Object's Corner #4
                           //Check for Choke Inset between Link Object's Corner #4 and Corner #1
                           
%slot = %slot 6
                           %
linkObj getWord(%checkObj.ChokeInsetList, %slot); 
                           %
linkCorner getWord(%checkObj.ChokeInsetList, %slot 1); 
                           %
findNext true
                           %
c2 1001;       
                        } else { 
                           if (%
word $= 0) { 
                              
//There are no Inset Chokes between this corner and the next.  
                              //Check validity of Next Main Corner on Object (corner 2)
                              
%word getWord(%checkObj.ScapeCornerList11); 
                              if (%
word $= 1) { 
                                 
//Next Corner is a Main Choke 
                                 
%findNext true;  
                                 
//Find Link Object and Link Corner 
                                 
for (%c3 0; %c3 1001; %c3++) {
                                    %
word getWord(%checkObj.ChokeList, %c3); 
                                    if (%
word $= "Corner2") { 
                                       
//Cycle through Choke Links Counterclockwise from Relative Opposite Corner 
                                       //If there is no Inset Choke after Corner 1, there will never be a Verticle Link Object
                                       //Order is as follows: Horizontal, Corner to Corner  
                                       //Get Number of Chokes 
                                       
%chokeNum getWord(%checkObj.ChokeList, %c3 1); 
                                       for (%
c4 1; %c4 <= %chokeNum; %c4++) {
                                          %
slot = %c3 + (((%c4 1) * 4) + 5); 
                                          %
word getWord(%checkObj.ChokeList, %slot); 
                                          if (%
word $= 1) { 
                                             
//Found a Horizontal Link 
                                             
%slot = %slot 3
                                             %
linkObj getWord(%checkObj.ChokeList, %slot); 
                                             %
linkCorner getWord(%checkObj.ChokeList, %slot 1); 
                                             %
do2nd false
                                             
//Check if Link's Next Main Corner is a Choke or Not  
                                             
%slot = (%linkCorner 6) - 1
                                             %
word getWord(%linkObj.ScapeCornerList, %slot); 
                                             if (%
word $= 1) { 
                                                
//Next Main Corner is a Choke.  Continue to find next corner
                                                
%findNext true
                                             } else {
                                                if (%
word $= 0) { 
                                                   
//Next Main Corner is not a Choke.  
                                                   //First Confirm that this Corner is not the Starting Corner 
                                                   
%findNext false
                                                   %
startObj getWord(%startCorner0); 
                                                   %
startC getWord(%startCorner1); 
                                                   if (%
linkObj $= %startObj && %linkCorner $= %startC) { 
                                                      
//Reached the Starting Corner
                                                      //PRS Corner Generation Completed 
                                                      
echo("PRS Corner Generation Completed (1)"); //debug line
                                                      
%c4 1001
                                                      %
c3 1001
                                                      %
c2 1001
                                                      %
c1 1001
                                                   } else { 
                                                      
//Define as the Next Corner in PRS Corner List 
                                                      
%cornerCycle = %cornerCycle 1
                                                      
//Add string to the end of cornerString 
                                                      
for (%c5 0; %c5 1001; %c5++) { 
                                                         %
word getWord(%cornerString, %c5);
                                                         if (%
word $= "") { 
                                                            %
addString "corner" SPC %cornerCycle SPC %linkObj SPC %linkCorner;      
                                                            %
cornerString setWord(%cornerString, %c5, %addString);
                                                            %
c5 1001
                                                         }
                                                      }
                                                   }
                                                }
                                             }
                                          } else { 
                                             if (%
c4 $= %chokeNum && %word !$= 1) { 
                                                
//No Horizontal Link 
                                                
%do2nd true
                                             }
                                          }
                                       }
                                       if (%
do2nd $= true) { 
                                          for (%
c4 1; %c4 <= %chokeNum; %c4++) {
                                             %
slot = %c3 + (((%c4 1) * 4) + 5); 
                                             %
word getWord(%checkObj.ChokeList, %slot); 
                                             if (%
word $= 3) { 
                                                
//Found a Corner to Corner Link 
                                                
%slot = %slot 3
                                                %
linkObj getWord(%checkObj.ChokeList, %slot); 
                                                %
linkCorner getWord(%checkObj.ChokeList, %slot 1); 
                                                
//Check if Link's Next Main Corner is a Choke or Not  
                                                
%slot = (%linkCorner 6) - 1;   
                                                %
word getWord(%linkObj.ScapeCornerList, %slot); 
                                                if (%
word $= 1) { 
                                                   
//Next Main Corner is a Choke.  Continue to find next corner
                                                   
%findNext true
                                                } else {
                                                   if (%
word $= 0) { 
                                                      
//Next Main Corner is not a Choke.  
                                                      //First Confirm that this Corner is not the Starting Corner 
                                                      
%findNext false
                                                      %
startObj getWord(%startCorner0); 
                                                      %
startC getWord(%startCorner1); 
                                                      if (%
linkObj $= %startObj && %linkCorner $= %startC) { 
                                                         
//Reached the Starting Corner
                                                         //PRS Corner Generation Completed 
                                                         
echo("PRS Corner Generation Completed (1)"); //debug line 
                                                         
%c4 1001
                                                         %
c3 1001
                                                         %
c2 1001
                                                         %
c1 1001
                                                      } else { 
                                                         
//Define as the Next Corner in PRS Corner List 
                                                         
%cornerCycle = %cornerCycle 1
                                                         
//Add string to the end of cornerString 
                                                         
for (%c5 0; %c5 1001; %c5++) { 
                                                            %
word getWord(%cornerString, %c5);
                                                            if (%
word $= "") { 
                                                               %
addString "corner" SPC %cornerCycle SPC %linkObj SPC %linkCorner;      
                                                               %
cornerString setWord(%cornerString, %c5, %addString);
                                                               %
checkObj = %linkObj
                                                               %
checkCorner = %linkCorner
                                                               %
c5 1001;
                                                               %
c4 1001
                                                               %
c3 1001
                                                               %
c2 1001
                                                            }
                                                         }
                                                      }
                                                   }
                                                }  
                                             } else { 
                                                if (%
c4 $= %chokeNum && %word !$= 3) { 
                                                   echo(
"Error: Chokes that should be here are not"); 
                                                }
                                             }
                                          }   
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               } 
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 01-26-2012, 07:29 PM   #87 (permalink)
I am different
 
Being's Avatar
 
Join Date: Jun 2006
Location: Rosamond, CA
Posts: 3,597
Thanks: 1,113
Thanked 547 Times in 351 Posts
Quote:
Originally Posted by Sir-Ex View Post
No, link me dude.




btw, I dunno what you guys were doing in high school but the shit they taught us in my high school in programming was so stupidly simple I finished the entire course in a matter of a couple weeks. You must've gone to a better school in that regard.



I love this bit of code below. A bit of the algorithm I did today.
\/\/\/\/\/\/
It wasn't really that hard, I just didn't have the patience as it was my first class after my 2class then lunch break. Aka getting super stoned everyday and going to that class was not smart lol
__________________
R.I.P. Gov

Quote:
Originally Posted by The Rev View Post
It's not a bad thing. We all chubbed a little on that one. The Reps really needed to be called out on their obstructionist ways. It's like they're stuck in Gingrich mode, and can't get out. They really need to reinvent themselves, bring in some new people, and really REALLY become the party of self-reliance and small government they'd like us to believe they are. Right now, they just seem like a bunch of pies.
Being is offline   Reply With Quote
Old 01-27-2012, 05:21 AM   #88 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
I understand completely
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 02-03-2012, 04:54 PM   #89 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
February 3, 2012 -- log

So...after crashing this thread trying to post a 2000 line algorithm, I've decided not to post it. It's somewhat uncondensed anyway. When it comes time for optimization it'll be less than half that.

Anywho, the pathfinding video is still another couple weeks away now. I was going to have it done this week but realized things would be easier if I implemented something else first, which is...

dadadadum

WALLS.

Shouldn't be complicated to implement into a pathfinding system, right? Well, it is a tad complicated when you can destroy the walls in this game.

So yes, it's going to delay the promised video of SOME sort of gameplay (even if it is just going to a guy walking through a maze) which wont even feature the stuff I'm working on right now, but it must be done eventually and doing it now will make things a lot easier in the long run. You can't just tack stuff on like destructible walls. You might think you could, like, "hey I can just stick in after," but alas no, thinking ahead of the possibilities is THE most important part of programming I've realized. Think of the system you want, think of every possibility, and address each of them with logistic procedures.


Sorry to create more delays, but damn, it's gonna be SWEET when it's done.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 02-03-2012, 05:22 PM   #90 (permalink)
Militant Pacifist
 
Terry's Avatar
 
Join Date: Dec 2003
Location: Moscow, Idaho
Posts: 8,535
Thanks: 2,129
Thanked 2,392 Times in 1,189 Posts
When are u gonna have a demo?!
__________________
There must be quite a few things that a hot bath won't cure, but I don't know many of them.

-Sylvia Plath
Terry is online now   Reply With Quote
Old 02-03-2012, 05:39 PM   #91 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
Heh, my goal is to have a 'tech' demo by the summer time that'll feature the basics of combat and world interaction.

It's going to be a looooong time before you see a demo of THE GAME
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 02-20-2012, 08:33 PM   #92 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
February 20, 2012 -- log

I programmed for about 20 hours this week. It's now been over two months working on the pathfinding system. TWO MONTHS on just the pathfinding system.
I now know why so many games have pathfinding that is inconsistent. Throughout its development there have been a hundred opportunities to cut corners and have something that will work MOST of the time, maybe even GOOD ENOUGH for a game, but I can't do it. It has to be done thoroughly.
I've spent dozens of hours developing processes that only exist to perform some small function that the user will never, ever even notice happening while playing, but is essential to making 100% sure that the system will never produce a result that reveals a flaw in itself.

The nice thing is noticing the improvement on my part. Figuring out small formulas for things like cycling through variable strings in certain patterns, which would have taken me a good few minutes on paper to figure out, I can do now in my head in just a few seconds.

The even nicer thing is that, even though this system is running in the thousands of lines of code (I haven't checked the exact number because it's spread over a few different script files), the whole thing calculates in an unnoticeable amount of time. I find that really cool. Computers are amazing tools.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 02-22-2012, 08:49 AM   #93 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
Here's a screenshot of testing the pathfinding system
Attached Images
 
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 02-23-2012, 05:19 AM   #94 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
guess I should mention that these are all placeholder graphics, this isn't actually what I intend the game to look like (aside from perspective), although I'm pretty sure I'm going the vector art route, as evidenced by my rough draft of a concept character seen here.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 03-03-2012, 01:08 PM   #95 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
So not much to show, still working on the pathfinding.

But, in my spare time I have been doing some work on developing an animation system that is easy to work with for anyone helping out with art assets in the future.

I just finished this, my first attempt and example of the semi-rotoscoped, vector morphing system I've been working with.




Just a low detailed character turning his head. This is a 2d animation, though the effect creates an almost cel shaded look.

What I've done is created a simple 3d model and animated it, making sure to include a few visible guides along the important contours of the model, so that once an animation is rendered in 3d as separate image frames, I can use morphing 2d vectors along the primary contours to outline the shapes of the object, and add smaller details in the 2d program to create more depth in variation in what could be thought of as templates in the 3d program.

By doing this I should be able to create relatively simplistic 3d models to create more detailed and realistic 2d animations for the actual game engine.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 03-03-2012, 03:00 PM   #96 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
Slightly more detailed example:

__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 03-05-2012, 07:55 PM   #97 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
Got in about 2 hours today to work on this:




Basically rotoscoping with some little tricks thrown in.

This is built off a 3d model I did (obviously the cartoon version here is incomplete.. can only do so much in 2 hours) so technically I could just cel-shade it to create that cartoon effect, but I really like the slight imperfections to everything doing it this way - creates a very fluid almost surreal cartoon feeling that I think will look freakin awesome once it's in the game.
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 03-06-2012, 10:16 PM   #98 (permalink)
Spark It or Park It
 
Jester4yall's Avatar
 
Join Date: Mar 2001
Location: Africa
Posts: 3,659
Thanks: 2,775
Thanked 1,320 Times in 946 Posts
that mohawk is sweet
__________________

In matters of style, swim with the current; In matters of principle, stand like a rock. -Thomas Jefferson

You will encounter many distractions and many temptations to put your goal aside: The security of a job, a wife who wants kids, whatever. But if you hang in there, always following your vision, I have no doubt you will succeed. - Larry Flynt
Jester4yall is offline   Reply With Quote
Old 03-08-2012, 03:35 AM   #99 (permalink)
Learner
 
Sir-Ex's Avatar
 
Join Date: Jul 2001
Location: Edmonton, Alberta
Posts: 11,416
Thanks: 1,726
Thanked 3,820 Times in 2,258 Posts
__________________
Smile

Ditch the cigs!!!!!!
Sir-Ex is offline   Reply With Quote
Old 03-08-2012, 08:57 AM   #100 (permalink)
Spark It or Park It
 
Jester4yall's Avatar
 
Join Date: Mar 2001
Location: Africa
Posts: 3,659
Thanks: 2,775
Thanked 1,320 Times in 946 Posts
Did your animation just judge me? He turned and looked @ me with disgust. I'm pretty sure he was shaking his head too.


Looks good so far ex!
__________________

In matters of style, swim with the current; In matters of principle, stand like a rock. -Thomas Jefferson

You will encounter many distractions and many temptations to put your goal aside: The security of a job, a wife who wants kids, whatever. But if you hang in there, always following your vision, I have no doubt you will succeed. - Larry Flynt
Jester4yall is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Inactive Reminders By Icora Web Design