Advertisement

2018 New Year Challenge: Missile Command

Started by December 01, 2017 04:15 PM
68 comments, last by LanceJZ 6 years, 9 months ago

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

 

MCDemo.png

The original was closer to 4:3, not 16:9. You sound like you wanted to torture yourself rather than learn something from this. LOL

Good luck to you.

if (Try()) Do();
else DoNot();
Advertisement

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.

14 hours ago, Nytegard said:

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.

Yes, that is why I thought you wanted to torture yourself. Jumping in without a plan. Not refreshing yourself before starting the project. :) It is all good, not like I have not done that before. It is just that I have not done that for years. ^.^

I don't understand what you mean when you say you scale the ratio. That is something I've never done. I've always had one pixel is one pixel. That also sounded like you just wanted to torture yourself. ^.^

if (Try()) Do();
else DoNot();
6 hours ago, LanceJZ said:

Yes, that is why I thought you wanted to torture yourself. Jumping in without a plan. Not refreshing yourself before starting the project.  It is all good, not like I have not done that before. It is just that I have not done that for years. ^.^

I don't understand what you mean when you say you scale the ratio. That is something I've never done. I've always had one pixel is one pixel. That also sounded like you just wanted to torture yourself. ^.^

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.

It sounds like you are doing that in a very strange way. I would just scaled a circle like I did. Seems like you are trying to reinvent the wheel. I just used radius for checks, as a radius is a circle. You see why I say torture now? LOL

My source code is posted.

if (Try()) Do();
else DoNot();
Advertisement

Mine goes Here!

Quote

 

I made this in several afterwork days, for the cute challenge icon. :)

Exe & Source code included.

Control:

    fire by mouse click

    Esc to pause/resume

 

2.png.dd6113c3e59ae7a1b42fbb79c5dcfe84.png

 

Thanks!

Hello all,

I think mine will be titled "How not to make Missile Command" Hoping to finish up my entry this week- Here's where it's at so far...

large.5a650c5e97e3b_2018-01-2115_53_06-ProjectileDominion.jpg.12724b63adcfb63e30b0ee959445a77c.jpg

 

I like the title @Tazbird. Keep at it. :)

- Eck

 

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

Challenge almost finished and there is not so much post. come on guys do something.

This topic is closed to new replies.

Advertisement