If you're working on a day night cycle, just for testing, you should just use something like Math.Sin(gameTime.TotalGameTime.TotalSeconds) and then scale it as necessary. Works great. :P
Combined with some linear interpolation and you have a smexy cycle in no time.
im just learning, a lot of examples i see preload assets like images and whatnot on launch
makes sense, those become added to the program's memory and can be accessed whenever. i guess my question is, if you were building something in XNA would you load all your assets? or kind of load-when-needed?
i mean this is my first project, its going to be as simple as it comes but i still kind of want to work with best practice even if i could get away with cutting corners
so lets say my main menu has a little melody along with a background png
i'd load those assets on launch, but not the music for level 2
If i'm not mistaken, you just unload if you really dont want it anymore on the memory. if you dont unload, the gc will do it for u on the end of the game though, im not sure!
@WilliamMindWorXMariager there is a difference between asking if someone is free for 8 hours and saying I'm free for 8 hours.
@CodeAssasssin if you really like developing using C++ and you've found other engines hard to work with you can try esenthel.com but I won't guaranty anything myself. (so far I didn't have any problems with it myself)
@Dave yep, my codes always work. unless otherwise is proven
@CodeAssasssin also if you want to restrict yourself to 2d development, you can try SDL or SFML
@WilliamMindWorXMariager I guess you are working with TCP packets right now, and sending changelogs. did you consider using UDP and sending whole gamestate?
Anyone have advice, links to blog posts, or tutorials that cover game character/level/inventory management in ios? I currently use one class (such as GameEnemy.h/.m), and create new characters by adding a dictionary (for each enemy) to an Enemies.plist, which stores the attribute values (similar to this i.stack.imgur.com/D43r0.png).
@tylerrrr07 I would, though, I am looking for an ios specific implementation since I'm trying to get suggestions geared away from databases and more towards classes, etc. It's not that I couldn't use a database to do these things, in fact, I'd very much like to. It's just that I'd like to see how others approach this issue.
I don't have a solution. I was just recommending broadening the scope of your research to help you find solutions easier. The solution isn't "here is the code for you to use" the solution is "here is the general idea of how to accomplish it and write your own code"
@MarkR I guess it's really easy for me to wrap my head around the problem with a relational database. I'm just having organizational issues trying to see it in a different light.
Mark hit the nail on the head with one of his comments. If you find something that refers to doing it in C# / XNA and it says store a struct, add (whatever its called in your language) after struct
In C++ we normally use std::vector, in Java we have ArrayList, in Javascript it's just Array, but basically, they are all just kinds of resizeable array which implement an indexable-list, which is normally the most versatile thing
if I made Player have an attribute such as hair color, creating new players without subclasses would be easy. I could just change the hair color based on an entry in a list, etc
but what if one player died when he fell, and another resurrected, bad example, but proves the point. I'd have a huge conditional if...else tree if I have a bunch of players that react differently to fall()
The player would have a movement component and you could have one type of movement component that died when it fell and another that didn't (or something like that)
It is very unlikely that you're going to want to write different classes for this. You might conceivably have some composition and a little bit of polymorphism
So suppose you have one character who can fly and another who can't... you can have some MovementController or something, which can be replaced
@MatisseVerDuyn I will say a component based system can be confusing (I still don't understand it) so if you feel overwhelmed stop by and hopefully someone other than myself can clear up questions you have with component systems
ha! lol I knew I was approaching it in the wrong way. It tells me so in the first line! :) @thelinuxlich from the first link: cowboyprogramming.com/2007/01/05/evolve-your-heirachy ... "Up until fairly recent years, game programmers have consistently used a deep class hierarchy to represent game entities."
@tylerrrr07 feel free to ask there or here about ES, I like the topic a lot
@MatisseVerDuyn :)
@MatisseVerDuyn if you used something like MonoTouch for your iOS game, you could use my C# Entity System framework, it is heavily inspired by that post, Scott Bilas presentation and t=machine
@thelinuxlich I haven't used MonoTouch before. for most of the games I'm working on, I've used cocos2d... which got me into learning opengles... and then c
There's no use of accessors even though there are plenty of clear use cases, and it's filled with java style comments rather than actual C# style summary for functions.
I mean nothing bad by it, but it could really use a touchup. :P
My "gamer" name as I will call it has only been taken in one place and I wouldn't be surprised if it was by me a long time ago and I just didn't know it - Games for Windows Live