Search Results

Search found 3309 results on 133 pages for 'relative positioning'.

Page 58/133 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Best way to mask 2D sprites in XNA?

    - by electroflame
    I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures: The area to mask (in white) Now, the red sprite that needs to be cropped. The final result. Now, I'm aware that in XNA you can do two things to accomplish this: Use the Stencil Buffer. Use a Pixel Shader. I have tried to do a pixel shader, which essentially did this: float4 main(float2 texCoord : TEXCOORD0) : COLOR0 { float4 tex = tex2D(BaseTexture, texCoord); float4 bitMask = tex2D(MaskTexture, texCoord); if (bitMask.a > 0) { return float4(tex.r, tex.g, tex.b, tex.a); } else { return float4(0, 0, 0, 0); } } This seems to crop the images (albeit, not correct once the image starts to move), but my problem is that the images are constantly moving (they aren't static), so this cropping needs to be dynamic. Is there a way I could alter the shader code to take into account it's position? Alternatively, I've read about using the Stencil Buffer, but most of the samples seem to hinge on using a rendertarget, which I really don't want to do. (I'm already using 3 or 4 for the rest of the game, and adding another one on top of it seems overkill) The only tutorial I've found that doesn't use Rendertargets is one from Shawn Hargreaves' blog over here. The issue with that one, though is that it's for XNA 3.1, and doesn't seem to translate well to XNA 4.0. It seems to me that the pixel shader is the way to go, but I'm unsure of how to get the positioning correct. I believe I would have to change my onscreen coordinates (something like 500, 500) to be between 0 and 1 for the shader coordinates. My only problem is trying to work out how to correctly use the transformed coordinates. Thanks in advance for any help!

    Read the article

  • How to had operation with character/items on binary with concrete operations on C++?

    - by Piperoman
    I have the next problem. A item can had a lot of states: NORMAL = 0000000 DRY = 0000001 HOT = 0000010 BURNING = 0000100 WET = 0001000 COLD = 0010000 FROZEN = 0100000 POISONED= 1000000 A item can had some states at same time but not all of them Is impossible to be dry and wet at same time. If you COLD a WET item, it turns into FROZEN. If you HOT a WET item, it turns into NORMAL A item can be BURNING and POISON Etc. I have try to set binary flags to states, and use AND to set operation to combine different states, checking before if is possible or not to do it, or change to another status. Exist a concrete patron to solve this problem efficiently without had a interminable switch that check every states with everynew states? It is relative easy to check 2 different states, but if exist a third state it is not trivial to do.

    Read the article

  • invitation: EMEA Hardware: Quarterly Partner Sales Update Roadshow

    - by mseika
    Dear Partner We are pleased to invite you to attend the first Oracle EMEA Hardware Quarterly Partner Sales Update Roadshow running in 10 different cities across EMEA. The 3 hour sales session will run in the afternoon in various locations. You can directly register under the "Register Now" button. Learn to Articulate the Oracle Hardware Business value proposition to your customers. Explain Oracle Hardware positioning versus the competition. Understand Oracle Hardware as best platform to run the complete Oracle-on-Oracle stack from Application to Disk Locations & Timings Date Country Location Timings 2nd July 2013   France  Paris 13.00 - 16.15 PM 2nd July 2013  Saudi Arabia  Riyadh 13.00 - 16.15 PM 4th July 2013  United Arab Emirates  Dubai 13.00 - 16.15 PM 8th July 2013  South Africa  Johannesburg 13.00 - 16.15 PM 9th July 2013  Germany  Frankfurt 14.00 - 17.15 PM 10th July 2013  Germany  Münich 14.00 - 17.15 PM 11th July 2013  Switzerland  Zürich 14.00 - 17.15 PM 15th July 2013  United Kingdom  Reading 13.00 - 16.15 PM 17th July 2013  Spain  Madrid 14.00 - 17.15 PM 18th July 2013  Italy  Milan 13.00 - 16.15 PM Price: FREE Find your location and book your seat here! We hope you will take maximum advantage of these great learning and networking opportunities and look forward to welcoming you to your nearest event! Best regards, Giuseppe FacchettiPartner Business Development Manager,Servers, Oracle EMEA Sasan MoaveniStorage Partner Sales Manager,Oracle EMEA

    Read the article

  • invitation: EMEA Hardware: Quarterly Partner Sales Update Roadshow

    - by mseika
    Dear Partner We are pleased to invite you to attend the first Oracle EMEA Hardware Quarterly Partner Sales Update Roadshow running in 10 different cities across EMEA. The 3 hour sales session will run in the afternoon in various locations. You can directly register under the "Register Now" button. Learn to Articulate the Oracle Hardware Business value proposition to your customers. Explain Oracle Hardware positioning versus the competition. Understand Oracle Hardware as best platform to run the complete Oracle-on-Oracle stack from Application to Disk Locations & Timings Date Country Location Timings 2nd July 2013   France  Paris 13.00 - 16.15 PM 2nd July 2013  Saudi Arabia  Riyadh 13.00 - 16.15 PM 4th July 2013  United Arab Emirates  Dubai 13.00 - 16.15 PM 8th July 2013  South Africa  Johannesburg 13.00 - 16.15 PM 9th July 2013  Germany  Frankfurt 14.00 - 17.15 PM 10th July 2013  Germany  Münich 14.00 - 17.15 PM 11th July 2013  Switzerland  Zürich 14.00 - 17.15 PM 15th July 2013  United Kingdom  Reading 13.00 - 16.15 PM 17th July 2013  Spain  Madrid 14.00 - 17.15 PM 18th July 2013  Italy  Milan 13.00 - 16.15 PM Price: FREE Find your location and book your seat here! We hope you will take maximum advantage of these great learning and networking opportunities and look forward to welcoming you to your nearest event! Best regards, Giuseppe FacchettiPartner Business Development Manager,Servers, Oracle EMEA Sasan MoaveniStorage Partner Sales Manager,Oracle EMEA

    Read the article

  • What are good JS libraries for game dev? (HTML5)

    - by acidzombie24
    If i decide to write a simple game both text and graphical (2d) what libs may i use? Assuming we are using a HTML5 compatible browser. The main things i can think of Rendering text on screen Animating sprites (using images/css) Input (capturing the arrow keys and getting relative mouse positions) Perhaps some preloading resource or dynamically loading resources and choosing order Sound (but i am unsure how important this will be to me at first). Perhaps with mixing and chaining sounds or looping forever until stop. Networking (low priority) to connect a user to another or to continuously GET data without multiple request (i know this exist but i dont know how easy it is to setup or use. But this isnt important to me. Its for the question).

    Read the article

  • Unity3D Android - Move your character to a specific x position

    - by user3666251
    Im making a new game for android and I wanted to move my character (which is a cube for now) to a specific x location (on top of a flying floor/ground thingy) but I've been having some troubles with it.I've been using this script : var jumpSpeed: float = 3.5; var distToGround: float; function Start(){ // get the distance to ground distToGround = collider.bounds.extents.y; } function IsGrounded(): boolean { return Physics.Raycast(transform.position, -Vector3.up, distToGround + 0.1); } function Update () { // Move the object to the right relative to the camera 1 unit/second. transform.Translate(Vector3.forward * Time.deltaTime); if (Input.anyKeyDown && IsGrounded()){ rigidbody.velocity.x = jumpSpeed; } } And this is the result (which is not what I want) : https://www.youtube.com/watch?v=Fj8B6eI4dbE&feature=youtu.be Anyone has any idea how to do this ? Im new in unity and scripting.Im using java btw. Ty.

    Read the article

  • OpenGL + Allegro. Moving from software drawing X Y to openGL is confusing

    - by Aaron
    Having a fair bit of trouble. I'm used to Allegro and drawing sprites on a bitmap buffer at X Y coords. Now I've started a test project with OpenGL and its weird. Basically, as far as I know, theirs many ways to draw stuff in OpenGL. At the moment, I think I'm creating a Quad? Whatever that is, and I think Ive given it a texture of a bitmap and them im drawing that: GLuint gl_image; bitmap = load_bitmap("cat.bmp", NULL); gl_image = allegro_gl_make_texture_ex(AGL_TEXTURE_MASKED, bitmap, GL_RGBA); glBindTexture(GL_TEXTURE_2D, gl_image); glBegin(GL_QUADS); glColor4ub(255, 255, 255, 255); glTexCoord2f(0, 0); glVertex3f(-0.5, 0.5, 0); glTexCoord2f(1, 0); glVertex3f(0.5, 0.5, 0); glTexCoord2f(1, 1); glVertex3f(0.5, -0.5, 0); glTexCoord2f(0, 1); glVertex3f(-0.5, -0.5, 0); glEnd(); So yeah. So I got a few questions: Is this the best way of drawing a sprite? Is it suitable? The big question: Can anyone help / Does anyone know any tutorials on this weird coordinate thing? If it even is that. It's vastly different from XY, but I want to learn it. I was thinking maybe I could learn how this weird positioning stuff works, and then write a function to try and translate it to X and Y coords. Thats about it. I'm still trying to figure it all out on my own but any contributions you guys can make would be greatly appreciated =D Thanks!

    Read the article

  • Understanding Unity3d physics: where is the force applied?

    - by Heisenbug
    I'm trying to understand which is the right way to apply forces to a RigidBody. I noticed that there are AddForce and AddRelativeForce methods, one applied in world space coordinate system meanwhile the other in the local space. The thing that I do not understand is the following: usually in physics library (es. Bullet) we can specify the force vector and also the force application point. How can I do this in Unity? Is it possible to apply a force vector in a specific point relative to the given RigidBody coordinate system? Where does AddForce apply the force?

    Read the article

  • Oracle Endeca "Getting Started" Partner Guide

    - by Grant Schofield
    For partners looking for a concise step by step guide to getting started with Oracle Endeca Information Discovery, here it is to help you get started as quickly as possible. Step 1: Join the Knowledge Zone as a company and an individual - this will give you a) the right to resell Oracle Endeca ID, and b) notice of any free / subsidised training events in your region Step 2: For a quick general overview & positioning see the following article, in particular the Agile BI Video series which are useful in sharing with prospective clients. Also find a link to the official OEID Data Sheet. Step 3: For a more detailed overview there is a live recorded OEID partner webcast with downloadable slides. In conjunction with this, your sales / presales team have free access to the official OEID Partner Playbook as well as the full Oracle price book. Step 4: Download the OEID software and install. Please be aware you will need a 64-bit machine & a 64-bit Operating System. A useful solution for partners that have a 32-bit Operating System is to use Oracle's free VirtualBox software to quickly and easily create a Linux image and install on that. Step 5: Attend a free / subsidised training event in your region. Please join the Knowledge Zone as an Individual (opt in) to be informed of these. We will also publish these via the blog Things are moving fast, so please be aware that the team are working hard to produce more and more material such as downloadable data sets (structured / unstructured), a downloadable image, access to demos, and over the next few weeks we will update this article as soon as new material becomes available!

    Read the article

  • Fusion HCM in Boots

    - by Kristin Rose
    These boots are made for walking, and that’s just what they’ll do…Of course by boots, we’re referring to Oracle’s HCM Boot Camps for OPN members, which offer a hands-on approach to learning about Oracle Fusion HCM and Taleo positioning and capabilities. Those who attend an Oracle HCM boot camp will be prepared to achieve Oracle Fusion HCM Presales Specialist status, discuss Oracle Fusion HCM with customers to build pipeline, and complete competency criteria toward Oracle Fusion HCM 11g Specialization! This in-person event offers expert-led sessions, discussion, and hands-on activities meaning you will get the information quicker and remember it better! Plus, we think a free lunch is always a good thing. As a next step, all interested partners should: Obtain self-service knowledge from the Oracle Fusion Human Capital Management 11g PreSales Specialist Guided Learning Path. Become a Specialist by completing the Oracle Fusion Human Capital Management 11g PreSales Specialist Assessment . Contact their regional Oracle Alliances & Channels point-of-contact to learn more about these free OPN Boot Camp events, and the opportunity to attend the next one. We know you’ll be strutting your stuff after you've gained the knowledge and expertise to become Oracle Fusion HCM Specialized! Check it out! The OPN Communications Team 

    Read the article

  • How to choose a language, when taking in account the community it includes?

    - by Rick Rhodes
    I was reading the following article: Great Hackers The following part grabbed my attention: "When you choose a language, you're also choosing a community. The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python. And the quality of your hackers probably matters more than the language you choose. Though, frankly, the fact that good hackers prefer Python to Java should tell you something about the relative merits of those languages." I would like to apply his advice on a commercial web application I am building (I am a strong believer in culture and community), yet this article was written in 2004, and python has increased in popularity in the recent years. How can I decided a language when taking in consideration its community, rather than the popularity? Any recommendations? Is there any language community that show dedication and passion for developing, rather than learning a language to get a Job and a paycheck?

    Read the article

  • Styling ASP.NET MVC Error Messages

    - by MightyZot
    Originally posted on: http://geekswithblogs.net/MightyZot/archive/2013/11/11/styling-asp.net-mvc-error-messages.aspxOff the cuff, it may look like you’re stuck with the presentation of your error messages (model errors) in ASP.NET MVC. That’s not the case, though. You actually have quite a number of options with regard to styling those boogers. Like many of the helpers in MVC, the Html.ValidationMessageFor helper has multiple prototypes. One of those prototypes lets you pass a dictionary, or anonymous object, representing attribute values for the resulting markup. @Html.ValidationMessageFor( m => Model.Whatever, null, new { @class = “my-error” }) By passing the htmlAttributes parameter, which is the last parameter in the call to the prototype of Html.ValidationMessageFor shown above, I can style the resulting markup by associating styles to the my-error css class.  When you run your MVC project and view the source, you’ll notice that MVC adds the class field-validation-valid or field-validation-error to a span created by the helper. You could actually just style those classes instead of adding your own…it’s really up to you. Now, what if you wanted to move that error message around? Maybe you want to put that error message in a box or a callout. How do you do that? When I first started using MVC, it didn’t occur to me that the Html.ValidationMessageFor helper just spits out a little bit of markup. I wanted to put the error messages in boxes with white backgrounds, our site originally had a black background, and show a little nib on the side to make them look like callouts or conversation bubbles. Not realizing how much freedom there is in the styling and markup, and after reading someone else’s post, I created my own version of the ValidationMessageFor helper that took out the span and replaced it with divs. I styled the divs to produce the effect of a popup box and had a lot of trouble with sizing and such. That’s a really silly and unnecessary way to solve this problem. If you want to move your error messages around, all you have to do is move the helper. MVC doesn’t appear to care where you put it, which makes total sense when you think about it. Html.ValidationMessageFor is just spitting out a little markup using a little bit of reflection on the name you’re passing it. All you’ve got to do to style it the way you want it is to put it in whatever markup you desire. Take a look at this, for example… <div class=”my-anchor”>@Html.ValidationMessageFor( m => Model.Whatever )</div> @Html.TextBoxFor(m => Model.Whatever) Now, given that bit of HTML, consider the following CSS… <style> .my-anchor { position:relative; } .field-validation-error {    background-color:white;    border-radius:4px;    border: solid 1px #333;    display: block;    position: absolute;    top:0; right:0; left:0;    text-align:right; } </style> The my-anchor class establishes an anchor for the absolutely positioned error message. Now you can move the error message wherever you want it relative to the anchor. Using css3, there are some other tricks. For example, you can use the :not(:empty) selector to select the span and apply styles based upon whether or not the span has text in it. Keep it simple, though. Moving your elements around using absolute positioning may cause you issues on devices with screens smaller than your standard laptop or PC. While looking for something else recently, I saw someone asking how to style the output for Html.ValidationSummary.  Html.ValidationSummery is the helper that will spit out a list of property errors, general model errors, or both. Html.ValidationSummary spits out fairly simple markup as well, so you can use the techniques described above with it also. The resulting markup is a <ul><li></li></ul> unordered list of error messages that carries the class validation-summary-errors In the forum question, the user was asking how to hide the error summary when there are no errors. Their errors were in a red box and they didn’t want to show an empty red box when there aren’t any errors. Obviously, you can use the css3 selectors to apply different styles to the list when it’s empty and when it’s not empty; however, that’s not support in all browsers. Well, it just so happens that the unordered list carries the style validation-summary-valid when the list is empty. While the div rendered by the Html.ValidationSummary helper renders a visible div, containing one invisible listitem, you can always just style the whole div with “display:none” when the validation-summary-valid class is applied and make it visible when the validation-summary-errors class is applied. Or, if you don’t like that solution, which I like quite well, you can also check the model state for errors with something like this… int errors = ViewData.ModelState.Sum(ms => ms.Value.Errors.Count); That’ll give you a count of the errors that have been added to ModelState. You can check that and conditionally include markup in your page if you want to. The choice is yours. Obviously, doing most everything you can with styles increases the flexibility of the presentation of your solution, so I recommend going that route when you can. That picture of the fat guy jumping has nothing to do with the article. That’s just a picture of me on the roof and I thought it was funny. Doesn’t every post need a picture?

    Read the article

  • mod_rewrite and SEO friendliness

    - by John Doe
    My website has an atypical structure and I'm not sure if this could create problems in the long run, specially for SEO positioning purposes. I have a unique, large PHP script, and I use the Apache module mod_rewrite in the .htaccess file to create friendly URLs, for example: RewriteRule ^$ /index.php?section=Main RewriteRule ^createArticle$ /index.php?section=Main&view=CreateArticle RewriteRule ^configuration$ /index.php?section=Configuration RewriteRule ^article/([0-9]{1,10})$ /index.php?section=Article&view=Default&id=$1 RewriteRule ^deleteArticle/([0-9]{1,10})$ /index.php?section=Article&view=Delete&id=$1 RewriteRule ^reportArticle/([0-9]{1,10})$ /index.php?section=Article&view=Report&id=$1 RewriteRule ^logIn$ /index.php?section=Authentication ... So, www.example.com/index.php?section=Article&view=Default&id=105 would become www.example.com/article/105. The only real physical file is index.php, in which the parameters of the URL queried is processed and the corresponding result is outputted. My question is, do the crawling robots (e.g. Googlebot) recognize these links? Do they index the resulting HTML outputted by index.php with the specified parameters as if it was a actual HTML file? Also, would this become a problem when creating a Sitemap?

    Read the article

  • Introducing the PeopleSoft Interaction Hub

    - by Matthew Haavisto
    The PeopleSoft Applications Portal has just been re-branded as the PeopleSoft Interaction Hub.  It's not just a name change, however.  As part of our ongoing efforts to deliver a richer user experience to PeopleSoft customers, Oracle/PeopleSoft is now offering an enhanced restricted use license (login required) of the PeopleSoft Interaction Hub free with PeopleTools.  This change extends the existing restricted use license to include the following additional capabilities: Dynamic Unified Navigation.  Enables customers to easily provide seamless, unified navigation among their entire PeopleSoft application portfolio. Site-wide branding.  Makes it easier to brand your ecosystem and provide a vivid, contemporary appearance for your applications. These additions augment the capabilities provided in the previous restricted use license, which remain available: creation and use of collaborative workspaces, and pre-built collaborative services for use in related content.  (See the license notes (login required)for a complete list of everything that is granted with the PeopleTools license.)PeopleSoft is moving to deliver a contemporary user experience for your applications users, and the this license change supports that direction.  In addition, the name change reflects our positioning of the PeopleSoft Interaction Hub as a primary means for unifying your PeopleSoft ecosystem, and providing a richer, web-site-based user experience rather than a pillared, application-based experience.See this white paper to get an idea of some of the capabilities that you can employ with the PeopleSoft Interaction Hub to enhance the PeopleSoft user experience.  In addition, this red paper provides valuable 'how-to' guidance.  In the near future we will be producing a best practices guide for deployment.  In the mean time, the most recent release/feature pack of the PIH automates the setup of unified navigation with a Workcenter specifically supporting Unified Navigation. This Workcenter guides administrators through the setup process, and streamlines things.So what should customers do if they still want to use the PeopleSoft Interaction Hub for traditional portal purposes?  Customers can employ the PIH's full capabilities such as multiple site deployment/management and content management, by buying the full, unrestricted license. We are continuing to enhance the product, and it remains part of Applications Unlimited, and we have some exciting features planned.

    Read the article

  • Where can I find this HP modular keyboard or similar?

    - by Chaos Whistler
    I'm looking for an HP USB 104-Key Modular Keyboard with Detachable Number Pad (model number is DT530A, I believe), shown at this online store, where it's quite cheap but is sadly sold out. I've searched for hours on Google, and I've found several - the problem is they're Spanish or Greek keyboards but I need one in English (US keys preferred)! I would also be happy with a keyboard which is not exactly this but is similar, either with a detachable keypad or with no keypad at all, as long as the keyboard key layout and positioning is the same as on a standard keyboard. Can you help me find such a keyboard?

    Read the article

  • Why doesn't max-height hold in Mobile safari in landscape mode?

    - by Mick79
    I am building a small portfolio site for myself and have come across an odd quirk. I have an image inside a container, and to allow for multiple screen sizes, I am setting all dimensions in % rather than pixels. in iphone portrait mode, everything is fine. However in landscape mode, my image bursts out of its container, completely ignoring the max-height:100%; rule that works fine in portrait. code: #centralident{ position:relative; width:50%; height:50%; box-shadow: 0 0 10px black; margin-left:25%; margin-top:13%; } #centralident img{ max-height:100%; }

    Read the article

  • How can I choose between Linux and Windows hosting? [closed]

    - by Mohamad
    Possible Duplicate: How to find web hosting that meets my requirements? I am a relative beginner when it comes to choosing web servers and hosting plans. I'm about to signup for a hosting plan with GoDaddy. My main requirement is ColdFusion and MySQL. The plans on offer include Linux and Windows based plans. Which one should I choose, and why? I don't have a lot of requirements other than what I mentioned above. I never used Linux before but I doubt I'll ever need to do anything beyond tampering with my account. What are the main advantages of one over the other?

    Read the article

  • I am building a simply website for my mobile app & need good recommendation on where to host it [closed]

    - by Gob00st
    Possible Duplicate: How to find web hosting that meets my requirements? 1Question 1 I am building a simply website for my mobile app & need good recommendation on where to host it ? I am not expectation a large access volume any time soon but I want stability in general & considering I am just starting to do my 1st app, so I probably need it to be relative cheap. Please recommend me some stale & cost effective web hosting service ? 2Question 2 Also since I am some what new to web development (know basic HMTL & have used front page/dream weaver like 10 years ago, but haven't touched it for ages). But I am a good c++ software developer. How to you recommend me to build a simple static website(maybe just a few pages) for my mobile app ? Any template or tool recommendation ? Thanks a lot.

    Read the article

  • Balancing Player vs. Monsters: Level-Up Curves

    - by ashes999
    I've written a fair number of games that have RPG-like "levelling up," where the player gains experience for killing monsters/enemies, and eventually, reaches a new level, where their stats increase. How do you find a balance between player growth, monster strength, and difficulty? The extreme ends of this spectrum are: Player levels up really fast and blows away monsters without much effort Monsters are incredibly strong and even at low levels, are very difficult to beat I've also tried a strange situation of making enemies relative to players, i.e. an enemy will always be at 50% or 100% or 150% of player stats (thus requiring the player to use other techniques instead of brute strength to succeeed). But where's the balance, and how do you find it? Edit: For example, I am expecting to hear things like: Balance high instead of balance low (200 HP and 20 str is easier to balance than 20 HP and 2 str) Look at easiest vs. hardest monsters, and see what you have in terms of a range

    Read the article

  • Rotation, further I go from 0:0, the further the object positions around the origin while rotating

    - by Serguei Fedorov
    For some reason I am having the issue where the following code: global.spriteBatch.Draw(obj.sprite, obj.getPosition(), null, Color.White, obj.rotation, obj.center, 2f, SpriteEffects.None, 1); causes the object to rotate around the origin in such a way, as though there is an offset to the position relative to its location. The calculation for the center it correct and this happens even if I set the pivot to be the location of the object. The further I get from 0:0 the larger the radius or rotation. I am not sure what is going on here because given the following tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Rotation.php I have done the code setup correctly. Any ideas? Any help is greatly appreciated!!!

    Read the article

  • Question on methods in Object Oriented Programming

    - by mal
    I’m learning Java at the minute (first language), and as a project I’m looking at developing a simple puzzle game. My question relates to the methods within a class. I have my Block type class; it has its many attributes, set methods, get methods and just plain methods. There are quite a few. Then I have my main board class. At the moment it does most of the logic, positioning of sprites collision detection and then draws the sprites etc... As I am learning to program as much as I’m learning to program games I’m curious to know how much code is typically acceptable within a given method. Is there such thing as having too many methods? All my draw functionality happens in one method, should I break this into a few ‘sub’ methods? My thinking is if I find at a later stage that the for loop I’m using to cycle through the array of sprites searching for collisions in the spriteCollision() method is inefficient I code a new method and just replace the old method calls with the new one, leaving the old code intact. Is it bad practice to have a method that contains one if statement, and place the call for that method in the for loop? I’m very much in the early stages of coding/designing and I need all the help I can get! I find it a little intimidating when people are talking about throwing together a prototype in a day too! Can’t wait until I’m that good!

    Read the article

  • How to avoid circular dependencies between Player and World?

    - by futlib
    I'm working on a 2D game where you can move up, down, left and right. I have essentially two game logic objects: Player: Has a position relative to the world World: Draws the map and the player So far, World depends on Player (i.e. has a reference to it), needing its position to figure out where to draw the player character, and which portion of the map to draw. Now I want to add collision detection to make it impossible for the player to move through walls. The simplest way I can think of is to have the Player ask the World if the intended movement is possible. But that would introduce a circular dependency between Player and World (i.e. each holds a reference to the other), which seems worth avoiding. The only way I came up with is to have the World move the Player, but I find that somewhat unintuitive. What is my best option? Or is avoiding a circular dependency not worth it?

    Read the article

  • Google devrait-il arrêter le développement de Chrome OS ? La séparation des équipes de Chrome et Android est jugée "stupide"

    Google devrait-il abandonner le développement de Chrome OS ? Un analyste de Bloomberg vient de publier un billet de blog plutôt provocateur. Il y traite Google d'imbécile, du fait de son organisation interne relative au développement de ses deux systèmes d'exploitation. En effet, il faut savoir qu'à Mountain View, une équipe travaille sur Chrome OS, tandis que l'autre s'occupe d'Android. Et ces deux groupes ne collaborent absolument pas, il régnerait même entre eux un fort esprit de compétition, d'après certains salariés de la firme. Pourtant, d'après Brad Stone, Android a largement démontré sa supériorité et sa plus grande popularité que son "concurrent" interne. Il estime donc que le staff ...

    Read the article

  • Will my game engine be compatible with physics engines?

    - by Bane
    My engine supports Scene handling, Cameras, and has a Renderer. Also, it has a class called Drawable, which has the position, the shape and the picture of an object. The picture property has width, height, rotation and a draw method. All game objects are supposed to inherit from this Drawable class, and are added to the Scene, along with a Map (collection of Tiles, that also inherit from Drawable), lights, and so on and so forth. The shape property of a Drawable is a Polygon, a collection of user defined vertices around the position of a Drawable (this is a relative coordinate system, so [0, 0] is the position of the Drawable. With this setup, will the users of my engine (probably only me) still be able to intergrate physics engines such as Box2DJS into their games?

    Read the article

  • Cron doesn't execute one of the scheduled jobs

    - by user288633
    I'm using a lubuntu desktop, distribution Ubuntu 13.10, i686. This is my problem: in the job list scheduled by cron a job hasn't effect, but in /var/log/syslog its execution is traced. This is the relative log line: Jun 4 09:06:01 kiosk CRON[14189]: (root) CMD (/usr/bin/xinput set-prop 12 --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 /tmp/mybackup.log) This job should rotate touchscreen mapping. I try different solutions: I substitute in crontab the with bash -c "", I set "export DISPLAY=:0.0" ("for Graphics related job in Unix Environment we need to set first the DISPLAY...") before the command,...and many other! I know there are a lots of details affect cron execution (path, environment variables, special character and other) and I have no more idea by now :( Could some gentleman suggest me an idea? where can I find the problem? Thanks in advance!

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >