Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

104 Neutral

About VideroBoy

  • Rank
  1. This is in the context a top-down or isometric game like Zelda or Robotron. I don't need or want realistic physics that use forces or acceleration, but I do want different types of collision responses. Moving characters should slide around terrain and around each other. Characters should be knocked back by explosions and powerful attacks. Arcadey bouncy bullets should bounce off walls. Pushable puzzle blocks could exist. I've read about collision detection, and a little bit about collision resolution between a single pair of colliding objects, but I've seen little about how to prevent a whole group of moving objects from overlapping with each other and the terrain. Suppose I have a relatively simplistic discrete collision detection scheme, where first I move all objects then check for collisions (my attempts at continuous collision detection always ended in tears). When resolving a pair of colliding objects, how do I make sure that separating them does not create new collisions with other objects?
  2. I have the following ruby code: # func1 generates a sequence of items derived from x # func2 does something to the items generated by func1 def test(x, func1, func2) func1.call(x) do | y | func2.call(y) end end func1 = lambda do | x | for i in 1 .. 5 yield x * i end end func2 = lambda do | y | puts y end test(2, func1, func2) # Should print '2', '4', '6', '8', and '10' Unfortunately, I get this error: test.rb:11: no block given (LocalJumpError) from test.rb:10:in `each' from test.rb:10 from test.rb:4:in `call' from test.rb:4:in `test' from test.rb:19Your thoughts? Update It turns out Ruby can't yield from inside a block/lambda. func1 has to take func2 as an explicit parameter. func1 = lambda do | x, func2 | for i in 1 .. 5 func2.call( x * i ) end end Apparently in Ruby 1.9 it's going to be possible to pass blocks to other blocks/lambdas so that they can be written like this: func1 = lambda do | x, &func2 | # Note the ampersand for i in 1 .. 5 func2.call( x * i ) end end For now I'm just going to make func1 return a separate list of the values it's supposed to generate so that my life will be easier.
  3. You know how you can represent a 2D array with a 1D array by converting the coordinates to an index, right? index = x + (y * width) Is it possible to do the opposite? Take an index and get the corresponding (x, y) coordinates? Because if it is, I certainly haven't been able to figure it out.
  4. You guys do realize that this is going to turn into a front for some kind of adult gamer vs young gamer war, right? Or PC vs console war. Or pre-1990s vs post-1990s war. Or X vs Y war... No matter what games are on this list, some community somewhere is going to bawl with self-righteous anger. I won't name names, but it's already starting to happen in this very thread. I really don't think lists like these should be allowed to exist. [flaming]
  5. VideroBoy

    Steering in a nutshell

    Quote:Original post by Kevin Dill For the asteroids game, you're searching over the space of rotations and accelerations to find a series of steps that will transition from your starting position and velocity to your destination position and velocity. I honestly never thought of that. I guess you can throw graph traversals at anything. :) I'm just worried A* might be a bit heavy for what I need. And about evasion steering? Would I just stick to the "go in the direction that maximizes the distance between me and the target" method? Quote:For vehicles moving using cardinal directions - that sounds like simple A* path planning on a grid. Should be a no-brainer Path planning is a no-brainer, at least when I have a tiled environment. But there are times when I want an NPC to navigate without following an actual path, like when wandering. As a specific example, one of the games I'm working on (and not just planning ;) ) is a Spacewar-style game. The player is in a spaceship pitted against an AI opponent in empty space. Unlike Spacewar, I use WASD for movement and mouse for aim; ship movement is more like Robotron or Geometry Wars. I need the AI to (a) dodge the player's bullets and (b) get within firing range. This sound more suited to steering/flocking behaviour than to A* or other graph traversals, but I still want to constrain the AI's movement so that it follows the same rules as the player.
  6. VideroBoy

    Steering in a nutshell

    Quote:Original post by Kevin Dill These methods are not typically the most appropriate for vehicles, for exactly that reason. Steering works purely by applying acceleration, and assumes that the entity can accelerate equally well in any direction. While this sort of works for bipeds and quadrapeds (and it works great for spaceships!), it doesn't really work very well at all for vehicles. This might have caused my confusion. Reynold's work is so influential yet his assumed physics model doesn't seem to mesh with several vehicle control schemes common in games. Reynold's original paper has steering through combining vectors and applying them to point masses. There's no explicit rotation, the implied rotation has variable speed, and the thrust speed is also variable. The control input with behaviour closest to AI's using Reynold's locomotion is an analog joystick. For my specific case, I have games in mind where vehicles have forward/reverse thrust and rotation; Asteroids-style of course. I also have games in mind where movement is constrained along four or eight cardinal directions like in Zelda or Robotron. I'd like to apply Reynold's steering method to those schemes since his method allows complex behaviour for little effort, but I anticipate certain degrees of shoehorning. Quote:For an alternate approach, you might look into Chris Jurney's article in AI Game Programming Wisdom 4, "Postprocessing for High Quality Turns," for a starting point. I believe Nathan Sturtevant (http://webdocs.cs.ualberta.ca/~nathanst/) has also done some work in this area. I'll have to put off looking at Chris Jurney's article since I'd have to pay money for the journal. ;) Also, according to the abstract it just talks about smoothing out movement along a predefined path (in combination with pathfinding). Nathan Sturtevant also seems to deal mainly with pathfinding (though it's kind of cool he worked with Bioware :) ). I'm currently more interested in dynamic flocking, seeking, and evasion behaviours.
  7. I'm reading up on Craig Reynolds' steering algorithms and I'm still unclear on some of the underlying principles. As far as I can tell, Reynolds' vehicle model has only position and velocity (and mass). It seems to be assumed that the vehicle's orientation is kept aligned to its velocity vector. The vehicle's direction changes by taking a steering vector, its magnitude truncated to a maximum steering force, and adds it to the vehicle's velocity. The vehicle's velocity is then truncated to a maximum speed. Steering behaviours are achieved by calculating different steering vectors and combining them into a single final vector. The vehicle has continually variable thrust and it is never "rotated" (say, Asteroids-style) per se. That's pretty much it, right?
  8. VideroBoy

    City Size in RPGs

    For case studies of "realistically" sized cities in games, take a look at The Elder Scrolls: Arena and The Elder Scrolls II: Daggerfall. Whether this use of scale was useful is subjective. I'd say leave in the parts of the city that matter to the gameplay, then imply the city's actual size through other means. Unless you're going for a full-blown reality simulator, faking the city's scale would be good enough. You'd still be a step ahead of most games that don't bother to suggest any scale of their cities. Now, if the entire game were to take place in one city then we'd have a different story. Quote:Original post by WorldPlanter I too never had the impression of being immersed in a large town or city though in classic SNES RPG's and adventure games. I took them as iconic representations of towns rather than actual towns. Most games are iconic by their nature. The miniature towns are along the same lines as nondescript red potions that heal you, a person's abilities being rated by numerical "skills", and gold being the currency of everywhere.
  9. VideroBoy

    Social ramifications of green skinned space babes

    Quote:Original post by FableFox http://www.thesharkguys.com/lists/top-8-people-who-married-animals/ Done. :-) But those animals weren't sentient. What if they were sentient? P.S. I hope you guys know that the aliens don't have to be (and are unlikely to be) actual space babes. I was just referencing the cliché.
  10. VideroBoy

    Life as we (used to) know it

    That's the impression I got from this article: http://scienceblogs.com/pharyngula/2010/12/its_not_an_arsenic-based_life.php So, I guess, the bacteria was based on phosphorus like everything else, and that they simply took in some arsenic to compensate for the dropping amounts of phosphorus in their petri dish. NASA, did you really decide to hold a press conference for this? [headshake]
  11. VideroBoy

    Social ramifications of green skinned space babes

    Quote:Original post by VildNinja Considering the rising amount of images of furies and tentacles popping up online, I would guess that quite a few people would burst with excitement XD And an equal or maybe greater amount of people would be filled with rage. If we met a race of intelligent cuttlefish, and some of those cuttlefish attempted to court our women, how many would be outraged due to their distaste for tentacle hentai? [rolleyes] It'd be like Arthur C. Clarke's Childhood's End, where the aliens had to hide their physical appearance for a while because they looked too much like Judeo-Christian demons. Only with more Internet memes. I haven't actually read Childhood's End by the way. Quote:Original post by laztrezort The chances that a truly alien species would be physiologically similar enough to allow sex, let alone reproduction, is next to nil (at least, as far biology is currently understood). There have been story devices to get around this, for example have them not be aliens but genetically modified humans, or a separate evolution of humans on a different world. I'm not sure whether or not this makes any difference to the discussion (probably not), but I do know that I was always bothered by all those human-similar aliens in science fiction movies. Most media that explore inter-species relationships only present mere allegories of racial issues. They don't explore the fact that these are relationships with members of a separate species. And since the alien is mostly human-like, the implications are less pronounced. Of course the chances reproduction is next to impossible, and in the slim chance that it is possible I'd expect the offspring to have some serious birth defects. [sad] I'm assuming for this discussion that the aliens are carbon-based enough that physical contact between an alien and a human won't harm or kill either one. Given the differences in physiology, sex between human and alien probably wouldn't be actual, functional sex anyway. Are there any (hard(ish)) science fiction novels that explore these issues, by any chance?
  12. VideroBoy

    Social ramifications of green skinned space babes

    Quote:Original post by owl It'd be very interesting if the aliens happened to be 100 times more hot than the hottest human (according to our standards). But not as interesting as if the aliens happened to resemble the Elder Things as visioned by H.P. Lovecraft. If human-Elder Thing marriages are still proposed, how would this impact our standards and assumptions about sexuality? (I am posing more questions than answers because this thread is also kind of a social experiment on my part. [wink] ) [Edited by - VideroBoy on December 5, 2010 7:18:55 PM]
  13. VideroBoy

    Social ramifications of green skinned space babes

    Quote:Original post by MarkS However, the reaction will be stronger (towards the negative) if reproduction is a possibility. Do you mean people who'd already be opposed would react more strongly, or that there'd be more opposition overall? Yeah, we have already seen this with interracial and homosexual couples, but those were relationships between humans. I'm wondering how much the discourse would change when considering relationships with a different species. If a creature is sentient, is having sex with it still bestiality?
  14. Here's one for all the sci-fi fans out there. Say we come in physical contact with an intelligent alien species (they arrive in a ship, we arrive in a ship, faster-than-light is invented, etc). We are able to survive in the aliens' environment, and vice vera. We are able to communicate and understand each other with relative ease, to the point where a human and alien may form an emotional attachment... Say that the aliens are biologically close enough to humans that...physical intimacy is possible. The aliens do not have to be humanoid; actually, non-humanoid aliens would make this discussion more interesting. Reproduction would be impossible, but a human and an alien "going through the motions" together would not harm either one. And suppose there's a subset of both humanity and the aliens that are interested in this (i.e. it's not just us perving on them). What kinds of perceptions and responses do you imagine of humanity (and the aliens) in this situation? What kind of viewpoints and arguments would you expect to be presented? In other words, what kind of sh**storm can we expect if we ever discover real life "space babes"?
  15. VideroBoy

    Comparing 2D angles for rotation (Solved)

    I was unable to get Sirisian's solution working, but K_J_M worked (and, since my code is based on angles instead of vectors anyway, a lot simpler). I thought I ought to clarify that solution by noting that K_J_M's angle_1 is the object's angle while angle_2 is the target angle. My revised code. local mx = love.mouse.getX() local my = love.mouse.getY() local targetAngle = math.atan2(my - playerY, mx - playerX) if playerAngle ~= targetAngle then local angleDiff = math.atan2(math.sin(targetAngle - playerAngle), math.cos(targetAngle - playerAngle)) if math.abs(angleDiff) < PLAYER_ROT_SPEED then playerAngle = targetAngle else local sign = angleDiff / math.abs(angleDiff) playerAngle = playerAngle + (PLAYER_ROT_SPEED * sign) end end [Edited by - VideroBoy on November 29, 2010 7:30:46 PM]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!