Jump to content

  • Log In with Google      Sign In   
  • Create Account

RulerOfNothing

Member Since 08 Nov 2011
Offline Last Active Nov 23 2014 11:55 PM

#5151322 Partitioning an A* 400x400 map every frame

Posted by RulerOfNothing on 03 May 2014 - 08:33 PM

One obvious question here is how often the map changes. When you check for passability, does this take into account mobile objects? If not, you could probably get away with only updating the partitions whenever the stationary objects on the map change (probably just building construction/destruction, but maybe terrain modification if you are planning on including something like that)




#5150873 Preparing before i indulge myself into Game Development!

Posted by RulerOfNothing on 02 May 2014 - 01:40 AM

It is not necessary to use C++ to write games, and it is more than possible to write games with C# or Java. If you already have experience in using those languages I would recommend using them for your early game projects over learning C++. For graphics I would recommend using SFML if you are going to use C++ or C#.




#5147536 How to create a 'quad'?

Posted by RulerOfNothing on 16 April 2014 - 09:44 PM

Well, if you're drawing a triangle list, you need 3 vertices for each triangle. You want to use D3DPT_TRIANGLESTRIP here instead and swap the 1st and 2nd vertex.




#5147498 Star system generation for 4X games

Posted by RulerOfNothing on 16 April 2014 - 06:52 PM

Thanks for those links Stainless and jefferytitan. I will take a good look at all of them over the next few days and then hopefully start work on my 4X game.




#5146632 What beginner langauge is better for a smooth 2d platforming game?

Posted by RulerOfNothing on 12 April 2014 - 09:16 PM

When you say you are a beginner at programming, what language do you have knowledge in?




#5145543 Strange array overflow (aka WTF I missing here?)

Posted by RulerOfNothing on 08 April 2014 - 09:36 PM

If TILE_SIZE is 7, then the loop goes from j=0 to j=6. When j is equal to 6, it tries to push past[j/2] onto verts. Since past has a length of TILE_SIZE/2 or 3, its valid indices go from 0 to 2. I am not sure at the moment how to fix this though.




#5037098 Linked List Node Corruption Problem

Posted by RulerOfNothing on 27 February 2013 - 05:28 AM

I think the problem here is that your delete function gets rid of the associated node data, so this happens:

  1. Program decides to delete s.
  2. Program deletes s and its associated node n.
  3. Program tries to get the next member of n, but can't because that node has been deleted and can no longer be assumed to hold valid data.

How I would solve this is by moving the line n=n->next; to immediately after the program extracts the element from n, so that n will always be valid when you extract the next member from it.




#5028564 iterator list corrupted (with alt-F4 only)

Posted by RulerOfNothing on 04 February 2013 - 12:49 AM

In response to the people asking about how suliman is handling WM_CLOSE messages, presumably the HGE engine he is using is taking care of that (or maybe it isn't). Suliman, I think in order to better reason about your code, you might want to put it up so we can have a look at it. You could also try asking for help on the HGE engine forums here.


#5028209 Understanding Bitmap's

Posted by RulerOfNothing on 02 February 2013 - 07:44 PM

One important thing to keep in mind about windows bitmaps is that the bitmap data is padded so that each row takes up a number of bytes that is a multiple of 4 (and that this padding occurs at the end of the row).


#5026335 'Continue' statement usage?

Posted by RulerOfNothing on 28 January 2013 - 06:07 AM

The problem here is that you are using = instead of == (unless this was a typo), so that materials[material].index[meshes].uses = false will actually evaluate to the expression on the right-hand side of the equals sign. This means that the if statement's condition will never evaluate as true and so the continue statement won't be executed.


#5025606 '.' in filepaths

Posted by RulerOfNothing on 25 January 2013 - 06:00 PM

Preliminary testing appears to support the statement that "file" and "file." are interchangeable on modern Windows (in fact, when I made a file called "file." it simply got rid of the period) I cannot say anything definitive about Linux and OSX though.


#5020931 Removing two objects at once failure

Posted by RulerOfNothing on 12 January 2013 - 08:29 PM

From the documentation of the ArrayList:
Note that this implementation is not synchronized. If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.)
This means that you'll have to prevent two threads from accessing the ArrayList at the same time; this could be accomplished by having a wrapper of the ArrayList that queues up addition and deletion operations, or by eschewing the use of multiple threads entirely (although you may have a good reason for going threaded)


#5019747 Starting my first hobby game... [QUESTION]

Posted by RulerOfNothing on 09 January 2013 - 09:13 PM

There are no problems with using Java to make a 2D platformer (as far as I know), so my recommendation would be that you stick with Java since you are comfortable with it and know a lot about that language.


#5016966 Number of vertices and number of triangles in modern game

Posted by RulerOfNothing on 02 January 2013 - 10:23 PM

You always have more vertices than triangles (assuming all your geometry is made up of triangles), but it is possible to reuse vertices between triangles (by having all triangles with a common vertex or by having consecutive triangles share 2 of their vertices) so there can be less than three vertices per triangle.


#5016267 resizing a 2d vector.

Posted by RulerOfNothing on 31 December 2012 - 10:16 PM

Could I solve this by making the vector size 0 then resize it the way I did in the beginning?
That depends. Doing this will give you a vector containing 60 60-element vectors, but those vectors will not contain the data that was previously in the structure. If you want to keep the old data, you just need to loop over the vectors already present and resize them, then resize the top-level vector as before.




PARTNERS