Will Vale
|
|
« Reply #1720 on: February 21, 2011, 02:55:47 PM » |
|
Apart from the crazy "we must be able to form a reference to these bits" mechanism, std::bitset looks pretty good.
@Kekskiller, if you constrain your T to built-in integral types, you can replace all the division/modular with shifts/masks. I'd be tempted to follow std::bitset's lead though, and have N the only template parameter, settling on e.g. unsigned int as the array element type.
|
|
|
Logged
|
|
|
|
Kekskiller
Guest
|
|
« Reply #1721 on: February 21, 2011, 03:34:35 PM » |
|
std::bitset maybe?
Nah, I prefer using my own routines. Why should I use something that's me zero stuff I'd want to use in the way it's implementing it. Oh and did you once take a look at STL's sources? I found some kind of bloated, much much more than implement your own one with a few lines and more than equal speed. @Kekskiller, if you constrain your T to built-in integral types, you can replace all the division/modular with shifts/masks. I'd be tempted to follow std::bitset's lead though, and have N the only template parameter, settling on e.g. unsigned int as the array element type.
I actually took a look at std::bitset and found this "interesting" line: const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD; const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
It seems that it's concept is not so different from mine one. I also thought about a fixed type, but I kinda feel bad about that (I use is for accessing very small and very large sets of ints, so it's useful to keep all options open). There are currently three variants: one with a single variable (no arrays, thus only shifting), one with a statically-sized array and one with a dynamically sized (the slowest one). I won't use the array versions for quick access (I'll stick with the single variable variant then). I only included them for settings-alike purposes.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #1722 on: February 21, 2011, 04:06:16 PM » |
|
Unity's lack of backwards-compatibility is scary. I tried to open a project I was working on last December (two months ago)and it's totally and utterly broken - would involve a lot of re-engineering to get back running. This stuff has happened before. Project file half-life seems to be about 4 months. Dock says he keeps around copies of each version/subversion of unity for editing old projects. I'm pretty worried at the prospect of having to maintain any of my unity stuff in future, but I try not to think about it too much...
Also, I didn't know that unity 3 has a totally different webplayer to unity 2 (they're separate plugins).
|
|
« Last Edit: February 21, 2011, 06:11:46 PM by increpare »
|
Logged
|
|
|
|
Will Vale
|
|
« Reply #1723 on: February 21, 2011, 05:05:19 PM » |
|
Wow, that really is scary - thanks for the warning!
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #1724 on: February 21, 2011, 09:42:08 PM » |
|
Fucking mac ports. Fucking multi-architecture libraries.
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
mcc
|
|
« Reply #1725 on: February 21, 2011, 10:35:39 PM » |
|
Fucking mac ports. Fucking multi-architecture libraries. What is the problem you are having
|
|
|
Logged
|
|
|
|
Triplefox
|
|
« Reply #1726 on: February 22, 2011, 12:12:59 AM » |
|
A feature I don't really want to bother with, but will have to do soon because not having it makes things look ugly: Separate idling units when they're sitting on top of each other. Having tried to do it without adding another indexing scheme, I decided it wouldn't work, and will now be indexing my units in all of these different ways: - By tag
- As collision rectangles
- In a sparse grid(probably a haXe IntHash)
Fortunately, there's absolutely nothing stopping me from adding this to the engine. I could not have gotten as far as I did, as fast as I did, if it weren't for my architecture working so well. Although at times I've gotten a bit scared about performance, the performance problems to date haven't come from the engine, but from what I'm doing with it(running tons of pathfinding in Flash). I also have a Happy Programmer story.
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #1727 on: February 22, 2011, 07:04:02 AM » |
|
What is the problem you are having
I'm building my program as a Tiger-friendly 32-bit powerPC/i386 package using Xcode on Snow Leopard, and the dependencies are being a bitch. Specifically, Boost (which wouldn't link on the powerPC side even when built for it) and GMP (which I'm currently building with macports). The 'file' command previously showed GMP as only having intel code (though it didn't seem to provide any of its symbols) and Boost as 'current ar archive or random library' or something like that, a cryptic message that also now comes up with the GMP libraries after I got macports building multi-architecture libs. I've just woken up and am ready to take another crack at all of it. I built a macports (rather than bjam) version of Boost last night. My most recent port commands: sudo port install gmp archs='ppc x86' platform='darwin 8' sudo port install boost platform='darwin 8' +universal (GMP's +universal only gave me intel libs, though after I switched to darwin 8 [tiger] I think it added the others as it gave the cryptic file message.) EDIT: ARGH it says that boost is only built for i386 and x86_64 EDIT 2: I'm using Fink now, it looks like it will save my butt.
|
|
« Last Edit: February 22, 2011, 08:29:40 AM by Cellulose »
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
Evan Balster
|
|
« Reply #1728 on: February 22, 2011, 10:03:43 AM » |
|
Double grump post. I've got boost working. If I can just figure out how to instruct macports to build for OS X 10.4 I'll be golden. #This builds 'universal' for 10.6, which I run; IE, i386 and x86_64 sudo port install gmp +universal
#This builds non-universal for 10.6, as in just x86_64. It silently ignores the options. sudo port install gmp platform='darwin 8' archs='ppc i386' Either way it just spits 'darwin 10' back at me. Also, fink is near-useless due to its inability to build universal binaries. I'd give up on macports too but it's the only version of GMP that appears to build properly.
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
lapsus
|
|
« Reply #1729 on: February 22, 2011, 11:33:00 AM » |
|
Boost.. what features of it do you use? Personally I'm not a very big fan of boost for gamedev.
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #1730 on: February 22, 2011, 11:38:15 AM » |
|
Me neither, but I needed the stuff in filesystem. I don't use all the "make programming better" crap.
Universal GMP is a trial of attrition. ._.
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
teomat
Guest
|
|
« Reply #1731 on: February 22, 2011, 12:17:05 PM » |
|
I need to do font rendering in opengl, I've looked around and it seems not that hard to do but I still don't want to Also I'm getting closer to having to create a (simple) GUI system. I've never done anything like that before. I'm scared (Also I'm using opentk and did not find anything premade I could use)
|
|
|
Logged
|
|
|
|
mcc
|
|
« Reply #1732 on: February 22, 2011, 01:05:44 PM » |
|
I need to do font rendering in opengl, I've looked around and it seems not that hard to do but I still don't want to Also I'm getting closer to having to create a (simple) GUI system. I've never done anything like that before. I'm scared (Also I'm using opentk and did not find anything premade I could use) Use FTGL, it's simple Google claims a C# binding for FTGL is in circulation called FTGL#
|
|
|
Logged
|
|
|
|
mcc
|
|
« Reply #1733 on: February 22, 2011, 01:08:39 PM » |
|
Cellulose, ouch, yeah, a big part of my crossplatform strategy is simply eschewing "heavy" libraries like Boost to begin with.
ports/fink are nice but I really do not tend to trust them very far. If I were in a situation where I really wanted to ensure an appropriate fat binary for a library I would build it myself so I could be sure.
|
|
|
Logged
|
|
|
|
teomat
Guest
|
|
« Reply #1734 on: February 22, 2011, 01:11:36 PM » |
|
Use FTGL, it's simple
Google claims a C# binding for FTGL is in circulation called FTGL#
Yeah, I found that here (read something about ftgl and googled ftgl c#) but all of the links on there are dead I think I'll check the code for ftgl (tomorrow) and see if I can do something myself...
|
|
|
Logged
|
|
|
|
_Tommo_
|
|
« Reply #1735 on: February 22, 2011, 02:14:25 PM » |
|
Cellulose, ouch, yeah, a big part of my crossplatform strategy is simply eschewing "heavy" libraries like Boost to begin with.
Quoted that! I always tried to be crossplatform using uber-heavy wrappers (Ogre+PhysX+Boost...) and that always resolved as a failure when everything sank over build and management intricacies. Now i'm directly using OpenGL+OpenAL with C++, and everything runs smooth on 5 platforms.
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #1736 on: February 22, 2011, 03:29:05 PM » |
|
Ended up digging up an old GMP framework embedded in some application. :\ I'm a happy programmer, if not a satisfied one.
On a sidenote, apparently SDL's provided development lib is x86_64. I'll need to compile my own version, though it won't be nearly the pain that GMP was.
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
mirosurabu
Guest
|
|
« Reply #1737 on: February 22, 2011, 05:38:50 PM » |
|
I'm grumpy that designing enemies and mini-bosses in my shmup is so tedious. Not a technical grumpiness, but it does make me feel I should code a separate editor and that in turn makes me even more grumpier because I hate coding GUI.
|
|
|
Logged
|
|
|
|
Evan Balster
|
|
« Reply #1738 on: February 22, 2011, 06:02:14 PM » |
|
So code an editor with as little GUI as possible. Make it all cryptic hotkeys and mouse motions; it's quite fun that way and acceptable for in-house tools.
|
|
|
Logged
|
Creativity births expression. Curiosity births exploration. Our work is as soil to these seeds; our art is what grows from them...Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
|
|
|
mcc
|
|
« Reply #1739 on: February 22, 2011, 06:39:47 PM » |
|
Or (maybe this has occurred to you already, but) have the properties for the bosses/enemies/etc be loaded from a text file, and have reloading the text file be done either automatically or when you hit F5.
This means you can be sitting in notepad in the next window over, fiddling with numbers, and watching the changes in realtime or on a 1-second *click*F5*click cycle.
|
|
|
Logged
|
|
|
|
|