Search Results

Search found 6 results on 1 pages for 'shg'.

Page 1/1 | 1 

  • How do I detect if sprite should be going up or down?

    - by Geore Shg
    I use the following code to detect if a sprite should be going up or down: If (pos.Y + 100) >= Sprite.BottomY Then Going_up = True pos.Y = Sprite.BottomY - 130 End If If pos.Y <= Sprite.TopY Then Going_up = False pos.Y = Sprite.TopY - 1 Vel.Y = 3 End If Then my response code: If Going_up Then Vel.Y -= CSng(gameTime.ElapsedGameTime.TotalMilliseconds / 40) pos.Y -= Vel.Y Else Vel.Y += CSng(gameTime.ElapsedGameTime.TotalMilliseconds / 40) pos.Y += Vel.Y End If Sprite.velocity = Vel Sprite.position = pos But it's pretty terrible. It only works when the sprite starts at the top, and when I want to change the BottomY and TopY, it just starts glitching. What is a better to detect if the sprite should be going up or down?

    Read the article

  • Make Sprite Jump Upon a Platform

    - by Geore Shg
    I have been struggling to make a game like Doodle Jump where the sprite jumps on a platform. So how do you make a sprite jump upon platforms in XNA? Th platforms are represented by a list of positions like Public platformList As List(Of Vector2) This is the collision detection under update() Dim mainSpriteRect As Rectangle = New Rectangle(CInt(mainSprite.Position.X), CInt(mainSprite.Position.Y), mainSprite.texture.Width, mainSprite.texture.Height) 'a node is simply a class with the texture and position' For Each _node As Node In _gameMap.nodeList Dim blockRect As Rectangle = New Rectangle(CInt(_node.Position.X), CInt(_node.Position.Y), _BlocksTexture.Width, _BlocksTexture.Height) If mainSpriteRect.Intersects(blockRect) Then 'what should I do here? For example velocity and position?' End If If (_node.Position.Y > 800) Then nodeList.Remove(_node) End If Next

    Read the article

  • What is the recommended approach to add static subdomains to a website?

    - by shg
    I would like to create a few static subdomains like: mycategory.mydomain.com in a rather small website and would like it to point to the folder: mydomain.com/mycategory without showing such redirection in browser address bar. What is an easiest way to achieve it? I can do it in either IIS settings, asp.net, C# code, etc I guess there are better ways then creating a few separate Sites in IIS - one for each subdomain.

    Read the article

  • Can installing Linux or Grub make all of my operating systems slow?

    - by Geore Shg
    I installed Linux Mint 64-bit recently but it freezes up all the time. Not only that, but Grub wouldn't detect Windows. I thought it was just an issue with Linux Mint so I booted into Ubuntu - however that froze up as well. I downloaded Fedora to replace Linux Mint with, but that also freezes up. I finally gave up trying to repair Grub, burning a supergrub grub2 disk and using that to boot into Windows. Windows now freezes up as well. I installed a new copy of Windows on a different drive but to no avail. Right before all this started my computer was running very smoothly. I am wondering if the installation of Linux Mint, the reinstallation of Grub, or me messing with the BIOS (when I was attempting to repair Grub) could have done something drastic enough that everything is slow now? I realize that computers get gradually slower over time, but this was in no way gradual and it happened directly after the installation of Linux Mint. If so, what should I do?

    Read the article

  • What is the recommended approach to add static subdomains to a website?

    - by shg
    I would like to create a few static subdomains like: mycategory.mydomain.com in a rather small website and would like it to point to the folder: mydomain.com/mycategory without showing such redirection in browser address bar. What is an easiest way to achieve it? I can do it in either IIS settings, asp.net, C# code, etc I guess there are better ways then creating a few separate Sites in IIS - one for each subdomain.

    Read the article

  • Best practice for writing ARRAYS

    - by Douglas
    I've got an array with about 250 entries in it, each their own array of values. Each entry is a point on a map, and each array holds info for: name, another array for points this point can connect to, latitude, longitude, short for of name, a boolean, and another boolean The array has been written by another developer in my team, and he has written it as such: names[0]=new Array; names[0][0]="Campus Ice Centre"; names[0][1]= new Array(0,1,2); names[0][2]=43.95081811364498; names[0][3]=-78.89848709106445; names[0][4]="CIC"; names[0][5]=false; names[0][6]=false; names[1]=new Array; names[1][0]="Shagwell's"; names[1][1]= new Array(0,1); names[1][2]=43.95090307839151; names[1][3]=-78.89815986156464; names[1][4]="shg"; names[1][5]=false; names[1][6]=false; Where I would probably have personally written it like this: var names = [] names[0] = new Array("Campus Ice Centre", new Array[0,1,2], 43.95081811364498, -78.89848709106445, "CIC", false, false); names[1] = new Array("Shagwell's", new Array[0,1], 43.95090307839151, -78.89815986156464, 'shg", false, false); They both work perfectly fine of course, but what I'm wondering is: 1) does one take longer than the other to actually process? 2) am I incorrect in assuming there is a benefit to the compactness of my version of the same thing? I'm just a little worried about his 3000 lines of code versus my 3-400 to get the same result. Thanks in advance for any guidance.

    Read the article

1