• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

altra4u

Members
  • Content count

    50
  • Joined

  • Last visited

Community Reputation

122 Neutral

About altra4u

  • Rank
    Member
  1. oh yea. the projection of one vector onto another should be good enough. Lol, y didnt I think of that. Thats y we have the forums i guess. Thank u sir Bacterius.
  2. Hi Guys I was wondering what would be the least expensive way of saying here is my character facing this direction and I want to return a boolean for other characters if they are within a 180 degree curve in front of me. I can think of doing a dot product between my front vector, V1, and vector from target to me, V2, but that will involve a doing a square root operation in finding the length of V2 so I was thinking what others have to say. Thoughts welcome. Thanks.
  3. Basically I have distance^2, range^2 and radius of each character and I want to keep it the most optimized. Looks like its going to have to be d - r < range check.
  4. Good suggestion. Do you think its worth doing this addition and multiplication operations over doing square root of distance though? Plus I will either have radius or radius^2. So if I have radius then I will have to square it and if I have radius^2 then I will have to root it. lol. Or I would have to save both. Probably not a good idea to double data storage.
  5. Hi So normally a distance check would be done by simply doing distance < range check. So lets say distance between character a from character b. However to optimize one would do d^2 < r^2 check. However if one has to include the radius of each of the characters then the check would be distance - characterradii < range where characterradii = raidusofa + radiusofb I'm trying to think of some way where I could keep the squared optimization and also be able to include the radii part. Thoughts?? I'm discounting this one (d^2 - r^2)/(d+r) as that will need the square root value of d Thanks.
  6. @[url="user/155219-szecs/"]szecs[/url] My camera is defined as an object that could be translated and rotated. The problem is I don't really have access to the camera's view frustum settings. All I can do is zoom in and out. That works for player controlled camera where he would like to zoom in and out but I'm having trouble automating the zoom to have the proper view frustum. To begin with need not be that accurate. If the points had to move, I would simply put the logic in game loop. To start with I would just like to have the camera look straight at the points(lets say they were in the same vertical plane). @Emergent. Yes this is like a 2d problem No obstacles or anything. I'll try messing with your suggested solution. Thanks
  7. @apatriarca However wont u think that calculating sin from cos or cos from sin using the sin^2 + cos^2 = 1 property will be more expensive that an arccosine, which is wat I'm doing right now?
  8. @[url="user/105019-apatriarca/"]apatriarca[/url] yea should have thought about that. I'm using the engine's external functions for rotation so kinda skipped my mind. I should do that rotation logic myself. [b] [url="user/146856-taz0010/"]@taz0010[/url][/b] I think you misunderstood my last question. After asking on how to most efficiently do facing test, I asked what would be the most efficient way to align my front vector to face an object. I'm using cross product to find out if its a clockwise or anti-clockwise rotation.
  9. Bumpity bump...anyone plz?
  10. But if I don't know the angle how can I say rotate my front vector by this much to face the target?
  11. [quote name='alvaro' timestamp='1310581792' post='4834940'] [quote name='altra4u' timestamp='1310534863' post='4834631'] Yea I agree that its for 2D. Also remember the posts on arctan being slower than squareroot operation and all that. Not sure about the code messy part. How would it make it messy as compared to what otherwise I would do? Hey here's also an important note on arctan as mentioned on [url="http://en.wikipedia.org/wiki/Inverse_trigonometric_functions"]http://en.wikipedia....etric_functions[/url] [/quote] The messy part is that the angles 170 degree and -175 degree are only 15 degrees apart, and checking that type of thing is cumbersome and error prone. It's not horrible, but I don't like to deal with it. [quote]Read the Practical Considerations part. I guess I'll have to test and use the other alternatives, see if they work for me, otherwise use arctan2. Its just that I don't know how arctan2 works under the hood. I'm finding it hard to believe arctan2 is more expensive than doing the whole dot product and normalize thing.[/quote] Of course you should implement it both ways and compare, but I have a strong expectation that atan2 will be slower. As a general recommendation, I would try to stay away from using angles. Although most people find them very intuitive initially, especially in 2D, once you get familiar with the dot product you don't need them, and the angle-free code is usually shorter, faster to execute, more general (3D as well as 2D) and easier to get right. [/quote] Thanks for your inputs alvaro. I think I'll have to use angles though cause I'm trying to point to an object. Don't see a way using simply dot product.
  12. Hi Lets say I have 3 points I want to make sure are included in the camera's vision frustum. How can I ensure that the camera is placed at the most optimal position closest to the points but far enough to be able to see all of them together? Thanks
  13. Yea I agree that its for 2D. Also remember the posts on arctan being slower than squareroot operation and all that. Not sure about the code messy part. How would it make it messy as compared to what otherwise I would do? Hey here's also an important note on arctan as mentioned on http://en.wikipedia.org/wiki/Inverse_trigonometric_functions Read the Practical Considerations part. I guess I'll have to test and use the other alternatives, see if they work for me, otherwise use arctan2. Its just that I don't know how arctan2 works under the hood. I'm finding it hard to believe arctan2 is more expensive than doing the whole dot product and normalize thing. Thanks for all your inputs.
  14. why not? I'm thinking like atan2(target.z - my.z / target.x - my.x) will give me an angle that I should be able to use. no? Thanks
  15. I'm not sure why people are not mentioning arctan2 at all??? I believed that was the most efficient way to go and since I didn't have in-depth knowledge on it I was hoping a math maestro would come along and explain