• Content count

  • Joined

  • Last visited

Community Reputation

1153 Excellent

About ArthY303

  • Rank

Personal Information

  • Interests


  • Github
  1. Array size and variables

    I don't know if this was a typo but you wrote: [code] CustomVertex* vertices; indices = new CustomVertex[fSize*3]; // instead of vertices = new CustomVertex[fSize*3]; [/code]
  2. Hello, try taking a look at [url=""]ResEdit[/url] .
  3. Funky std::ifstream behavior [C++]

    Hello! Maybe your problem is in the way you open your file. You use an ifstream so you don't have to specify ios::in, because it opens it for reading anyway. And instead of || you would have to use the single |. Try it like this: [code] std::ifstream file(filepath, ios::binary); [/code] I don't really know if this will help you but you can give it a try.
  4. Hi! Usually, if you place your resources (files, images etc...), in the folder where your executable is located, the application will find them. You don't have to specify the whole path then, just the name of the resource.
  5. Cut down on memory usage

    If your game is laggy on someone else's computer, maybe memory usage is not the problem. You are loosing speed somewhere. You should identify where this happens (usually in the update or render methods). Maybe you're doing things like loading textures every frame. You can use a profiler to see where you are loosing speed.
  6. Learning DirectX, can't compile example code

    Hi! Look at bottom of [url=""]this[/url] page on msdn. It tells you that GetStockObject is in Gdi32.lib. So you'll have to link that in your project just like you did before.
  7. To goto or not to goto?

    I never use goto statements. It's generally unsafe to change the flow of an application in this way. Almost in every situation there are more suitable techniques that are safer, and which won't create spaghetti.
  8. Access Violation with SDL_PollEvent

    Hi! Can we see more code ? We cannot tell you why just by looking at one line.
  9. SFML - Displaying debug messages

    Hi! It seem right that the messages where to close, because you probably don't take into consideration the height of the strings in pixels. Normally, if stringMessage1 is at position stringPos1, stringPos2 = stringPos1 + stringHeight1 + 10.
  10. C# Xna Make an object follow player

    Hi. Have you run your program in debug mode ? It should tell you the problem, usually in the form of an exception. What is that exception saying ? Also, you should post more code. We cannot tell you anything relevant from the amount of code you provided.
  11. [code] device.BeginScene(); if (spriteTexture == null) { spriteTexture = TextureLoader.FromFile(device, "C:\\images\\sample2.jpg", 800, 600, 1, Usage.None, Format.X8R8G8B8, Pool.Managed, Filter.None, Filter.None, System.Drawing.Color.RoyalBlue.ToArgb()); } if (sprt == null) { sprt = new Sprite(device); sprt.Begin(SpriteFlags.AlphaBlend); sprt.Draw(spriteTexture, new System.Drawing.Rectangle(0, 0, 800, 600), new Vector3(0, 0, 0), new Vector3(0, 0, 0), System.Drawing.Color.White.ToArgb()); sprt.End(); } device.VertexFormat = CustomVertex.TransformedColored.Format; device.DrawUserPrimitives(PrimitiveType.LineStrip, i - 1, verts); device.EndScene(); device.Present(); [/code] Hi! This is your render function. Don't do texture loading in the render function. You should have an Init() function in which to load or create all your resources and that function should be called only once. There is no reason to load the same image every frame. Also, you draw the sprite only once. sprt is first null, and you create it and draw it. After that, the instruction in that if statement won't be executed. You should create the sprite elsewhere, not in the render function. In the render function you should just draw it.
  12. Hi! What does "is not able to execute" mean ? Does it give you a message ? Have you got the DirectX runtime installed on the Win7 machine ?
  13. Hi! Let me explain a little better. I'm trying to open a .chm file through my application. For that I'm creating a new process. I am able to open the process and show the .chm file on the screen, no problems. However, I would like to move the .chm process window to another location than its default one. There is no compile error, or runtime error, the window just does not move.
  14. Hello! I'm trying to move the window of a process I create in my windows forms application. Here is my code: [code] [DllImport("user32.dll", SetLastError = true)] private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint); helpProcess = new Process(); helpProcess.StartInfo.FileName = "Help\\help.chm"; helpProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal; helpProcess.Start(); MoveWindow(helpProcess.MainWindowHandle, 600, 600, 100, 100, true); [/code] Thank you!