Jump to content

Photo

Xbox One


  • Please log in to reply
238 replies to this topic

#76 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 30 May 2013 - 05:57 PM

Here, I'll give a basic example of how it'd work in a 2D game, since that's how ZC is.  But it's not ZC's scripting syntax.  I even put comments for you guys =).

 

The current object calling this code every frame would be the fish object.  Player is the player object.

var; xtoplayer = Player.x - x;  //Store the x pixels distance from the player.
var; ytoplayer = Player.y - y;  //Store the y pixels distance from the player.
/*
Use the distance formula sqrt(x^2 + y^2) to calculate the distance in pixels
from the player, and round it down using the floor function.
*/
var; distancetoplayer = floor(sqrt((xtoplayer * xtoplayer) + (ytoplayer * ytoplayer)));
 
/*
If the player comes within 32 pixels of this object, make it
move out of the way.
*/
if (distancetoplayer <= 32 )
{
    /*
    Change the direction of motion to be that in the direction away
    from the player.
    */
    direction=point_direction(Player.x, Player.y, x, y);
    /*
    Give it a speed of 4 pixels per frame, as to give it a sort of
    hurried appeal.
    */
    speed=4;
    
    /*
    In order to use the trig functions, the argument needs to be in
    radians.  So multiply the direction by pi/180 and store it in
    a temporary variable.
    */
    var; trigdirection=direction *pi / 180;
    
    /*
    Check for a collission in the direction of motion with a loop.
    We want the fish to keep turning until it can go in a path such that
    it doesn't run into a wall.
    */
    while (!place_free(x + (speed * cos(trigdirection)), y + (speed * sin(trigdirection)))
    {
        direction+=10;  //Turn 10 degrees counterclockwise.
    }
}

Notes

-Trig is used since direction would be a value between 0 and 360, as it is a degrees measurement.  Degrees can be easily converted into radians.

-If you want to make sure the fish doesn't collide with other fish or objects as well, you'd add that to the condition in the loop.

 

There, that should appease you peeps.  But I've got  more important things to code than some fish right now XD.  Though I'll stash it and tweak it for later.


Edited by Koh, 30 May 2013 - 05:59 PM.

  • Ventus likes this

#77 Dethl

Dethl

    @

  • Members
  • Real Name:Layne
  • Location:Saskatchewan

Posted 30 May 2013 - 06:30 PM

Okay guys, as much as I want to let this go on so I can warn people for taking fish AI as the MOST SERIOUS THING, we are getting to the point where fish code is being written in a topic about the One. Back off each other before this devolves further, and let the waters settle for a while.

 

Seriously, don't be the guy who has to be warned for trolling people with fish AI, it'll just devolve into a feeding frenzy of puns.


  • Ventus likes this

#78 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 30 May 2013 - 06:40 PM

Oh Dethl, you and your puns XD.  I actually don't think there's much more to say about the One at this point though...not until they reveal more.  What I really want to know is, what console exclusives, if any, are they going to have.  If it's just the same series, then...well, it'll probably be a bust getting this thing.  



#79 Avaro

Avaro

    >w<

  • Members

Posted 30 May 2013 - 06:53 PM

It’s a corollary of the uncanny valley, that conceptual chasm that induces a faint feeling of disgust when we see virtual humans that are not quite right: the ideal is actually not ideal.

 

Wtf? I had to look up half of these words in an english/german dictionary I don't see why they had to make this new console, if they could just continue making new games for the xbox 360. I hope that the graphics were not the primary reason. I didn't really look into other features as this new console didn't interest me at all :| .



#80 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 30 May 2013 - 07:02 PM

Well you know, game development for the previous consoles won't stop for another year or two.  They're still making DS games, even though the 3DS has been out for almost 2 years now.  Console "death" comes a few years into the life of the new console.


Edited by Koh, 30 May 2013 - 07:03 PM.


#81 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 30 May 2013 - 07:12 PM

Wtf? I had to look up half of these words in an english/german dictionary I don't see why they had to make this new console, if they could just continue making new games for the xbox 360. I hope that the graphics were not the primary reason. I didn't really look into other features as this new console didn't interest me at all :| .

If you compared games like Battlefield 3, Bioshock Infinite, Skyrim, Far Cry 3, RAGE, and Sleeping Dogs running on a 360 as opposed to a PC, you'll realize how ripped off you felt spending a large amount of money for an unbelievably inferior version of a game.



#82 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 31 May 2013 - 06:59 AM

snip

To me that code looks like the fish will remain completely still until the player is within an exact 32px radius, at which point it will immediately turn to be facing the exact opposite direction from the player and begin moving at a constant speed until the player is outside that radius - no acceleration, no deceleration. If there's a wall in the way, the fish will ALWAYS turn to its right.

This code would produce LAUGHABLY unrealistic fish AI, as it takes into account NONE of the things that would actually motivate a fish to move (for example what it can see, how congested its escape route is, how much of a threat the person seems to be, how other fish in the shoal react to the player's presence, etc.). You would be laughed out of the building for being a total noob if you presented that code to Activision's programmers.

EDIT:

Wtf? I had to look up half of these words in an english/german dictionary I don't see why they had to make this new console, if they could just continue making new games for the xbox 360. I hope that the graphics were not the primary reason. I didn't really look into other features as this new console didn't interest me at all :| .

If you hadn't figured it out, the "uncanny valley" is the term given for when fake humans start to look more and more creepy the more realistic you make them. For example, Mario isn't creepy looking. His plastic-smooth skin and exaggerated features are distinctly not human. But if you take Mario and make him more realistic looking, suddenly he becomes a creepy pedophile that's unsettling to look at. Another example - sex dolls. The poor quality blow up dolls are just laughable in their silliness, but the "real dolls", with their dead, vacant eyes, are nightmare fuel. It's because the closer things come to looking human the more unsettling the non-human things we subconsciously notice become. A very realistic-looking CGI human will creep us out if it doesn't look/act exactly like a human. We pick up on the small things (like those soulless eyes O_O ) without even knowing it.

Edited by NoeL, 31 May 2013 - 07:12 AM.

  • Dawnlight, Shane and Moosh like this

#83 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 31 May 2013 - 08:23 AM

I said it was a ->basic<- example of getting the fish to move out of the way.  OF course you'd add more to it if you want it to wander around, and want more avoiding options, but that does the job of keeping a distance right away.

 

As for the realistic thing...it's true.  This is why certain game series need to be in a certain style.  Imagine if Activision took Call of Duty and turned the graphics into something like Wind Waker or maybe a Stick Figure war.  It'd completely change the atmosphere.  Now, a game doesn't have to be realistic looking to have highly detailed graphics, so I imagine we could get some really nice effects like 3D Dot Game Heroes did on the PS3, except...better?  If they actually try, that is.  I think more realistic water physics could be one way to approach that.  Can the XBone handle it?  Maybe, maybe not.  But even if it can, will a game USE it properly?  It's all about the GAMES.  A console is nothing without a good library.  There's no point in dumping all the attention to the graphics if the game is a piece of shit altogether.


Edited by Koh, 31 May 2013 - 08:26 AM.


#84 DCEnygma

DCEnygma

    you're going to have a bad time

  • Members
  • Real Name:Justin
  • Location:Indianaland

Posted 31 May 2013 - 08:34 AM

Let's stay on topic, everyone. If everyone wants to get into the intricacies of Koh making fish AI, might I recommend a different topic?



#85 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 31 May 2013 - 08:37 AM



Let's stay on topic, everyone. If everyone wants to get into the intricacies of Koh making fish AI, might I recommend a different topic?

Well it helps me get to my next point.  Let's look at a Gamecube game, Charles Angels.

 

 

Now, the graphics look okay.  The game itself is just...awful.  And it loops.  If you give this game the max graphical capabilities of the XBone, would it be any better?  Absolutely not XD.  So again....even if we get the most realistic looking game ever on the XBone...if it plays like THAT,  then it'll still be a piece of shit.  Just a beautiful piece of shit.


Edited by Koh, 31 May 2013 - 08:39 AM.


#86 Moosh

Moosh

    The Mush

  • Moderators

Posted 31 May 2013 - 08:57 AM

Let's bring this topic full circle and talk about names again. Where the hell did this "XBone" thing come from?

 

Who do I have to punch in the face?


Edited by Moosh, 31 May 2013 - 08:57 AM.


#87 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 31 May 2013 - 08:59 AM

Get with the times sir Moosh =D.  It's the internet name given to the XBoxOne due to the "It's going to die before it even begins" atmosphere it has already.  Just do a search and see how many results come up.  Maybe Microsoft can save it when they show us more about the console itself later down the road, but for now, most of the internet already has their pitchforks and torches ready.



#88 Moosh

Moosh

    The Mush

  • Moderators

Posted 31 May 2013 - 09:03 AM

Get with the times sir Moosh =D.  It's the internet name given to the XBoxOne due to the "It's going to die before it even begins" atmosphere it has already.  Just do a search and see how many results come up.  Maybe Microsoft can save it when they show us more about the console itself later down the road, but for now, most of the internet already has their pitchforks and torches ready.

Oh I'm well aware of that. I'm saying XBone is a stupid-ass name. Kinda like how the original topic here was how XBox One is a stupid-ass name. :P



#89 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 31 May 2013 - 09:05 AM

It seems like a better symbolic name to me...if you read it 90's fashion, it becomes "CrossBone."  Better than "CrossBoxOne" to me XD.


Edited by Koh, 31 May 2013 - 09:06 AM.


#90 Dawnlight

Dawnlight

    My name is NOT Jason!

  • Members
  • Real Name:Justin
  • Location:Chicago, IL

Posted 31 May 2013 - 09:08 AM

Remember when Microsoft didn't want the next Xbox to be called "Xbox 2" because it was competing with the PlayStation "3" due to the fact the consumers may think PS3 would sound more of a higher gen product? Look how they contradicted themselves with Xbox ONE. We all know 4 is greater than 1. :P Does this mean the 4th Gen Xbox (if there will be a 4th gen Xbox) will be called the Xbox TWO? :lol:

And Koh, you realize that Xbox's name was originally going to be called the "DirectXbox" and they shortened it to Xbox.

Edited by Dawnlight, 31 May 2013 - 09:11 AM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users