Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Harvey Mantaco
Mar 6, 2007

Someone please help me find my keys =(

OtspIII posted:

Your room placement method sounds really good, based on all the things I'm trying to make sure I worry about. The rooms seem to have a good balance of both branchyness and loopyness, and even though the screenshot you posted is pure rectangles, they do have a really nice variety of sizes and shapes. I'm obsessively hunting for other similar projects I can steal ideas from, so I'm looking forward to seeing you post more updates here in this thread.

Yours sounds faster than mine as it seems to flow more organically.

In my defense, I just didn't turn on the other shapes for that render.
Old renders with some things turned on:

Adbot
ADBOT LOVES YOU

HaB
Jan 5, 2001

What are the odds?

A bunch of people posted:

:words:

Er...wow. Well, I will do some research on all that stuff. I think the problem is - while I have been an application developer for YEARS, I am very new to Game Programming and am pretty math stupid on top of that. Like I looked at that Point In Polygon page, and I understand it...but how to get from that understanding to code, I just go "who to the what now?" :what:

Guess I will start by cracking open my Data Structures for Game Programmers book. I think it might have quadtrees in it. I think that will at least give me a leaping point. But yeah...math...not my strong suit at all. \:

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
How many regions are you planning to have to sort through? Quadtrees are most likely overkill if you'll have less than a few hundred. It's easy to waste tons of time coding up the ~*magical perfect system*~ only to find that you've added a lot of complexity for no real performance gain and it sounds to me like you might be heading down that road.

Just start with the simplest thing that works, which in this case may be to do the point-in-polygon check over all the items until you find a hit. Run the game and see what your performance looks like. If it's too slow, go up one notch in complexity and maybe wrap each region in a circle and if the click point is outside of that circle (a cheap and simple test) the region could not possibly have been clicked on and there's no reason to do the point-in-poly test. Is that fast enough? If no, then now you're in quadtree territory.

HaB
Jan 5, 2001

What are the odds?

PDP-1 posted:

How many regions are you planning to have to sort through? Quadtrees are most likely overkill if you'll have less than a few hundred. It's easy to waste tons of time coding up the ~*magical perfect system*~ only to find that you've added a lot of complexity for no real performance gain and it sounds to me like you might be heading down that road.

Just start with the simplest thing that works, which in this case may be to do the point-in-polygon check over all the items until you find a hit. Run the game and see what your performance looks like. If it's too slow, go up one notch in complexity and maybe wrap each region in a circle and if the click point is outside of that circle (a cheap and simple test) the region could not possibly have been clicked on and there's no reason to do the point-in-poly test. Is that fast enough? If no, then now you're in quadtree territory.

Yeah it will be more like 20-30 tops, and even that's probably an over estimate.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

HaB posted:

Yeah it will be more like 20-30 tops, and even that's probably an over estimate.
Definitely not worth doing quadtrees, probably not even worth doing pre-checks with bounding boxes, just iterate through the whole list and run point-in-poly.

You can always wrap other things around it later for speed if you feel the need to since it'll (hopefully) all be running through one function.

Null Pointer
May 20, 2004

Oh no!

roomforthetuna posted:

Definitely not worth doing quadtrees, probably not even worth doing pre-checks with bounding boxes, just iterate through the whole list and run point-in-poly.
The number of edges is what matters, not the number of regions. You're probably still right about using a linear search though.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Null Pointer posted:

The number of edges is what matters, not the number of regions. You're probably still right about using a linear search though.
Yeah I know, but with 30 regions the number of edges is almost certainly not going to be enough to matter. You could have 200 regions with 50 edges each, which is a fairly crazy high number of edges, and it'd still be fine for the described clicking context even on a slower device like a phone. If you were doing it every frame, and had 200 regions with 50 edges each, maybe then it would be worth speed-optimizing (even then probably still only to a linear scan of bounding boxes not a quadtree unless there's a lot of other poo poo going on at the same time).

Edit: and it would become the number of regions that's important as soon as you "upgrade" to bounding boxes first, which would be a pretty trivial alteration.

ninjeff
Jan 19, 2004

Harvey Mantaco posted:

Yours sounds faster than mine as it seems to flow more organically.

In my defense, I just didn't turn on the other shapes for that render.
Old renders with some things turned on:



Wow that's a pretty :smugskull:

Harvey Mantaco
Mar 6, 2007

Someone please help me find my keys =(

ninjeff posted:

Wow that's a pretty :smugskull:

Heh, maybe having a room like an SA emoticon would make sense, I'm working on the game pulling in unique monster names from the SA lepper colony (gods pulled from admin/mod list etc)

mewse
May 2, 2006

Harvey Mantaco posted:

Hahaha the gently caress are you doing in this thread? Why aren't we working on something together? I thought you didn't code anymore.

"I like, I can't even... gently caress. Programming, I can't even like... these loving compilers, they don't even loving work. I am never going to do that poo poo."
-Mewse, 2012

I'm pretty sure I told you I'm a good programmer I just hate it. I'm totally busy with boxing and work. That said, if you want to give me an account to your version control I'd love to poke around.

I'm also friends with a bunch of local game dev people if you wanted me to connect you with them.

Harvey Mantaco
Mar 6, 2007

Someone please help me find my keys =(

mewse posted:

I'm pretty sure I told you I'm a good programmer I just hate it. I'm totally busy with boxing and work. That said, if you want to give me an account to your version control I'd love to poke around.

I'm also friends with a bunch of local game dev people if you wanted me to connect you with them.

I know you are I just thought you had nothing to do with it anymore. I'll give you access once I clean this up a bit.

Hanpan
Dec 5, 2004

Not sure if anyone here can help me. I've been playing around with libgdx and having a whale of a time. I've never really used Box2D and I'm trying to figure out how to handle "triggers" (I think they are called "sensors" in Box2D?) for when my player colliders with pickups.

I want the pickups to have bodies as I need them to collide with the environment but what I'm trying to do is make it so when the player collides with them (who is also a body), an event will fire before any collisions are calculated so the player can walk through them without a hitch.

I -think- what I am suppose to do (from what little I can gleam from blogs and such) is attach a sensor fixture to the body of my pickup game object which hopefully will fire a collision event before anything is calculated. Can anyone confirm if this is the right way of doing things?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Hanpan posted:

I -think- what I am suppose to do (from what little I can gleam from blogs and such) is attach a sensor fixture to the body of my pickup game object which hopefully will fire a collision event before anything is calculated. Can anyone confirm if this is the right way of doing things?
Not sure if Box2D does collision layers or exceptions, but if it does, you'd probably want to set pickups so they don't collide with players and monsters at all (assuming you still want them to fall and land on floor and such - otherwise just don't even give pickups a physical body). And then attach a sensor to the pickup that only detects the player. This way there's no "hopefully it's before collisions are calculated" because there's no related collisions to calculate.

That's how I'd do it in Unity. If Box2D can't do collision omissions like that then yeah, you'd be stuck with giving it a sensor that's bigger than the collider and hoping things aren't moving fast enough that a collision happens first (and the annoyance of pickups bouncing off monsters).

Tax Oddity
Apr 8, 2007

The love cannon has a very short range, about 2 feet, so you're inevitably out of range. I have to close the distance.

Hanpan posted:

Not sure if anyone here can help me. I've been playing around with libgdx and having a whale of a time. I've never really used Box2D and I'm trying to figure out how to handle "triggers" (I think they are called "sensors" in Box2D?) for when my player colliders with pickups.

I want the pickups to have bodies as I need them to collide with the environment but what I'm trying to do is make it so when the player collides with them (who is also a body), an event will fire before any collisions are calculated so the player can walk through them without a hitch.

I -think- what I am suppose to do (from what little I can gleam from blogs and such) is attach a sensor fixture to the body of my pickup game object which hopefully will fire a collision event before anything is calculated. Can anyone confirm if this is the right way of doing things?

If I understand correctly, you want the player to be able to pick up the pickups, but not stop/hitch on the collision itself? You could do it the way roomforthetuna describes it, using a combination of collision groups and sensors, but the other way of doing it is to simply check if the object that the pickup is colliding with is of type Player, and if so there are ways to process a callback and "cancel" the collision before it actually gets processed in the collision response part of the physics engine.

I don't remember the exact names of the functions you should look for, but hopefully my answer in combination with roomforthetuna's will be some help. His method is probably faster, so go with that.

Tax Oddity fucked around with this message at 01:28 on Apr 9, 2012

Hanpan
Dec 5, 2004

Thanks for the help. It sounds as though I was on the right kind of track and it certainly seems to work ok. Kind of annoying having to attach a sensor to each pickup but whatever. For reference, I found this post to be particularly helpful in configuring Box2D collision layers: http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/

RoboCicero
Oct 22, 2009

"I'm sick and tired of reading these posts!"
After poking around Unity, Cocos2d-x, and a handful of other solutions, I'm currently using Stencyl. I still need a Mac machine to publish, but the intermediate stage (when I'm just slapping things together) is pretty much painless on a Windows machine and I can test the game out on Flash before I spring for the Mac Mini / Apple license.

Slight caveat is that if I want it to be compatible between Flash / iOS without writing code for both platforms I have to use Stencyl's building block system. Strangely enough, though I'm taking like an order of magnitude more time to build basic code, it's a ton more relaxing. Just look at this!



It's like real programming is a woodshop where you're running around lining things up for the miter saw and messing around with squares and sitting with your hand on your chin tapping a schematic and trying to remember if you got the scale right, and Stencyl is one of those big buckets of Duplo blocks.

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

I have a request for anyone out there willing to more-than humour a sound designer; I really want to work on a project that uses FMOD/FMOD-Ex. Is there anyone here that is currently putting something together that either uses it, or could use it and you'd be willing to try and implement it?

The reason I ask is because while I'm really comfortable with setting up audio builds within FMOD Designer (hell, I TEACH the program at a local college, for their game audio class), I have yet to actually work back and forth with a dev on a game that uses FMOD.

Obviously, unless you're willing to pay licensing, it wouldn't be for anything commercial, and I'm chock-full of royalty-free sound effects and can whip up a pretty good soundscape for whatever game we're dealing with at absolutely no charge, I just want the hands-on experience with this fantastic tool within the realm of an actual-albeit-indie game (even if said game is never, ever finished, or even has plans to be), rather than using it how I have been, which has just been practice and theory.

PM me, or send me something at my gmail, slaptheolsentwins.

NINJA EDIT: An alternative, while lengthy and not really where I'm at right now, would be, of course, for me to code my own game, and take advantage of that. While someday I'd like to get there, it's not something I'm willing to jump into just yet.

Polio Vax Scene
Apr 5, 2009



I've been using FMOD for my sounds/music in pretty much every game I make for a few years now, it's fantastic.

What exactly are your goals in getting someone to use your, uh, resources? I ask because finding good sfx/music is like taking a power sander to my sensitive areas.

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

Manslaughter posted:

I've been using FMOD for my sounds/music in pretty much every game I make for a few years now, it's fantastic.

What exactly are your goals in getting someone to use your, uh, resources? I ask because finding good sfx/music is like taking a power sander to my sensitive areas.

I just want to get my hands dirty, so to speak. Despite teaching it, and being able to set up projects for my students, I've never actually worked on it knowing that what I'm doing would end up in a game. I'd love it if, during this year's SA Game Dev Challenge, someone decides to use it; I'd be all over it! The only audio I've ever done for any game was either for something that was built in Flixel, or, here at work, used OpenAL. So really, so far it's been 'Ok, here are 8 step sounds, you'll probably want to program those in randomly. Oh, and make sure they don't ever play the same sound twice. Also, you might want to vary the volume and pitch each time...' rather than me setting up an event myself that just does all of that from my end.

I love having the power :black101:

EDIT:

Pfhreak posted:

I've worked with Rupert Buttermilk before, and I highly recommend him! He did the sounds and music for our SA Gamedev contest entry. Absolutely dominated his peers. :black101:

:3: Though I feel Svampson and Polo-Rican's team did a better job audio-wise, thank you nonetheless.

Rupert Buttermilk fucked around with this message at 21:38 on Apr 10, 2012

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Manslaughter posted:

I've been using FMOD for my sounds/music in pretty much every game I make for a few years now, it's fantastic.

What exactly are your goals in getting someone to use your, uh, resources? I ask because finding good sfx/music is like taking a power sander to my sensitive areas.

I've worked with Rupert Buttermilk before, and I highly recommend him! He did the sounds and music for our SA Gamedev contest entry. Absolutely dominated his peers. :black101:

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

RoboCicero posted:

Strangely enough, though I'm taking like an order of magnitude more time to build basic code, it's a ton more relaxing. Just look at this!



I agree with that sentiment.

Here's a completed Stencyl game I finished a few months back: http://www.stencyl.com/game/play/9165 That version is actually a little out of date (also, games run slower on Stencyl's site than on, say, FlashGameLicense, but I don't know why), but it's the only link I have handy. BigFishGames offered me a couple hundred bucks for a non-exclusive license, but there were too many hoops to jump through so I never bothered.

I am currently working on a space shooter (not a standard top-down scroller) and I am looking for an artist and/or sound guy to partner with. Right now, I am using GPLed graphics from a very generous designer, but there are already several games out there using his stuff.

Centripetal Horse fucked around with this message at 00:26 on Apr 11, 2012

Kaf
Mar 20, 2005

This thread is dyn-o-mite!
Can anyone recommend any books on designing/implementing match-making services? Getting into this soon at work and it's a whole new field for me.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Going to assume that you mean lobby type stuff.

It's not particularly complicated among network services, you pretty much just put users in a queue and when you get enough for a game you give them a lobby. Rated matchmaking uses Elo ratings and tries to group users with similar Elo, relaxing the similarity requirements if matchmaking is taking too long.

One thing to keep in mind though is that Elo is only meant for 1v1 matchups and has all sorts of weird distortions when used outside of that. 1v1 as in 1 rank vs. 1 rank, rated teams and such work fine with it as well, but it is NOT designed to handle multiple rankings vs. multiple rankings.

Multi-ranking team matchmaking is much more experimental territory at the moment, I'm of the opinion for example that individual performance metrics should be used to adjust ratings in a team game, but it's difficult to come up with a system for that which doesn't lead to counter-productive behavior.

Smurfing/tanking (deliberately crashing your rating so you can stomp inexperienced players) are also a problem you have to watch for, the only real-world solutions I've seen to that are that League of Legends appears to flag smurf accounts which looks like it stops them from getting grouped with newbies (players tend to notice they're flagged because their queue times suddenly skyrocket), and Starcraft 2 gives you one rank per copy of the game so you can't have a high-rank account and a smurf account unless you buy a second copy.

OneEightHundred fucked around with this message at 01:01 on Apr 11, 2012

Scaevolus
Apr 16, 2007

Kaf posted:

Can anyone recommend any books on designing/implementing match-making services? Getting into this soon at work and it's a whole new field for me.

Microsoft's published information on their Trueskill ranking system should be quite useful, and includes formulas for calculating skill and performing matchmaking.

Paniolo
Oct 9, 2007

Heads will roll.
So I spent the evening rewriting the terrain generation algorithm for my voxel engine. Previously everything was very noisy. I wanted to design something which would produce a world suitable for a video game - so, large open spaces delineated by impassable mountains, with narrow passes between them allowing travel between 'zones'. Here is a screenshot of what I ended up with:



Pretty happy with how it turned out. The "water" is obviously a placeholder, it's nothing more than the bottom of the skybox shining through. Adding real water is next on my todo list.

As I built up the algorithm I took a screenshot of each step along the way. It's kind of neat to see how each addition adds something new to the end result, if you're into that sort of thing:

http://imgur.com/a/jkvSO

Paniolo fucked around with this message at 05:13 on Apr 11, 2012

Harvey Mantaco
Mar 6, 2007

Someone please help me find my keys =(

Paniolo posted:



Harvey Mantaco Development Cycle Revealed!:

1. Fall in love with old-school sprite based low graphics games.
2. Spend a lot of time working on game similar to step 1.
3. Read posts by people like "Paniolo" with breathtaking terrain.
4. :smith:
5. Turn on fireplace and glare into it with a blank, thousand yard stare for a couple of minutes. Sit down to code. Immediately stand up and get coffee. Sit down again, immediately stand up and go to washroom. Come back after not even going, sit down, stand up, walk to edge of room, move a book to another spot on the shelf. Sit down, look at current graphic engine. Curse.


Looks good man.

mewse
May 2, 2006

Harvey Mantaco posted:

Harvey Mantaco Development Cycle Revealed!:

1. Fall in love with old-school sprite based low graphics games.
2. Spend a lot of time working on game similar to step 1.
3. Read posts by people like "Paniolo" with breathtaking terrain.
4. :smith:
5. Turn on fireplace and glare into it with a blank, thousand yard stare for a couple of minutes. Sit down to code. Immediately stand up and get coffee. Sit down again, immediately stand up and go to washroom. Come back after not even going, sit down, stand up, walk to edge of room, move a book to another spot on the shelf. Sit down, look at current graphic engine. Curse.

Looks good man.

See, we share the same development philosophy after all.

content: this is the Q3A map renderer I've had on the shelf for .. 7-8 years now? Good lord

From Earth
Oct 21, 2005

Harvey Mantaco posted:

5. Turn on fireplace and glare into it with a blank, thousand yard stare for a couple of minutes. Sit down to code. Immediately stand up and get coffee. Sit down again, immediately stand up and go to washroom. Come back after not even going, sit down, stand up, walk to edge of room, move a book to another spot on the shelf. Sit down, look at current graphic engine. Curse.

This is me, except I don't have a fireplace.

Kaf
Mar 20, 2005

This thread is dyn-o-mite!

OneEightHundred posted:

Going to assume that you mean lobby type stuff.

It's not particularly complicated among network services, you pretty much just put users in a queue and when you get enough for a game you give them a lobby. Rated matchmaking uses Elo ratings and tries to group users with similar Elo, relaxing the similarity requirements if matchmaking is taking too long.

One thing to keep in mind though is that Elo is only meant for 1v1 matchups and has all sorts of weird distortions when used outside of that. 1v1 as in 1 rank vs. 1 rank, rated teams and such work fine with it as well, but it is NOT designed to handle multiple rankings vs. multiple rankings.

Multi-ranking team matchmaking is much more experimental territory at the moment, I'm of the opinion for example that individual performance metrics should be used to adjust ratings in a team game, but it's difficult to come up with a system for that which doesn't lead to counter-productive behavior.

Smurfing/tanking (deliberately crashing your rating so you can stomp inexperienced players) are also a problem you have to watch for, the only real-world solutions I've seen to that are that League of Legends appears to flag smurf accounts which looks like it stops them from getting grouped with newbies (players tend to notice they're flagged because their queue times suddenly skyrocket), and Starcraft 2 gives you one rank per copy of the game so you can't have a high-rank account and a smurf account unless you buy a second copy.

Scaevolus posted:

Microsoft's published information on their Trueskill ranking system should be quite useful, and includes formulas for calculating skill and performing matchmaking.

Thanks guys. A lot of this stuff may end up not being applicable because we're making a purely cooperative 4 player PvE game, but we're still going to want to pair people up with people that they're going to enjoy playing with. Whether that equation will end up being purely skill based or whether we factor in other things like character class synergy and early quit percentages is still unknown, though.

I'm also thinking I should start reading things on scalability as we're anticipating a decently large userbase. A former coworker recommended The Art of Scalability by Abbott and Fisher.

Harvey Mantaco
Mar 6, 2007

Someone please help me find my keys =(


[Click then click to zoom for big]

Some more work done

  • Entity System
    • Tracking AI, stats, graphics and properties for specific entities
    • Basic implementations of each
  • Field of View
    • Implemented Raytracing, Shadowcasting and custom "quick" algorithm to choose from developer toggle.
    • Decided on Shadowcasting as default. Reliable/happy with performance.
  • Memory System
    • Remembers already "seen" tiles/entities and displays them as darker.
    • Developer toggle to also remember and display actors last seen in a certain tile no longer in view (I.E Dungeon Crawl Stone Soup) - not sure if I want to keep this... probably will.
  • Movement and Terrain Checking
    • Implemented character movement, terrain validity checking and initial keyboard control scheme
    • Notice the main character dwarf is sporting a MASSIVE erection that he equiped as a trigger to walking close to another, sexy arsed dwarf. Mmm look at that dwarf. *creepily clicks tongue*
  • Over world Map
    • Only a text based output for now.
    • Combines a Perlin-noise matrix with the output of an algorithm for making clouds in the center of a map that never reach the end. Result is always a water-surrounded randomized island with small little baby islands surrounding it sometimes
    • Behind ascii elevation and climate(!) is tracked for future use
    • Game will be played by sailing between islands or traveling between islands through underground caves/dungeons.



On to Pathfinding. Still haven't fixed the graphic for the walls (annoying black space) but just can't be arsed to care about anything graphical at this point. Going to work on the over world down the road I think... a bit burnt out from struggling with a dumbshit obvious error with my modified Perlin Noise that took forever :smith:.

Red Rox
Aug 24, 2004

Motel Midnight off the hook
Does anyone have any experience in programming AI? For flash? I need some help to make this game, uh, fun?

Transformers Arena

I made this as a way to learn some new flash tricks, so it was pretty successful in that regard. But the gameplay and overall design were not so successful. I guess one of the main problems is that you need 2 people to play it, and most people who would play this type of game don't have friends.

So one improvement would be to add some AI. Another would be to add some sort of online vs setup. I think the combat interface needs reworking as well.

It would be great to get your ideas for improvements!

Luminaflare
Sep 23, 2010

No one man
should have all that
POWER BEYOND MEASURE


So I'm having a bit of trouble with a college project in unity.

Quoting my question on the ask unity thing.

quote:

I'm creating a basic game for a college course and I'm having trouble with the controller script.

I have the script set to rotate a ball so you move around the level by rolling, I have the movement and rotation limited to set axis so it only moves along a 2D plane and doesn't rotate vertically to the camera view. (Z position is frozen, X and Y rotation are frozen)

I seem to be hitting a speed limit though, I can't get it to go faster than 3.5 according to the gui script I'm using to show me the speed.

Here's the GUI script and controller script.

code:
function OnGUI()
{ 
  GUI.Label(Rect(0,0,100,100), rigidbody.velocity.magnitude.ToString());
}
code:
function Update () {
if (Input.GetKey ("right")) {
rigidbody.AddRelativeTorque (Vector3.back * 200);
}
if (Input.GetKey ("left")) {
rigidbody.AddRelativeTorque (Vector3.forward * 200);
}
}

Does anyone know how to fix the speed/velocity limit I seem to be hitting?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Luminaflare posted:

Does anyone know how to fix the speed/velocity limit I seem to be hitting?
Perhaps adjust the drag value on the rigidbody?

Luminaflare
Sep 23, 2010

No one man
should have all that
POWER BEYOND MEASURE


roomforthetuna posted:

Perhaps adjust the drag value on the rigidbody?

It's at 0, I just can't get the ball to roll faster than 3.5 (Not sure what the speed is actually measured in but whatever.).

edit: Also for reference the ball can fall faster than that, just not roll on the ground faster. Also if a surface is slanted it'll go slower going up it but not faster going down it.

Luminaflare fucked around with this message at 16:15 on Apr 13, 2012

SuicideSnowman
Jul 26, 2003
What is the mass of the "ball"? Try lowering it.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
Different radius? Coefficient of friction?

What's actually going wrong, is the ball refusing to spin faster, or is it spinning faster and just not accelerating?

If you don't know, then add
Debug.Log(rigidbody.angularVelocity);
Debug.Log(rigidbody.velocity);

and see if both stop going up or only one does.

edit: 200 is an absolute fuckload of torque to add per frame unless the ball has a huge mass. For something like this I would add the parameter "ForceMode.VelocityChange" or "ForceMode.Acceleration" so that the mass of the ball is taken out of the equation. (And then reduce the torque because 200 would be approximately a 180 degree rotation *per frame*.)

roomforthetuna fucked around with this message at 16:32 on Apr 13, 2012

Luminaflare
Sep 23, 2010

No one man
should have all that
POWER BEYOND MEASURE


They both seem to stop. Top is angular velocity, bottom is just velocity.

code:
(0.0, 0.0, -7.0)
UnityEngine.Debug:Log(Object)
BallController:Update() (at Assets/Standard Assets/Scripts/BallController.js:8)

(3.5, 0.0, 0.0)
UnityEngine.Debug:Log(Object)
BallController:Update() (at Assets/Standard Assets/Scripts/BallController.js:9)
edit: Yeah I reduced the torque a bunch, not sure why it was set to that. Torque doesn't seem to effect the speed at all though.

edit2: How would I add the ForceMode bit to the script? In case it isn't obvious I'm pretty new to this.

Luminaflare fucked around with this message at 16:39 on Apr 13, 2012

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Luminaflare posted:

edit: Yeah I reduced the torque a bunch, not sure why it was set to that. Torque doesn't seem to effect the speed at all though.
That's pretty weird. Does the torque at least effect how long it takes to get to the top speed?

Luminaflare
Sep 23, 2010

No one man
should have all that
POWER BEYOND MEASURE


roomforthetuna posted:

That's pretty weird. Does the torque at least effect how long it takes to get to the top speed?

Only from about 1 to 5, anything higher doesn't make it accelerate noticeably faster.

edit: Mucking about with the radius (Currently at 0.5) it seems to make the max speed change at a value of radius * 7 (So a radius of 1 has a max speed of 7). I hope there's another way around this, having to redesign the level to account for the ball being larger will be a pain.

edit: Aha, it's the max angular velocity in project settings.

Luminaflare fucked around with this message at 17:04 on Apr 13, 2012

Adbot
ADBOT LOVES YOU

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!
While we're on the subject of angular velocities, I'm wrestling with physics and it's not doing what I expect, and I just want to check that a bit of math is correct.

If I have an angular velocity of a thing attached to a pivot, is it correct that the linear velocity of the center of mass of that object is calculated by:

linearvel = Vector3.Cross(angularvel,(centerofmasspos-pivotpos))

(angularvel in in the form of a vector along the axis of rotation, with magnitude equal to the angular velocity in radians.)

Also, I figure there is a difference between a relative angular velocity and a world angular velocity (since the angular velocity has an axis, an axis is a direction, and directions are transformed based on parent bone rotations); rigidbody has functions/members for AddRelativeForce, AddRelativeTorque, GetRelativePointVelocity, but nothing for getting relative angular velocity, only for applying additions to it - would this be simply (ha)
relangularvel = transform.InverseTransformDirection(angularvel)?

Edit: removed length-modification in the latter because it turns out that function retains length.

roomforthetuna fucked around with this message at 22:54 on Apr 13, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply