• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

841 Good

About Nytegard

  • Rank

Personal Information

  • Interests
  1. The problem was, while my explosion displays at a 1:1 ratio, internally, it's being calculated @ 16/9:1. This is mainly an issue for tunneling. Squish the coordinates to 1:1, and voila, you have a circle again. The other stupid improvement I forgot is that you can precalculate when the missiles are going to blow up to avoid unnecessary calculations in the hit detection. The instant you fire, you know when and where your missiles are going to explode, and thus have all the necessary information to determine all known future hits of enemy missiles/crafts/bombs. An enemy missile lasts past time t? Explode at X(t), Y(t), rather than tons of continuous hit detection checks. Just simple stuff like this that I didn't think of during the initial creation. I mean, my game works, but there are so many more optimizations that could be added that would require a rewrite of the logic.
  2. It's all a learning experience. I made the mistake of starting backwards, and having no plan for the actual game. By the time I got to the actual game portion, I came to realize my mistake. But it's all good. Fortunately, the resolution itself can easily be changed, but I found a cheap and easy solution for my problems, though it is a hack. Just scale everything to 1:1 for hit detection, and easier hit detection for fast moving objects as I have a circle. (Not that anyone would ever really need to worry about that scenario, but bug free is still better than a bug that exists even if no one will ever see it.) I'd like to think of this more as a starting point for a complete rewrite.
  3. Since I finally have/had a few days to work on something of my own, why not this? It's the most barebones version of any submitted, and I'm still trying to track down bugs before I focus on adding any features. Still trying to track down a few memory management bugs. Built in Visual Studio 2017, source included. It's a Win 10 64-bit application. Requires Direct2D. Use 1, 2, 3 to fire, and arrow keys to move. Escape for menu and Enter for confirm. http://www.behindtimes.com/nytegard/media/d2dtest.zip
  4. It's been awhile since I've been on this site. Been busy at work, but as with all contracting, sometimes work gets light, which is the case as of the new year. So I saw this challenge, and thought it might be fun to brush up on my skills. I've been working mainly with embedded systems and C#, so I haven't touched C++ in awhile, and when I have, it's been with an old compiler, that's not even C++11 compliant. So, I installed Visual Studio 2017, and decided to make the best use of this. Time is short, and I don't exactly have media to use, so I decided to just go out and start to learn Direct2D. I have little experience with any modern form of C++, and zero experience with Direct2D and XAudio. Whereas I didn't mind learning Direct2D, I fully admit XAudio presented a bit of problems. In the end, I blatantly stole Microsoft's tutorial and have a barebones sound system working. And unlike the Direct2D part, I didn't bother to spend much time learning what it does, so it's still a mystery to me. I'm not entirely sure I released everything correctly. The documentation said releasing IXAudio2 would release objects, and when I tried to manually delete buffers, things blew up, so I just let it be. There are most likely memory leaks there. As you can plainly tell, this is by far the worst entry in the challenge. This is as much of a learning experience as an attempt to get something out the door. I figured, if I couldn't be anything close to modern, at least be efficient. And I failed at that miserably. Originally I wrote this in C. Excluding the audio files, it came out to a whopping 16 KB in size, and memory usage was roughly 6 MB. And then I decided to start to clean up my spaghetti code (I said start, never said I finished), and every time I thought I was getting more clever, the program grew in size and memory usage. As of right now, it's 99 KB and takes up roughly 30 MB RAM on 720p resolution. I haven't really checked for memory leaks yet, and I'm sure they exist (beyond just the audio). In reality, I'd prefer to clean up a lot of the code. (And I found a few errors with memory management, so I need to track down where I went wrong. I removed allocating memory for the time being and pushed everything onto the stack.) The other thing is, this code is ugly. Towards the end, I just started taking a patchwork approach rather than keeping it clean. I was originally hoping for modularity, but that got destroyed later on. And I'd love to replace the pointers that are thrown liberally throughout the code with smart pointers. Unlike the other entries, I only have missiles for the gameplay. I didn't include UFOs, airplanes, smart bombs, nor warheads. I just don't feel I had enough time. Yes, there's still a couple weeks to go, but I'd prefer to cleanup what I have than add new features. And unfortunately, I was a bit shortsighted, which caused problems later on. There are multiple places where the code is far more verbose than it needs to be, because I wasn't properly focused on the correct areas. I wanted to make it scalable, and I focused making the game a 1:1 ratio internally, yet displayed 16:9 to the user, which caused massive problems later on. I ended up having to do math on pretty much every piece of graphics and game logic whereas if I had just displayed it as 1:1, or handled the internals in 16:9, I could have shaved off a thousand lines of code. And it also caused problems with hit detection, which is another reason I didn't bother adding in anything but missiles. The hit detection was a mess. I had everything mapped out. The game was going to work whether a missile went 1 pixel a second, or 1000 pixels a nanosecond. Calculating moving objects and collision with circles or boxes is easy. Unfortunately, I was using ellipses. And while there are formulas for that, I'll admit my eyes started to glaze over at the amount of math that would be required. In the end, I decided to leave it buggy, and only detect if it was currently in a static ellipse, which is easy and fast enough to calculate. I mean, I guess if the program freezes up, the user was going to lose a city/silo anyway, or lose it if the missile was traveling at light speed, but it's still a bug, and still annoys me, especially since everything else was calculated regardless of what the user sees. (*EDIT* Thinking about this more, the solution was right in front of me the entire time. Just squish the world back to 1:1 and do the hit detection that way). Controls: 1,2, and 3 control the missiles, and the arrow keys control the cursor. Escape for the menu, and Enter for selection. I've only tested this on Windows 10, as I'm pretty sure it requires those libraries. It's a 64-bit executable.
  5. I'm changing the resolution and have multiple monitors and running full screen.  There's several seconds of delay where the screen is black.  I tried SDL_WINDOW_EVENT_SHOWN, but that was returning almost immediately while I was still waiting for the screen to actually display.  I'm looking for an efficient way of knowing when to start actually running the application rather than putting up a delay as a hack.  (I also queried all the Window Events and nothing is being called around the time when the screen returns to a drawable state).   *EDIT*   I only have this issue with multiple monitors.  If only using one monitor, everything works as expected, or if I use a window and not full screen, everything works as expected.
  6. Who are your developer heros?

      I certainly wouldn't say I idolize a developer, but I can understand having a developer hero.  For me, it is probably Roberta Williams.  Her games are pretty much what inspired me to go into the computing field.
  7. What game type do you prefer and why?

    Honestly, I'm not a fan of action games.  I prefer more intellectual games such as puzzles & adventures (not action/adventure, that's a completely different genre).  Think Lucas Arts & Sierra games of old, or The Last Express (similar games which are sorely missing from app stores).  I just like to take my time and play on my schedule and not the games.  As for dimensions, I prefer 2D.  I can only play 3D games for so long before I get nauseous and I also tend to find that 3D gameplay is too simplistic for my taste.  (I don't mind 2D gameplay with 3D graphics though).
  8. OK, I've made a few changes but there's massive flickering on the reshape.  If I force a redraw without CVDisplayLinkIsRunning, everything draws correctly, but moving the splitter window and other resizes come to a crawl in speed.   (NSOpenGLPixelFormat *) createPixelFormat { NSOpenGLPixelFormatAttribute attr[] = { kCGLPFAAccelerated, kCGLPFADoubleBuffer, kCGLPFAColorSize, 32, kCGLPFADepthSize, 16, 0 }; return [(NSOpenGLPixelFormat *)[NSOpenGLPixelFormat alloc] initWithAttributes:attr]; } - (id)initWithFrame:(NSRect)frame { NSOpenGLPixelFormat *pixelFormat; pixelFormat = [self createPixelFormat]; self = [super initWithFrame:frame pixelFormat:pixelFormat]; if (self) { } return self; } // This is the renderer output callback function CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now, const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext) { CVReturn result = [(__bridge OpenGLHelper*)displayLinkContext getFrameForTime:outputTime]; return result; } - (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime { @autoreleasepool { if ([self lockFocusIfCanDraw]) { // Add your drawing codes here NSRect curFrame = [self frame]; [self drawFrame: curFrame]; [self unlockFocus]; } } return kCVReturnSuccess; } - (void) prepareOpenGL { [super prepareOpenGL]; // Synchronize buffer swaps with vertical refresh rate GLint swapInt = 1; [[self openGLContext] makeCurrentContext]; [[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval]; CGLLockContext([[self openGLContext] CGLContextObj]); if (nil != m_RTextures) { [m_RTextures LoadTexture]; } glEnable( GL_TEXTURE_2D ); // Enable texture mapping glShadeModel( GL_SMOOTH ); // Enable smooth shading glEnable(GL_DEPTH_TEST); glEnable(GL_LINE_SMOOTH); glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); CGLUnlockContext([[self openGLContext] CGLContextObj]); // Create a display link capable of being used with all active displays CVDisplayLinkCreateWithActiveCGDisplays(&displayLink); // Set the renderer output callback function CVDisplayLinkSetOutputCallback(displayLink, &MyDisplayLinkCallback, (__bridge void *)(self)); // Set the display link for the current renderer CGLContextObj cglContext = [[self openGLContext] CGLContextObj]; CGLPixelFormatObj cglPixelFormat = [[self pixelFormat] CGLPixelFormatObj]; CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat); // Activate the display link CVDisplayLinkStart(displayLink); } - (void) reshape { //[super setFrameSize:newSize]; NSRect rect; [super reshape]; CGLLockContext([[self openGLContext] CGLContextObj]); [[self openGLContext] makeCurrentContext]; [[self openGLContext] update]; rect = [self bounds]; glViewport(0, 0, rect.size.width, rect.size.height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, rect.size.width, rect.size.height, 0, 0, 100.0f); CGLUnlockContext([[self openGLContext] CGLContextObj]); // Ignore if the display link is still running if (!CVDisplayLinkIsRunning(displayLink)) { [self drawFrame:[self frame]]; } } - (void)drawRect:(NSRect)dirtyRect { // Ignore if the display link is still running if (!CVDisplayLinkIsRunning(displayLink)) { [self drawFrame:dirtyRect]; } } - (void) drawFrame:(NSRect)dirtyRect { CGLLockContext([[self openGLContext] CGLContextObj]); [[self openGLContext] makeCurrentContext]; glClearColor(0, 0, 0, 255); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); for(NSObject<GraphicsProtocol> *GraphicsObj in m_objectArray) { [GraphicsObj Render: dirtyRect]; } CGLFlushDrawable([[self openGLContext] CGLContextObj]); CGLUnlockContext([[self openGLContext] CGLContextObj]); }
  9. How does Google know about my GameDev.net profile?

    If you're paranoid about your information getting out, that's about the last thing you should do. Typically, if I recall correctly, the number one name a person typically looks for on search engines, when you remove celebrities, is their own name.
  10. So, windows 8?

    [quote name='Radikalizm' timestamp='1355578172' post='5010934'] One thing that bothers me though is that the modern UI can only work on one screen at all times, so if I have the media player app docked to the left of my leftmost screen and open up the start menu or the side bar (or whatever they call it) on my rightmost screen, the app will suddenly switch screens, which gets really annoying after a while. [/quote] I've had severe issues with multiple screens and Windows 8, particularly when trying to view video on the secondary screen. Many applications just seem only to work on my primary monitor. Hopefully that's just an NVidia problem. As for boot times, I guess I'm just fortunate to have had a great PC when I had Windows 7, that the upgrade to Windows 8 really wasn't anything noticeable for me. It boots up about 1 1/2 seconds faster than Windows 7. Definitely get the start bar back if you get it. That being said, I'm honestly not too thrilled with the OS. The Metro interface is now cluttered with executables, even if they're the uninstall program that would never be shown on the desktop. And even things such as turning the computer off before you have the start button is not a 1 step affair. Yes, there are ways to alleviate both of the above issues, but a solid OS should not require intervening steps, but work right off the bat. This is an area where Apple does things right imho. All too often the UI gets put on the back burner, because management seems to think anyone can make one, but there's a difference between a UI and a good UI. And making a useful UI is an art.
  11. Next-Gen Gaming PC?

    [quote name='ChaosEngine' timestamp='1354046484' post='5004642'] Well, right now, it's starting to look like the "next gen gaming pc" [url="http://semiaccurate.com/2012/11/26/intel-kills-off-the-desktop-pcs-go-with-it/"]won't actually exist[/url] (or at least, not in it's current form) [/quote] [quote name='samoth' timestamp='1353328818' post='5002324'] [quote name='Hodgman' timestamp='1353288437' post='5002189'] In 3 years time, a lot of people will have the same PC they have right now, so don't get too optimistic. [/quote]This, or an iPad. I'm more concerned about PC becoming less and less common than what silly specs it will have. Who needs 32GiB for a game? Few present games truly need something bigger than a single mid-class graphics card and few use the major part of memory on present day machines. Few people really have a need for running Skyrim with maximum settings on dual WQUXGA stereo displays at 600fps. For something kind of "reasonable", a present-time $150 graphics card, a 2-3 year old CPU, and 4-8GiB of RAM work just fine. [quote]1000W PSU[/quote]This is what the 17 year old experts in specialized builder shops are trying to sell to you [i]right now[/i], if you have them build a PC having a CPU with a TDP of 77W, a graphics card with a TDP of 110W, and a SSD with a TDP of 2W. Obviously typical mainboards consume upwards of 700W, because hey, the experts tell you that you need this. Or that's what you need for charging your mobile on USB... [/quote] In terms of a gaming PC, I think we've hit near the top of the line for at least the next decade. Laptops have surpassed desktop ownership, and tablets look to be on their way to surpassing both fairly quickly. Neither tablets nor laptops are anywhere near the power of the desktop, but that really doesn't matter. It's about money, and for most people, a 7 year old console is good enough for video games. Why would companies want to invest millions to cater towards a minute audience in terms of actual profit? I think tablet technology will have to change somewhat, but that's the way of the future. Sooner or later, it will pass a stagnating PC in terms of capabilities, at which point, the PC as we know it will probably die off.
  12. Diablo 3 representing the future of Anti- piracy?

    [quote name='FLeBlanc' timestamp='1338404205' post='4944749'] I hear D3 does have gambling. They call it blacksmithing, and it's shitty and expensive and not worth leveling. [/quote] I wouldn't know about that. While this is also tied to the AH apparently, and the odds of getting something good are slim, at least you're guaranteed an item of minimum stats. Through cowardice and other tactics (I basically forgo the elite monsters and rush to the boss now and just kite them to death), I've managed to progress my monk pretty far. Yet it's frustrating that I need at least Act 3 gear of the next difficulty level to properly gear for this difficulty level's Act 1 when it comes to random drops. At least with the Blacksmith, I can be guaranteed of acquiring a proper leveled item, even if the stats are horrible. Someone else made this statement, and I honestly have to agree with the person, that the game seems to be less "Diablo 3" and more "World of Diablo", only without the monthly subscription fee, in terms of how the gameplay feels so far.
  13. Diablo 3 representing the future of Anti- piracy?

    I pretty much agree with Servent of the Lords response about the future of this anti-piracy and where gaming is going. I honestly don't think it's limited to PC's though. As for cheaters, there are already people with 100 million+ gold. Do you honestly think they got that through legitmate game play, or even just stealing other peoples comprimised accounts? Now, as far as the auction house goes, I'm torn. On one hand, I like the idea of a real money auction house. It gives dedicated players (who seem to treat certain games as a second/third job), a way to increase revenue, even if for a little bit. Done correctly, yes, it should hurt the game economy to a certain extent. That itself though, should not punish players who choose not to use the AH (such as hardcore players). And it would provide a bit of revenue to Blizzard, while impairing the illicit gold/item farming sites (often which then infect the PC's with who knows what, given the amount of people complaining about having their accounts comprimised). On the other hand, the way Blizzard has implemented it, or will implement it, is far worse imho than the always on DRM. And sadly, this is a direction I see video games going, and not just Diablo 3. It's not just about the game anymore, or even an expansion pack or two. And it's not just enough to nickel and dime players with DLC, all of which is still limited in the revenue. Now, the game is made significantly harder, that progression is less about playing the game, and more about your real life bank account. As a person on the Blizzard forums posted, it's a Zynga like strategy of progression through purchases. Make a game rely significantly more on grinding than the predecessor, and nickel and dime them continuously if they want to be able to progress through the game. After all, the auction house is an unending supply of newer and better items, and all Blizzard has to do is introduce more content, and at the same time, require some new quests to require specific, but different, skill sets, which will mean the AH has to be used even more. Sure, it's a gold now, but when the RMAH comes out, who's going to want to sell stuff for fake gold when they can earn real dollars? Another example of this is the Tales series on the consoles. Purchase gold and experience for real money. Sure, it's one time only, but I can see MS & Sony and Namco coming to an arrangement on the next gen to give recurring DLC. JRPG's are just a magnet for this type of scheme. Make the game just a little more grindy (monsters give just that much less xp and gold, even later on), and give what seems to be cheap deals in terms of money vs time to get ahead without devoting 30+ hours. Psychologically, micro-transactions are hard to pass up, and can make what seems to be a cheap game just that much more expensive in the end.
  14. No Diablo 3 Threads?

    [quote name='JTippetts' timestamp='1338177005' post='4943873'] [quote name='Nytegard' timestamp='1338171429' post='4943861'] So apparently Blizzard officially stated that the drop percentage is in relation to how many items are on the AH, which could explain why the drop rate seems bad for certain individuals. (I also don't agree with this, as it is arm-twisting people into using the RMAH). [/quote] Do you have a source link for this, by any chance? Because if this is true, then my god... They've officially jumped the shark. [/quote] [url="http://us.battle.net/d3/en/forum/topic/5149013410"]http://us.battle.net/d3/en/forum/topic/5149013410[/url] [quote] The auction house obviously provides an incredible service to allow for very easy trades between characters, and essentially blows out the wide range of items you could have available to you at any one time. So, in fact, the AH has to be a factor in how we drop items. On one hand you have a huge benefit because you can buy and sell items very easily, as opposed to having to post up WTS threads in the old USEast trading forums, but on the other end it does impact the item pool economy with the inherent ease at which you can trade items.[b] If the AH existed but wasn't a factor at all into how items dropped/rolled, the economy would be completely tanked within a matter of weeks.[/b] [/quote]
  15. No Diablo 3 Threads?

    [quote name='Stroppy Katamari' timestamp='1338166438' post='4943845'] Always-on DRM in single player, no LAN play, congested and laggy servers (lag must be real fun in hardcore mode...), being forced to beat the game over and over before getting actual challenge, Inferno "challenge" being about buying gear at AH to avoid getting randomly one-shotted instead of having to play well? Sounds fantastic. [/quote] I finally completed Nightmare, and had to put my Monk aside. I know other people stated how they could easily get to inferno with him, but did they do that without buying on the AH? Having low dps, low hp, low everything else, and no real distance attacks is making progression difficult, to say the least. Oh, and after awhile, you start to lose health if you don't manage to kill that elite you've been kiting for the past half an hour. So apparently Blizzard officially stated that the drop percentage is in relation to how many items are on the AH, which could explain why the drop rate seems bad for certain individuals. (I also don't agree with this, as it is arm-twisting people into using the RMAH).
  • Advertisement