I am new to programming and I kind have got myself into a bet with a mate that i can create a basic program in three weeks.

The program needs to be able to show a missile launching from country to country and exploding. It needs to miss about 40% of the time and show the damage and tolerance values of the target.

I have a basic concept and have done some programming in VBasic.

Please advise

Dani AI

Generated

Finishing a working prototype in three weeks is realistic if the scope is kept narrow and iterative. The core requirements are simple: a 2D map with country positions, an animated missile that travels along a straight path, a randomized hit/miss outcome (about 40% misses), an explosion animation on hit, and a visible readout of target tolerance and damage. The frequent advice in the thread (see and ) to start small and learn as needed is sound—pick the language and toolkit that let the prototype be done fastest (familiar tools reduce friction).

Break the work into clear milestones: model (Country objects with tolerance and health, Missile with power and speed), motion (timer-driven linear interpolation between coordinates), hit test (distance threshold at end of path), outcome logic (random RNG for hit/miss, damage calculation), and UI (health bars, numeric readouts, simple controls to launch/reset). Keep collision simple: trigger explosion when distance <= explosionRadius. Store country stats in an array or small data file so values can be tuned without changing code.

A minimal VB.NET-style example for hit/miss and damage logic (adapt to chosen language):

Dim rnd As New Random()
Dim hitChance As Double = 0.6   ' 60% hit, 40% miss
If rnd.NextDouble() < hitChance Then
    Dim damage As Integer = Math.Max(0, missilePower - targetTolerance)
    targetHealth = Math.Max(0, targetHealth - damage)
    ' trigger explosion animation and draw damage number
Else
    ' trigger miss animation (smoke/splash)
End If

Test aggressively: force hitChance to 0 or 1 to verify animations, log numeric values, and iterate. Prioritize correctness of the hit/damage logic and clear UI feedback; polish (particles, sound, multiple countries, path curves) only after the MVP works. This keeps the three-week goal achievable while producing a demonstrable, testable program.

Recommended Answers

All 5 Replies

If you can learn all you need to know to do that in three weeks, I will be impressed.

Have fun, you have plenty to learn my friend. This is especially true if you only know a little of VB, while that will help with the logic that won't necessarily helping you with class files and what not

here is a tutorial on getting started in java
http://java.sun.com/docs/books/tutorial/getStarted/index.html

and here is the java api documentation, bookmark it and visit it often
http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html

Noone wondered why a statement about VB was posted in a forum for questions about Java?

That last post was not about Visual Basic.

Well... If you know other programming languages, like C/C++, you can learn basics really quickly...

get a good book (look carefully to it before buy, and look also to reviews of them on the net ;-) )

Some years ago I created a program that uses JDBC and Swing (for a University exam :P) within 2 weeks... ...and I never used Java before!
...ah it works :P

So... start to work! ^_^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.