However, the amount of tiles that has an overlay is really small. I mean... REALLY small. Which means I'm wasting millions and millions of bytes on "OverlayType.None".
If I remove the overlay byte, and instead turn overlays into a prop type, each overlay would take more memory, but I'd save a ton of memory on not having so many empty overlays.
3 bytes fits 357,913,941 tiles in 1024mb of memory.
4 bytes fits 268,435,456 tiles in 1024mb of memory.
That's almost 90 mil more tiles. And ~250mb of memory saved if I set the tile limit to 250 mil.
Yeah, I'm definitely going to do that. It looks like I'm moving more and more towards a Minecraft inspired implementation, with generating chunks as necessary and then saving those chunks to a file.
@MindWorX You can expand a tree by adding a new root and putting the old one under it. So it should work as good or as bad as in any other case where you'd use it.
So if I have an Asteroids-like ship, in space, that can accelerate, which slows down by adding friction in the form of: "velocity += acceleration - friction*velocity", how do I calculate how far it will go if it stops accelerating and just slows down?
@MindWorX I'm not too familiar with spatial hashing, so I've looked up an implementation here: conkerjo.wordpress.com/2009/06/13/… The main difference between that and an expandable quad tree (mentioned by Martin) is that quad trees allow arbitrary area-based lookups.
2
So, I can say: "Give me all entities within 100 units of my location", or... "Give me all entities within 500 units of my location". The size doesn't matter.
Quad Trees are almost like binary trees, but in two dimensions
@ErikPerik :If your (partially differential, BTW, but most simplifications of Navier-Stokes are like that) function for velocity has an exact solution, you can just use that. If not, you can use numerical integration methods.
Suggestion: Assume the ship simply stops (whatever the hell that means in space ...) after its velocity is small enough to get rid of the infinity.
yeah, the first app I plan to make could be on absolutely any platform. The second app requires multi-touch, and I'm not really at liberty to speak about it, it's that awesome (and the idea isn't mine to share)
on design I guess, patterns, I wonder if it's easy to read and work with, etc, while keeping it small and independant from other code
user4704
Not enough context.
user4704
Why INT32 and dword/word/byte? It's inconsistent. Using underscores to lead nonlocal identifiers is often a bad idea as it can potentially run afoul of reserved words. That's about all I can say objectively.
because I'm not sure how I'm gonna deal with versions so this way I have both to choose... the macro would help changing the function to another one which may support a newer data format
some things are related to how the data is stored in the files and the like, so I can't just change the code and etc, I have to keep some code for opening older files and such
I'm not sure why I use those _ for the structure declarations, I will remove them now
Also, I came here asking for advice: after making an amateur MMO, how can I make it more popular? I just want to know that, but I'm not sure if it's even good enough to play...
@Bane step 1: get the game to a "playable" state. (also get a few testers) step 2: polish it as much as you possibly can (usually this means improving the graphics and cleaning up major bugs). step 3: if your game is good, your players will help spread the word. step 4: write press releases about how awesome your game is, send to every game review/news site out there possible
also, I suggest trying to have people test in person. Over the internet works, but if you can physically watch people interact with your software, it will make the feedback carry more weight
Thank you guys! I already have many people heated up for it (I once got 9k+ hits on my blog in a day, but just because someone Stumbled Upon it), but main testers will be my class mates.
I'm just afraid that I might disappoint them... :( Or maybe they aren't even expecting much (hopefully), because I regularly post videos of it on my blog.
Yeah, I need to that as well... So many ideas, I'm designing while in school and programming at home. Once I over-did it, I was up until 3AM and had to wake up for school at 6AM, it was a tough day no coffee could save me....
Well, Kelvin makes sense in terms of science, the best choice for me after that is Celsius because it's the same thing scaled down to more understandable numbers... But if you grew up with F then I understand.
@Bane Some older architectures used byte for quantities of 6, 7, or (especially) 9 bits, and the PDP-10 supported bytes that were actually bitfields of 1 to 36 bits! These usages are now obsolete, killed off by universal adoption of power-of-2 word sizes.
Guys, bye now, it has been nice and I'll probably be here tomorrow as well, but as I said I have school in six hours and I have to get some rest + work on my game.
(thank's for that site Jimmy, seems interesting, I'll read up)
" During the early 1960s, since with just only one bit more an eight bits allows two four-bit patterns to efficiently encode two digits with binary coded decimal, the eight-bit EBCDIC (see EBCDIC history) character encoding was later adopted and promulgated as a standard by the IBM in the System/360."
heh, well, there have been studies (don't ask me for a link) that have shown that wikipedia is just as bad, or better than printed encyclopedias, except more up to date