Jump to content

  • Log In with Google      Sign In   
  • Create Account

AnnaMarie

Member Since 30 Jan 2011
Offline Last Active Yesterday, 09:17 PM

Posts I've Made

In Topic: About resouce files

20 May 2016 - 11:36 AM

I misread and didn't see the line above getting the file format. Sorry! Just woke up :|

If you store the path defined in images along with the resource (you have a resource class, the image name is just a string member variable) then resources contain the file path and their own name. From there you can always find a resources image name.

If the resource only receives file data you could also find the extension (since you need the string to open the file) then pass the extension along with the file data.

In Topic: About resouce files

20 May 2016 - 10:42 AM

You could start at the end of the string and iterate towards the beginning searching for the period. When the period is found the extension is represented by everything between the period and end of the string.

If your language has a string class/type you can do the same with searching and using a substring. Hope that helps :)

In Topic: Quadtrees for terrain culling and more terrain questions

22 November 2015 - 02:39 PM

The first use for a quadtree I can think of in addition to your link deals with 2D collision detection. You can find more information on Wikipedia where there is a small list (here) as well. I think a quadtree for 2D is pretty common, though, I could be wrong. A more up to date article for a quadtree terrain (though in C# but you can translate it) I found was here.

 

There are more advanced terrain clipping/LOD systems you can do but I don't know the exact details of them. The node based LOD found on Rastertek has worked for my needs and was pretty easy to implement. I had a simple box for each terrain node/chunk, and I just did bounding box detection to know which chunks were to be rendered. This may not have been as efficient as other techniques but I didn't have any noticeable problems.

 

Normals are generated when I create the terrain and I just store then inside the buffer. If the terrain isn't changing there doesn't seem to be a reason to regenerate the normals each time using a shader. In the case where my terrain changed (when using a simple brush) I just recalculated and updated the buffer. 


In Topic: How to start creating games?

22 November 2015 - 02:15 PM

Something else that will help immensely is setting aside some time each day to work on it. Maybe not something crazy like 4 hours a day starting out, but at least about 30 minutes to an hour should help get the habit formed and visible progress. 

 

Once you get comfortable with the basics it's nice to pick something simple and work from there on your own. This is so you are able to teach yourself how to learn new programming topics, and so later on you can get that warm fuzzy feeling from the progress you have made.

 

Each thing you make should always be a bit more challenging than the last, but not too challenging so you do not get discouraged.

 

Something that I know helped for me and may help for you deals with tutorials. If a tutorial provides example/working code always retype it, don't just copy and paste it. This way when yours breaks but theirs works you have to go line by line to compare. This helped me learn what the code was doing if I didn't entirely understand, but more importantly trained my eye to spot mistakes and typos. 

 

Good luck! smile.png


In Topic: Misuse of downvotes

22 November 2015 - 01:45 PM

 

I downvote anyone who downvotes me, as well as anyone who downvotes newbs

 

 

So basically the concept is people that downvote you (in other words, they disagree with the information/opinion you provided) are now targeted for the simple reason they downvoted you? That seems to me to be much more 'misuse' of the system. Perhaps I am misunderstanding?

 

Honestly a majority (probably >95%?) of the downvoted posts I see are usually for a reason, whether clear to the recipient or not. These include particularly abrasive comments, personal attacks, or people just begging for others to tell them exactly what to do. Here and there I see a few I am confused about, but it usually comes down to someone appearing to blow off the information provided instead of just asking for clarification.  Asking for clarification is so much better than stating the information is useless. 

 

If you (meaning you in a generalized sense) have problems with repeated downvotes just take your time writing a reply. Type it up, re-read it, cut out pointless information, and repeat.


PARTNERS