Page 1 of 2

Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:19 am
by InkL0sed
So... when I'm bored, I usually end up making useless applications.

I have been rather bored lately - too much time on my hands...

I've been experimenting with writing a program to play RISK on, and I think I can do it.

That is, as of now, I could probably make a completely text-based version. But I wouldn't be able to make a GUI (well... maybe, but that would take a LONG time for me to figure out on my own) - much less add a functionality for using images of maps...

I'm also not sure how useful it would be if it wasn't an applet somewhere on the Internet. I mean, I suppose you could play with yourself, but that's never fun.

So, should I bother with the GUI part, or make it completely text-based? Yeti, I'm talking to you now!

Let me know what you guys think.

Re: Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:24 am
by gimil
lil old yeti isn'y around right now, but I think java is his laguage of choice. Any apllication that can help with map gameplay is welcome to me!

Re: Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:25 am
by InkL0sed
gimil wrote:lil old yeti isn'y around right now, but I think java is his laguage of choice. Any apllication that can help with map gameplay is welcome to me!


Yeah, I happen to know he's a Java programmer, which is why I really want his input. I almost PMed him, but I figured why not make a thread and see what other people say too.

Re: Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:10 pm
by TaCktiX
I program using Java as well. When I got sick and tired of hand-parsing the Map Stats after compiling them, I made a Java program that could read and parse CSV into what I wanted.

Go GUI. Risk is a visual game, being able to see what's going on is a big deal.

Re: Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:26 pm
by bryguy
TaCktiX wrote:I program using Java as well. When I got sick and tired of hand-parsing the Map Stats after compiling them, I made a Java program that could read and parse CSV into what I wanted.

Go GUI. Risk is a visual game, being able to see what's going on is a big deal.


its a VERY big deal.


If you cant see what your doing, say, when defusing a bomb, theres a very high chance that you will set it off

Re: Java program for map testing?

PostPosted: Sat Jul 19, 2008 9:31 pm
by ZeakCytho
While a text based tool would be slightly useful, I agree that a GUI would make it much better.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 6:17 am
by InkL0sed
Well yeah obviously it would make it better. The problem is I'd basically have to learn how to make GUIs and stuff... I know the bare minimum as of now.

I suppose I could make a text-based version first and then make a GUI later...

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 6:57 am
by yeti_c
Will answer in detail on monday...

Although I'll leave you with 1 question?

Are you making a freestanding app - or are you flowing it through webpages (JSP's/servlets?)

C.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 7:05 am
by InkL0sed
yeti_c wrote:Will answer in detail on monday...

Although I'll leave you with 1 question?

Are you making a freestanding app - or are you flowing it through webpages (JSP's/servlets?)

C.


I'd like to do the latter - but I don't know how.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 3:43 pm
by yeti_c
Get tomcat...

it's free - will run a Servlet engine for you... - you just need to plug in the JSP's!!! (He says that as if it's easy!!)

C.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 3:55 pm
by InkL0sed
Yeah, I should mention I know next to nothing about the workings of the Internet.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 3:58 pm
by yeti_c
InkL0sed wrote:Yeah, I should mention I know next to nothing about the workings of the Internet.


No probs...

I'll post something better for you tomorrow.

C.

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 4:03 pm
by ZeakCytho
InkL0sed wrote:Yeah, I should mention I know next to nothing about the workings of the Internet.


*insert series-of-tubes joke here*

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 4:56 pm
by InkL0sed
ZeakCytho wrote:
InkL0sed wrote:Yeah, I should mention I know next to nothing about the workings of the Internet.


*insert series-of-tubes joke here*


Yes, I can foresee yeti's explanation already.

"You see - the World Wide Web is not so much a web as a series of inter-connected cyber-tubes that serve as conduits for various data - here is a map:
Image

Good luck finding your way."

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 5:46 pm
by gimil
I can see my house!

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 5:52 pm
by Kaplowitz
gimil wrote:I can see my house!

I can see your house too!

Re: Java program for map testing?

PostPosted: Sun Jul 20, 2008 5:54 pm
by bryguy
Kaplowitz wrote:
gimil wrote:I can see my house!

I can see your house too!


I can see my own house and both you guys houses!

Re: Java program for map testing?

PostPosted: Mon Jul 21, 2008 3:49 pm
by InkL0sed
Yeti, your time to fulfill your word is running out!

Re: Java program for map testing?

PostPosted: Mon Jul 21, 2008 4:10 pm
by yeti_c
InkL0sed wrote:Yeti, your time to fulfill your word is running out!


Bugger - tomorrow OK?

C.

Re: Java program for map testing?

PostPosted: Mon Jul 21, 2008 4:13 pm
by InkL0sed
Patience - I has it.

Re: Java program for map testing?

PostPosted: Tue Jul 22, 2008 8:04 am
by yeti_c
OK - here's a very basic post about JSP's etc...

Essentially - you need a "Servlet engine" - a lot of people use Tomcat (it's free) others around are things like Websphere, JBoss, Weblogic - but they're a bit more heavy duty than you'll need...

So - how does it all hang together... essentially - you need to set it up with the main building blocks are detailed in this...

http://j-integra.intrinsyc.com/support/ ... nment.html

Tomcat has tutorials too...

http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html

To start an application within tomcat you need a few necessary things... Here's a couple of brief tutorials...

http://www.coreservlets.com/Apache-Tomc ... nment.html
http://dn.codegear.com/article/22057

I'd suggest downloading "Eclipse Europa" - and getting the tomcat plugin - this allows you to stop and start you Tomcat from within your IDE!!

So - what happens under the hood?

There are a few ways of doing stuff but the main 2 are thus.
a) Straight jsp's. - These are JSP files (similar to HTML but with extra stuff in) and you load them directly - and they get parsed by the servlet engine into HTML.
b) Servlets - These are referenced in web.xml under specific paths - and equate to a Java Class that enables you to capture the Server requests - and then output direct - or to a specific JSP(s).

Note that
a) JSP's can be included in other JSP's (So for instance - create one "wrapper" JSP - then you can plugin smaller generic bits and pieces.
b) JSP's can contain actual Java code - but to output it to the HTML - you need to stringify it.
c) AJAX is your friend!

C.

Re: Java program for map testing?

PostPosted: Tue Jul 22, 2008 8:31 am
by cairnswk
oh bugger ^^^ way over my head #-o

Re: Java program for map testing?

PostPosted: Tue Jul 22, 2008 8:52 am
by InkL0sed
I'll need several days to digest that...

Re: Java program for map testing?

PostPosted: Tue Jul 22, 2008 8:57 am
by yeti_c
InkL0sed wrote:I'll need several days to digest that...


NP - feel free to send/ask more questions...

All the pertinent info is available on the net (I personally haven't set up a servlet engine (ours was already there!))

So - if in doubt ask - or hunt the web... you should be able to get one up sooner or later!!

C.

Re: Java program for map testing?

PostPosted: Tue Jul 22, 2008 9:04 am
by fireedud
yeti, I love your new avi.