Risk type game

Hi I am new to this forum and also to programming.I started learning Java 3 months ago and now I finally feel ready to start creating my first project.Since I always liked games I tought
that my first project should definetly be a game.So I was thinking of creating a risk type game ,I have a couple of ideeas on how I could achive that but nothing concrete on how I could
implement my ideeas.

So my first order of busines would be to study someone else is Java code on this type of game.Problem is kind find any source code for it (I did find a couple of games but couldent find it’s source code).So can anyone point me to a site or book that has the source code for this game or for a strategy games(i’m realy fond of strategy games).Thank you!

How much programming experience do you have in general? Is Java your first language?
A risk game should be doable using only Swing, but a full Risk game is going to be hard for a beginner to make IMO. It would however be a very good learning experience, but depending on how fast you learn and how good you are at programming, you should be ready for it not being completed anytime soon.
Looking at other people’s source code is not a very good way to learn programming for a beginner. If you can’t write your own code, you’re just gonna copy the source. What’s important when looking at other peoples code is to understand what it’s doing, and this is a lot harder than it seems. I found it easier in the beginning to learn an algorithm by reading a description of it or a maybe some psuedocode, but looking at source code was just confusing.
Tutorials are awesome. If you haven’t checked out tutorials on how to bring up a Swing window (JFrame), do that and play around with it a little.

I agree with theagentd in general, though if you don’t listen to him, then:

Don’t steal code.

Otherwise if you just wish to look at code you can decompile a .jar with:

http://java.decompiler.free.fr/

Even if my game is a strategy game I’d advice to not try to look at it as it’s a hobby project and therefor quite a mess and probably not readable.

Well keep your shirt on, it’s obviously for educational purposes… D=

Looking at decompiler output is not what I’d recommend for a beginner. There are gigabytes of open source java projects out there that anyone can look at.

Games are really complex bags of state, and pretty difficult for a beginner to start off with. I might recommend creating eye candy with something like Processing as a first project instead.

There’re tow types of strategy games, real-time and turn-based.
you can start by designing gameplay (chars, stats, weapons etc), making simple actions (move, punch, tickle etc), creating world, adjusting gamerule and so on.

So no need to look a completed game’s source code (tutorial is allowed)! they’re messy and hard to understand. Just click new project on your IDE and start :slight_smile:

I just consider it a good policy to have that sentence in a reply if I link to a decompiler. Not only him that read the thread and would feel bad if I helped someone to steal a game, change the credits and then start selling it in their own name.

With those replies, I double that he will come back ;D

I agree on the fact that you should not start from studying the code of a full game (too confusion and too mush copy/paste).

I don’t think that a risk type game is that mush difficult (unless you want to do networking and if you stick with a “dumb” AI).
You don’t need fancy graphics or even animations. So a Graphics2D / Swing application is good enough.

I think it is the best starting point. You should give us your ideas on the gameplay/design and how you think it could be done. Then you will get feedbacks and advices on them.

You can check our what I posted on HoI / Total War style maps in this forum and think about your Risk game again.

I’m just saying, go with something like Pong (make your own version, trippy, stylish etc.) or even better a simple 2D Plattformer.

Don’t go overboard with yourself, you will only become frustrated. And 3 months of programming experience is basically nothing.
I’d say come back when you mastered GUIs and all the important aspects, especially OOP (Object-oriented Programming).

I’m just saying, but I can’t stop you, if you feel confident go for it.