• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

j stagner

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

250 Neutral

About j stagner

  • Rank
    Member
  1. It may be non-trivial, but as a preprocessing step it's not bad. Here's another good link: http://cgm.cs.mcgill.ca/~orm/rotcal.html Look for "Minimum area enclosing rectangle" on the left. There are also applets to demonstrate.
  2. Quote:Original post by Thevenin You sure you don't have to declare the struct as sequential memory? [dead] I did not have to in my program... I copied that straight out of a program that was released nearly a year ago, full QA cycle, etc. I know it doesn't really fit your situation, because it has a different purpose (turning a bitmap into a collision mask for pixel-perfect collision detection) and is incomplete as posted, but it works just fine. You are having problems with using a struct like that one? The only problem that I had was making sure that I had the fields declared in the proper order. I'll post the class here for more context, and maybe tomorrow I can find some time to whip up an example that actually does what you want, if you would like. #region CollisionMask class /// <summary> /// Creates a pixel mask, based on transparency, for use in /// pixel-perfect collision detection. /// </summary> internal class CollisionMask : IDisposable { #region Private variables private Bitmap maskImage; private Graphics maskGraphics; private Sprite sprite; private byte[] pixels; private int width; private int height; private bool mustRegenerate = true; #endregion #region Constructor public CollisionMask( Sprite sprite ) { this.sprite = sprite; } #endregion #region Public properties public int Width { get { return this.width; } } public int Height { get { return this.height; } } public bool MustRegenerate { get { return this.mustRegenerate; } set { this.mustRegenerate = value; } } #endregion #region Public methods public void GenerateMask() { this.mustRegenerate = false; this.width = sprite.Bounds.Width; this.height = sprite.Bounds.Height; int length = this.height * this.width; if( this.pixels == null || this.pixels.Length < length ) this.pixels = new byte[ length ]; Rectangle bounds = new Rectangle( 0, 0, sprite.Bounds.Width, sprite.Bounds.Height ); #region Ensure that the mask bitmap is large enough if( maskImage == null || maskImage.Width < width || maskImage.Height < height ) { if( maskImage != null ) { maskGraphics.Dispose(); maskImage.Dispose(); } // Allocate a new bitmap to use when calculating the // collision map. maskImage = new Bitmap( width, height, PixelFormat.Format32bppPArgb ); maskGraphics = Graphics.FromImage( maskImage ); } else { // Clear any previous bitmap data, to keep the transparency // information from the sprite accurate. maskGraphics.Clear( Color.Transparent ); } #endregion #region Draw the sprite to the mask bitmap // Note that we have to allow the Sprite to draw itself, because // it may be scaled or rotated. We use the translation matrix // to ensure that it is drawn in the upper-left corner of our // work area. Matrix matrix = new Matrix(); matrix.Translate( -sprite.Bounds.X, -sprite.Bounds.Y ); maskGraphics.Transform = matrix; sprite.Draw( maskGraphics ); #endregion unsafe { BitmapData bitmapInfo = maskImage.LockBits( bounds, ImageLockMode.ReadOnly, maskImage.PixelFormat ); PixelData* start = (PixelData*) bitmapInfo.Scan0; int rowLength = bitmapInfo.Stride / 4; fixed( byte* mapStart = this.pixels ) { byte* mapPixel = mapStart; for( int y = 0; y < height; y++ ) { PixelData* bitmapPixel = start + (y * rowLength); for( int x = 0; x < width; x++ ) { *mapPixel = bitmapPixel->alpha; mapPixel++; bitmapPixel++; } } } maskImage.UnlockBits( bitmapInfo ); } } public byte GetPixel( int X, int Y ) { return this.pixels[ Y * width + X ]; } #endregion #region IDisposable Members public void Dispose() { this.sprite = null; this.pixels = null; if( this.maskImage != null ) { this.maskImage.Dispose(); this.maskImage = null; this.maskGraphics.Dispose(); this.maskGraphics = null; } } #endregion #region PixelData structure private struct PixelData { public byte blue; public byte green; public byte red; public byte alpha; } #endregion } #endregion
  3. I have discovered that sometime during the last few years, I've somehow migrated towards always using the "this" keyword for class-level members, be they variables, methods, whatever. You can't get more explicit than that, and it's quite readable for me. Also the workflow is nice because you get the Intellisense list by doing so. Of course, VS2005 has *much* better Intellisense support, so that is becoming less important, but I still prefer to use the this keyword.[wink]
  4. Quote:Original post by Oluseyi Iron Python and Windows Forms I haven't used Iron Python because I am not familiar with Python, but I've been looking at Iron Python information a lot lately for work-related reasons, and it looks quite cool.
  5. Quote:Original post by Thevenin Eeek, I really don't want to have to start declaring byte alignments; I'm pretty sure I need todo something like this... [byte alignment = 1] struct xRGB { byte TheRed; byte TheGreen; byte TheBlue; } [hide unsafe warning] xRGB* TheRGB; I've used code similar to the code below which is copied/pasted from working source, but completely out of context here and won't work for you, but may illustrate how you might access the pixel data using UnlockBits(). If that's not helpful I may be able to cobble a working example together... private struct PixelData { public byte blue; public byte green; public byte red; public byte alpha; } unsafe { BitmapData bitmapInfo = maskImage.LockBits( bounds, ImageLockMode.ReadOnly, maskImage.PixelFormat ); PixelData* start = (PixelData*) bitmapInfo.Scan0; int rowLength = bitmapInfo.Stride / 4; fixed( byte* mapStart = this.pixels ) { byte* mapPixel = mapStart; for( int y = 0; y < height; y++ ) { PixelData* bitmapPixel = start + (y * rowLength); for( int x = 0; x < width; x++ ) { *mapPixel = bitmapPixel->alpha; mapPixel++; bitmapPixel++; } } } maskImage.UnlockBits( bitmapInfo ); } [Edited by - j stagner on December 22, 2005 12:41:36 AM]
  6. It is generally not too much of a hassle to do get a machine re-activated, although last time I had finally gotten frustrated enough with all of the questions to tell the lady "Look. This machine was fully licensed and working an hour ago, and now it's not. I'd like that resolved, please", and the response was nearly immediate and quite friendly. The other two or three times were no hassle whatsoever. Well, apart from having to call them, anyways ;)
  7. Quote:Original post by Basiror What about the MONO project for linux? did they implement a good .net framework? or did microsoft already try to stop it? MONO is okay, though there are huge portions still yet to be implemented (at least in the latest version I have). I am often puzzled as to why people would think that Microsoft has any interest whatsoever in stopping MONO. I mean, they submitted the CLI as a ECMA standard, released the source itself (as Rotor, or Shared Source Common Language Infrastructure, at MSDN, which directly runs on FreeBSD and Mac OS X. They have not ever made an effort to stop or hinder development on MONO to my knowledge. In fact, looking at the MONO source you will see that quite a bit of it is either directly from Rotor or slightly "massaged". On the subject of the OP, I started my development career as a C++ programmer, and have always felt that I am a better programmer for having had that experience. As mentioned by some other posters, I have written custom memory managers, proprietary file systems and database engines, etc. I feel that the deeper understanding of the "internals" makes me the programmer I am today. I have now ben using C# almost exclusively since it's public release, except when doing web work, but I don't regret my years of C/C++ at all.
  8. Quote:Original post by TrueTom Used to have this problem too. Running the Visual Studio Setup and choosing Repair solves this problem. (My guess is this happens when VS isn't the default app for editing cpp files anymore) It also happens sometimes when uninstalling add-ins, and presumably for other products that "integrate" with Visual Studio.
  9. Quote:Original post by darkzim No, I use the Directx (JT) exporter for milkshape in DirectX9. It is also better than the other dx milkshape exporter because it has more options. And the other one doesn't work ;)
  10. Quote:Original post by Alpha_ProgDes thanks, both of you. let me put it like this. if on my resume, I were to say that I have a MS Cert in C# and VB.net but no CS degree (yet, or even an AA in CS) will I be able to compete with someone who has a CS degree? aside from that, will a company hire me if I only have MS Certs? Maybe. I have no formal college training at all, but have been an MCP since 1998, and I manage to get some pretty good jobs. So, it's hard for me to say whether it'll be viewed as competitive with a CS degree, but I can state for a fact that some people will hire candidates with MCP and no degree. I've worked with people who had one or the other (or both in some cases) and didn't know squat about the real world, as well as people who were among the best developers that I've personally met who had neither. If you have the time, resources, and motivation to get either or both (preferably), I would strongly recommend it. Also consider getting more than just the C#/VB.NET certs, such as the SQL cert mentioned by another poster, because employers definitely look for good depth and breadth of skillset.
  11. Well, in my opinion the only thing that makes you more "hirable" is your level of skill and experience. Seriously, though, Microsoft Certification *does* seem to have worked quite well in getting me more interviews, which is a pretty important first step ;) I've heard both sides from many different people, but I'd say that while the certification doesn't really "prove" anything, it does seem to have served me well personally. When a potential interviewer is sitting and looking at a stack of resumes, every little thing can serve as a part of the decision to keep it or round-file it. In the great scheme of things, on-the-job performance is the only thing that really means a damned thing in this industry, but you need to get yourself in a position to demonstrate that by getting the interview first, and it's my opinion that certification can help with that. My $0.02
  12. I have an obsession with refactoring my code. I rename/restructure classes, methods, and variables constantly. I'll rewrite entire subsystems because I no longer (or never did) like the way I did them. No matter how happy I am with code I wrote today, I know for a fact I'll like it better tomorrow, after a little quality time. I've been doing this for more than twelve years, so I know from many experiences that I can, for instance, rewrite the entire data access layer in a short time with minimal changes to dependant classes, and check it in tomorrow. I'd rather do that than absolutely *ANY* "special case" coding, as I HATE special cases! Drives my coworkers freakin' crazy at times ;)
  13. Quote:Original post by Silvermyst I screen my calls. Me too. I've started answering "Unknown Caller" calls with "Who are you and what the f*** do you want?" I'm normally quite polite on the phone, but I've truly HAD ENOUGH!!!
  14. I have two friends who are getting several telemarketers per month (and the rate is increasing) calling their cells, who have told my friends that if they don't want this then they must register their cell phone numbers for a Do Not Call registry as well. Dunno whether they (the telemarketers) are full of crap, but they justify their calls by saying that recently enacted legislation enables them to call unregistered (not in the No Call List) cell phone numbers. I've seen the telemarketing calls as they happen, so I know that they really are happening. What I don't know is whether my friends have any recourse.
  15. Unfortunately, despite having been on the "No Call" list for quite some time, I still get roughly 10-15 calls from telemarketers and other companies per week. Of course, this is down from the 7-10 *per day* that I was getting before, but the simple fact is that the "No call" list is either blatantly ignored or some companies have found a way around it. For instance, it apparently (as I was told) doesn't apply to charities and not-for-profit companies. Also, if a company has a previous business relationship with you (or someone who used to have the same phone number, apparently) they can still call. Case in point: Last night at 8:30pm I received a call from an autodialer, which I categorically hang up on. 5 minutes later, I get a human asking for "David Alexander". I tell them, "I don't know who the hell sold you this phone number, but there's been no David Alexander here for the four f****** years I've lived here." They say, "Is this (XXX) XXX-XXXX", I say "Yes it is. You have the wrong number. Again." They say, "Sorry, sir, we'll take your number off the list". It's the same damned company that still calls three times a week without fail. What crap. I, for one, am extremely glad they (DirectTV) got fined, and I believe they got off easy. I had almost gotten to the point where I thought the "Do Not Call" rule was simply unenforced/unenforcable.