The Communist Duck

  • Content count

  • Joined

  • Last visited

Community Reputation

154 Neutral

About The Communist Duck

  • Rank
  1. Hi. I've fiddled around, and I thought of a decent component design with XNA. I've tried to avoid the built in GameComponent for the most part. There are Components such as PhysicsComponent and RenderComponent which derive from Component. Each Entity contains a list of components (I don't see myself needing to query for a PhysicsComponent; I could just send it a message). Each Component may register to some system - e.g. the PhysicsSystem, or the graphicsSystem (I think these would be static; comment?) The World derives from DrawableGameComponent, and calls Update on each entity (which calls it on each Component) and Render on the GraphicsSystem (which has the list of RenderComponents). I don't see myself needing a hugely complex one. Feedback on it?
  2. XNA or SlimDX?

    I think I am getting C# pretty well down. I messed with it a few years back, and C++/Python experience helps. If SlimDX is a verbatim wrapper, I think I shall go for XNA. I assumed it was an XNA but at a slightly lower level. And technically it is then, just at a much lower level than I thought. Thanks! EDIT: Can anyone recommend a good book for XNA 4.0? I'd prefer to learn it right from the start.
  3. XNA or SlimDX?

    This is probably another one of those questions, but I have not found anything recent on it. That is, addressing XNA 4.0 and SlimDX March '11. I am learning C# for some fun, and want to go into 3D. I originally planned to go for XNA, but the MSDN site scared me a little. It seemed very much to say 'XNA is for Windows Phone and XBOX!'. I know it does Windows too, but still. I also remember hearing about SlimDX. It seems good, and the comparitive table seemed to slant in favour of SlimDX over XNA. However, I am not a fan of writing very low level code. Is there a decent, up to date comparison of the two, not just feature wise? And if I want to make a 3D game just for Windows, should I prefer one over the other?
  4. Unity When should I learn a new language?

    Thanks for all the replies. I have technically been programming for about 5 years, but was messing around for most of that. Heck, I only stopped really messing around (albeit more serious messing later) a few months back. I can see Panda3D, but I still feel there might be an issue if I want to make a Minecraft clone. (My goal ). I'm wanting to try out C# again (I messed for a couple of months when I was 13~), mostly since I am still not liking C++, even though I am comfortable writing it (the actual look of the code is important to me, for some reason). I guess I shall take this as a sign I still haven't found a comfortable base language..which I thought I had found with Python. I feel this post has rambled, but thank you everyone for the feedback and advice.
  5. I don't mean to start a flame war, and I am pretty sure it is fault of mine not of Python for being a high level language. I am making a tile based RPG. Needless to say, I have tiles. For display, I have a 2D list of 60*40 pyglet sprites. Each frame (currently I'm running on a wait-for-user-input system, simply to try and get it working) I will iterate through a list of tiles that I can see, and set each tile on the screen to the same type. Obviously this is going to be slow. I can't think of a better way. Here is some code: [code] def Update(self): for t, x, y in, self.height): t = tile.DebugTile1() if random.randint(0,1) == 1 else tile.DebugTile2() #this is just so I can see the results. self.window.SetTile(x, y, t) [/code] [code] def SetTile(self, x, y, tile): self.spriteList[y][x].image = self.GetTileTexture(tile) #spritelist is a list of sprites, and GetTileTexture is a caching function that stores tile textures [/code] I also tried just changing the sprite texture instead of the whole sprite, but that was actually slower. Here are the important parts of the profiling: [code] 15085326 function calls (15085306 primitive calls) in 32.166 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 32.168 32.168 <string>:1(<module>) 99 0.743 0.008 20.531 0.207 237600 0.796 0.000 11.995 0.000 120121 0.677 0.000 9.062 0.000 357721 1.487 0.000 3.478 0.000 420767 0.786 0.000 2.054 0.000 715442 0.859 0.000 1.280 0.000 1 9.674 9.674 32.168 32.168 180 0.007 0.000 1.771 0.010 237600 0.416 0.000 17.069 0.000 237600 0.646 0.000 2.174 0.000 [/code] I am no good at reading these, but it seems a lot of time was spent in the update loop - so I doubt it's a drawing issue. To get these, I just hit the keyboard somewhat to force it to update, so there are times of idle and times of quick updating. Almost all the time in Update was in SetTile, so I assume my method of keeping things on the screen was a bad idea. I doubt blitting images is going to be any faster than a sprite batch. Any ideas? (Python/pyglet, I do not want to go to Pygame)
  6. I apologise if this post is rather vague or doesn't have an obvious point to it. Hopefully I can tl;dr it. I've been learning/using C++ for about 1 1/2 years, and Python for 6 months. I'm finding myself a great fan of Python, due to its simplicity compared to C++'s general bloated-ish feeling. Recently I've been working on an RPG type game in Python. It's another one of the projects I start for a month or so, then just abandon. I don't want to abandon it, and I've documented it and stuff to try and keep myself going. It's not that it doesn't interest me, just other ideas have crept up. Same with my programming language I was writing. I now want to fiddle around with 3D stuff. My assumption is that Python would not be optimal for this, namely due to the speed issues. I could go back to C++, but the small amount I've fiddled with it recently, it feels horrible to write in, to put it bluntly. I was considering using this opportunity to maybe pick up another language like C# (which I dabbled in a few years back). I don't think there would be a downside to it: it would help me have a wider understanding of programming, wouldn't hurt any uni/career chances (I am still a..high school? student. I don't know how UK maps to the US), and would allow me to still have lots of fun programming. However, I start to wonder if I'm following the same trend as my projects: pick them up, play around for a bit, and abandon without finishing them (or in this case, using the language for a long time). Or I could be swatting at hot air. tl;dr Is there a downside to learning new languages quickly (i.e. <1 year apart)? As a minor point, how can I stop myself giving up on projects for 'that new idea'? EDIT: For the record, I plan on only really developing for myself and maybe releasing games I make to friends. So Windows development is my primary concern.
  7. Hi. I've started a hobby project somewhat more seriously: documented, using github for hosting, etc. I haven't really touched on version control before. I don't think git was a good idea to start with, but it feels nice to use. I was wondering about how to organise branches and the repository in general. (This is a hobby engine, which I will develop along with/for the game I have planned out. It may be released as an engine/library later.) Whilst generally talking to people about how to use git, I learnt that I should have a master branch, where code always compiles/runs; and then a development branch for more nightly usage; storage, pretty much. They also started talking about feature branches, milestone branches, and the like. These confused me. Would two branches, one for finalised code, and one for development, work simply enough? Or could I make do with just the one?
  8. Importing Modules in Python

    [code]import antigravity[/code] Did you know that actually works? You must have some weird error, since to import module foo, you do: [code]import foo[/code]
  9. No pixel is an island...

    R.I.P. Steve the pixel.
  10. Pygame vs Pyglet vs ?

    Thanks guys! I think I shall go for Pyglet. I've tried SFML before, and I'm not too much of a fan of its architecture. Though knowing it has a Python binding is nice. ;D
  11. Pygame vs Pyglet vs ?

    [quote name='SiCrane' timestamp='1298481112' post='4778027'] Inactive isn't quite the right word for pyglet. They don't produce numbered releases very often, but the code base is updated regularly. If you use hg to browse their repository, you'll see the last update was actually only six days ago. [/quote] Oh, I see. I didn't think to check those sorts of things.
  12. Pygame vs Pyglet vs ?

    I'm still thinking about which library to use for my python game. Pygame seems to be more game oriented, but it does have the C bindings, which don't make it amazingly nice IMHO. Pyglet seems to be more pythonic/pure python, and definitely openGL rather than a software renderer like SDL (?). However, it seems to be inactive(last update Jan '10). Are there any other python libraries I should look into? Thanks!
  13. Should I format when installing a new OS, and a couple of x64 questions

    [quote name='Luckless' timestamp='1298035601' post='4775842'] My version of Win7 did not clearly prompt me with format options when installing over a copy of XPpro. This was mildly annoying to say the least, as I had not actually cleared the drive, so it spent well over an hour shuffling things around trying to make room for Windows 7. I don't know if the options simply aren't there, if I missed a menu, or if the MSDNAA installer was just different. I strongly suggest using a tool to format then, but have no suggestions as to which. [/quote] Do you mean a tool to format BEFORE I install, or in the process of?
  14. I recently picked up Windows 7. I plan on installing the 64-bit version (then I can fully use my 4GB ram). However, I have a few questions since I've never done anything like this before. 1)If I just install it from the disk, will everything be formatted on the existing drive? 2)If it doesn't automatically, should I do it manually (and how)? I have backed up everything of importance. 3)By going to 64-bit, is there any chance of some stuff not working? I've heard things about drivers not working, but the only stuff I have that might be affected is a 3 1/4" floppy drive, a graphics tablet, and a USB keyboard. 4)Will I need to deactivate things like Office 07? 5)Is there anything else I should know about, either from XP->7 OR from 32->64? Thanks!
  15. colored pencils

    I don't think this is really on topic. Make sure you have a high quality scanner, too. Any decent hobby or art shop should have some. Faber-Castell are quite nice.