Reputation
1,064
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 15
Newest
 Yearling
Impact
~37k people reached

  • 0 posts edited
  • 51 helpful flags
  • 1,488 votes cast
Jun
26
comment How can I improve my isometric tile-picking algorithm?
It doesn't quite work out as you seem to imply; there's more to it (our calculations are quite different). I just don't have the motivation to make it any better since all my maps only render from world(0,0) on up and won't go into the negative anyway.
Jun
26
revised How can I improve my isometric tile-picking algorithm?
fixed code sample
Jun
26
answered How to structure game states in an entity/component-based system
Jun
26
comment How can I improve my isometric tile-picking algorithm?
A note for future readers: this method isn't so accurate when the tile coordinates are in the negative, but accurate (seemingly) to the pixel in the positive. Looking at knight666's answer, the red tile would be my (0,0) with the x-axis increasing down-right and the y-axis increasing up-right.
Jun
26
comment How can I improve my isometric tile-picking algorithm?
Event though I didn't think this would do anything, I gave it a shot anyway. Didn't work. :) Thanks, anyway.
Jun
26
comment How can I improve my isometric tile-picking algorithm?
Thanks. I've discovered the issue (admittedly, it came to me while I was preparing a fork of my code to attempt to implement the many changes needed to accommodate your method), but will make an attempt to implement this method for the game. Appreciate the clear explanation.
Jun
26
answered How can I improve my isometric tile-picking algorithm?
Jun
26
comment How can I improve my isometric tile-picking algorithm?
Your question here is also better asked as a separate question, as opposed to an answer to this question. :)
Jun
26
comment How can I improve my isometric tile-picking algorithm?
When working in Windows Forms, the execution model changes from procedural (games) to event-driven (windows). This means that you aren't polling the mouse location every frame. Instead, your application responds to events fired by objects. Either override an event or assign an event handler. I track my mouse inputs via event handlers on MouseMove, MouseUp, and MouseDown.
Jun
25
comment XNA texture stretching at extreme coordinates
I tried to reproduce this on my system, and while I was successful, the source threshold was a lot higher. I didn't notice any stretching until the source.y property was greater than -32,999,999. I also noticed that adjusting the scale parameter of the draw function also adjusted when the stretching was more prominent. At a scale factor of 1.0f, I had to nearly double my source.y threshold before I saw any scaling.
Jun
25
comment How can I improve my isometric tile-picking algorithm?
What does int index represent in the last two code blocks?
Jun
25
asked How can I improve my isometric tile-picking algorithm?
Jun
22
comment C# XNA Elasticity Behavior
In addition to this great answer, elasticity could also refer to elastic or inelastic collisions.
Jun
20
awarded  Editor
Jun
20
comment Creating a new instance, C#
I've edited my answer to include some more specific examples.
Jun
20
revised Creating a new instance, C#
fixed typo
Jun
20
comment Creating a new instance, C#
To answer your question, my examples were very basic to show you how to pass an object around. If you're going to go with that method, you'll need to add a parameter to your existing Ball constructor that takes in type Bat in addition to your ContentManager and Vector2 parameters. Then you can build your ball the same as you do now with the addition of an already instantiated bat object. Does that make more sense?
Jun
20
awarded  Commentator
Jun
20
comment Creating a new instance, C#
Are your bat and ball instances both being created within the same scope? Also, looking at your snippet for your GameplayScreen, you are creating your bat objects after your ball. It needs to be the other way around, since your new ball class relies on a bat object to be created.
Jun
20
awarded  Yearling