Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 4
1  Game Development / Newbie & Debugging Questions / Re: web start persistance on: 2013-04-24 09:07:22
Perhaps there is another solution that someone can point me to (web start application just needs to save a single string regards the users settings but not go requesting permissions to do this)?

I read about persistence but I just can't get it to work. There's also precious little on the web about it which makes me think it's an abandoned feature. Pretty much the same for these cookies. I guess I'll just have to forget the users settings each time but it just seems such a shame as my chess program is quite fully featured.

Mike
2  Game Development / Newbie & Debugging Questions / Re: web start persistance on: 2013-04-02 22:41:09
I still don't understand the game you are making.
It's just a chess program. Users run the program on their PC but they'd always want to store their skill level and how they want the board and pieces to look. I think there is a link to the chess in my sig.

I found an example program using persistent store, a single line of text that lets you set the "title" of a little calculator app which reappears with each use of the app.

You can get a copy here:
That would be quite an expensive purchase for one line of code! I don't suppose you can just tell me the command or what I need to call? Anyway thanks for your help.

A cookie might be able to hold the amount of info you require, as well.
I'm open to any suggestions - can I save and load cookies from a web start application?
3  Game Development / Newbie & Debugging Questions / Re: web start persistance on: 2013-04-02 17:00:25
Thanks for your input. I can access the web directory I'm calling the application from so it was easy enough for me to write a server shell script to save and load data but this obviously doesn't work if the user isn't connected to the web. If I write data on the users system then I need a permission to do this - I'm always very wary of downloading things from the web that then start writing files (obviously I can see why they need to but...). I'm only trying to save the settings for a chess game and the users current position so it isn't much data to store - one small string is more than enough. The persistence service looks like it will do exactly what I want but it just won't even compile let alone run.

It's frustrating because the web start idea seems to be exactly what I need to allow users to run my applications on their local machine. The problem is it seems to be poorly documented and the web start process seems to generate more popups than just about any other application delivery process I've tried. I've even been looking at to switching to Android simply because of the simple installation process.

Mike
4  Game Development / Newbie & Debugging Questions / Re: web start persistance on: 2013-04-01 11:25:14
Has anyone actually tried this? In the PersistenceService example even the import file doesn't exist. I'm just wondering if I'm barking up the wrong tree.

Mike
5  Game Development / Newbie & Debugging Questions / Re: web start persistance on: 2013-03-31 14:32:11
It's an application. I went through the links you gave me and it mentioned nothing until the questions at the end:
Quote
4) Which interface provides the ability to control how the Java Web Start application's resources are cached?

    c) PersistenceService
The answers page didn't want to provide much more info but I found this page which describes a PersistenceService but unfortunately it doesn't describe it in such a way that I can use it. You'd think it wouldn't be hard finding examples on the web but there's not even a simple example to save a string.

I'm currently saving stuff on the server for users but doing this is a PITA and the user has to explicitly hit a save/load button as well  Cry

6  Game Development / Newbie & Debugging Questions / web start persistance on: 2013-03-30 23:28:04
I'm trying to just save a string in a Java web start program. I tried to understand how it was done but failed. Can anyone point me at a really simple example or perhaps explain using little words? It's a program that is usually called via the web page but it also installs itself locally if the user wants. I'd rather not ask the user for any extra permissions like writing to a file.

I can also never seem to get my icon to load on the users web site - are there simple instructions for this to.

Mike
7  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-11-17 12:21:41
Thanks for trying it Cas. Sorry about the error. I have no clue what that error means and I'm not sure why you even get an error. Does it run/fail for anyone else?

I'll admit webstart has it's failings but the good thing about it is that it can run an app of the web and allow folks to install it on their PC's for offline playing.
8  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-11-16 21:38:40
Just to mention I've put a new update of the game out. Lots of new stuff. If anyone gets time then I'd love some constructive feedback. If the game is too loud then press P (Pause/Options) and change the sound level.

http://www.checkmypages.com/swarm/

Cheers

Mike
9  Game Development / Newbie & Debugging Questions / Re: Storing state with web start/jnlp on: 2012-09-16 01:34:30
Ahhh - I suspect you live in the modern world. Where I live, I have vi to edit the files and compile in the command window (XP) using :
1  
2  
3  
> javac diamond_v55.java
> jar -cfm diamond_v55.jar Manifest.txt *.class *.png *.wav *.ico
> java -jar diamond_v55.jar
Is there anything I can do using these sort of commands?

Mike
10  Game Development / Newbie & Debugging Questions / Re: Desktop icons using web start on: 2012-09-16 01:26:09
Thank you. I'll try that and report back.
11  Game Development / Newbie & Debugging Questions / Desktop icons using web start on: 2012-09-15 22:23:27
I'm trying to shift a number of fun apps over to web start. I like the idea of having a single program that can run via the web or as a stand alone app. I also like the idea that it will load quicker if no changes have been made to the app since the last build.

I tried adding an icon to my app but I can't get it to appear on my desktop. I originally tried png (64x64) and now I'm using ico files (windows). I still don't have anything appear. Will it appear if I do manage to get it right or will it always stay with whatever it first tried to use? The jnlp file is
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
<?xml version="1.0" encoding="utf-8"?>
<jnlp
        spec="1.0+"
        codebase="http://www.checkmypages.com/checkers/"
        href="diamond_v55.jnlp"
>

        <information>
                <title>Diamond Draughts plays draughts and checkers. Easy to use and fun to play.</title>
                <vendor>Mike Robinson</vendor>
                <description>Diamond Draughts</description>

                <offline-allowed />
                <icon href="icon.ico" />
                <shortcut online="false">
                        <desktop/>
                </shortcut>
        </information>

        <resources>
                <j2se version="1.4+"/>
                <jar href="diamond_v55.jar"/>
        </resources>

        <application-desc>
        </application>


I've included the ico file in the jar and also in the checkers directory. Also is there a way of finding out the usage of an app? it would be nice to know if anyone ever uses it. Would this also work if the app is being used as a stand alone app?

It's for a checkers (draughts) program called Diamond Draughts.

Mike
12  Game Development / Newbie & Debugging Questions / Re: Storing state with web start/jnlp on: 2012-09-15 22:14:06
You wouldn't have a simple example of how to do this would you?
I've only ever built my stuff using standard classes.

... pretty please
13  Game Development / Newbie & Debugging Questions / Re: Storing state with web start/jnlp on: 2012-08-29 22:11:05
I must admit I got stuck on the first hurdle using muffins (the persistence service). The examples state "import javax.jnlp.*; " but that immediately raises a not found error. I found out elsewhere that it's included somewhere in the source but it gave no clear example of how to actually use it.

I'll admit I'd prefer it if they had a simple class I could import that simply allowed you to get or store name value pairs for your given URL. I'm currently writing things back to the server but it's a PITA Smiley I guess these developers spend more time coming up with a cute name (and never a name you could hope to guess in google) than provide a simple interface that numb-skulls like me can use.

Mike
14  Game Development / Newbie & Debugging Questions / Re: Storing state with web start/jnlp on: 2012-08-27 11:39:58
Thanks for the suggestion. I'll look into using these.

Who names these things?
15  Game Development / Newbie & Debugging Questions / Storing state with web start/jnlp on: 2012-08-26 10:33:47
I have a few java applets i've converted to web start. The only thing that's stopping me at the moment is how to store the applications state on a given computer. I don't want any special permissions. I just want to store a string that's approx 200 char long. Is there an easy way and can anyone point me to a simple example?

Many thanks.

Mike

PS I believe it can be done with cookies in the sandbox but I simply didn't understand anything that I found  Huh
16  Games Center / WIP games, tools & toy projects / Re: 2D Lighting System on: 2012-07-08 13:18:13
while I'm willing to explain my techniques, I'm keeping my code proprietary at the moment.
This is obviously entirely your choice and the code is yours to do with how you want. It's a shame though, it would be nice to have the option to use a simple shading system.
17  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-07-08 12:57:08
Quote from: princec
More work on the explosions I think.
I've redone the explosions and I think it's an improvement.

Quote from: ReBirth
Nope, it just showed endless animation until I hit fire.
Sadly you need to score about 44k to get on the high score list - takes about 5 min of play. Unfortunately you just missed out with 39k. The animation shown is a splash screen that shows a little info about the game - I know modern PC games don't have these but the idea is to put this game is going into an old arcade cabinet and old arcade games have splash screens. I quite like a splash screen anyway.

What do people think of the latest version (same old URL)?

Mike
18  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-06-28 18:19:26
I haven't used it, but isn't that because it expects you to draw them with additive mode, not regular blending?

Because if that's your only real problem, the other two can be solved with some small scripts quite easily.
It doesn't have blending modes or alpha values etc. It is easy to use and produces good looking explosions though. I tried using paint.net to replace the black background with a transparency - this worked but the end effect was no where near as pretty.

Quote from: princec
I don't use an explosion generator, just lots and lots of particles.
I was using particles - lots of small dots that gradually faded out as they moved out. I quite liked the effect but it was you guys that said I should explosions Smiley


Quote from: ReBirth
39K scores. Option to window size would be nice.
I'm not sure how to resize the window when you have set graphics to display ie the moon base and the aliens etc are all a set size. Did 39k get you on the high score list and did it display your name? I was having issues with no new names displaying even though it worked fine for me.
19  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-06-28 09:55:03
Is there an explosion generator tool you guys can recommend?

I tried a couple but each had issues. My favourite was Explogen v2 which created great explosions but I couldn't :
  • get it to produce images with transparent backgrounds (only black) so I had to use paint.net to play with each image produced - this took ages and also affected the explosion quality.
  • change file names
  • change type of image to pgn

I tried other tools with varying success. At the end of the day the explosions just looked like they were from a different game and added to my game (I guess they were) and storing a sequence of explosion images also badly affects the jar size. Sure I could have just one explosion for all but I felt this would be a retrograde step. Are there any simple to use explosion classes with a smaller set of images?
20  Games Center / WIP games, tools & toy projects / Re: 2D Lighting System on: 2012-06-27 22:20:12
What do you guys think?
It looks great! Are you likely to make it freely available?
21  Games Center / Archived Projects / Re: Retro Arcade Shooter: Moon Base Alpha on: 2012-06-27 22:09:37
I've added a fair amount of new stuff to this game and wanted to a) check they worked on all machines b) hear any opinions. The idea is the same in that you shoot anything alien as quickly as possible while avoiding anything else. The key to the game is to shoot the red mother ships and then carefully shoot the power up you need (I suggest getting all the weapons first). Changes include:

  • It's now uses the full screen
  • It has bio turrets that shoot down from the top
  • It's more aggressive from the start
  • There are more power ups available
  • Super power ups include nuclear weapons, super cooled guns and automatic shields

I haven't changed the explosions as yet. I've actually tried all sorts of explosion generators but they either didn't suit the game or used way to much memory. I haven't changed the fonts much but I'm looking into this. I wouldn't mind hearing whether :

  • the web start works on most machines
  • full screen works (it currently doesn't on Linux boxes)
  • the high score system will store your user name?
  • and is it any better?

Cheers

Mike
22  Game Development / Newbie & Debugging Questions / Re: Trying to get jar to run as web start/jnlp on: 2012-06-27 10:50:59
Thanks for the heads up. I'd (wrongly) assumed that all monitors supported a low refresh 640x480. I've corrected this now. I don't currently have a Unix box to test on but apparently my Rasberry Pi is now on order so this may change.

Does it work now?
Does JWS/JNLP cache the program for a faster start?
Is there a splash screen?
Does the high score thing actually save your score?

Mike
23  Game Development / Newbie & Debugging Questions / Re: Trying to get jar to run as web start/jnlp on: 2012-06-27 00:27:35
It worked  Grin as well as the problems you pointed out, it turned out that recompiling wasn't so good on the server as I didn't yet have all the new images there (I was relying on them being in the jar). If anyone feels brave could they try it on their machine. I'd like to know whether it runs (obviously) and if it allows you to enter high scores.

and thanks for your help guys.

Mike
24  Game Development / Newbie & Debugging Questions / Re: Trying to get jar to run as web start/jnlp on: 2012-06-27 00:06:02
As long as the 'keystore' is on the server, then yes.
  • I altered the jnlp file which pointed at the local file - I just removed the codebase entry which I believe should make it use the current directory. Same issue.
  • I transferred 2 files from my dev machine - one concerning a keystore and one my "company" name. Same issue.
  • I tried recompiling the jar and resigning it - it said key will expire in 6 months. Same issue.
  • I tried to create a new cert in my name but it said "the Key pair not generated, alias <Mike Robinson> already exists".

Any other things I should try?
25  Game Development / Newbie & Debugging Questions / Re: Trying to get jar to run as web start/jnlp on: 2012-06-26 23:45:27
That explains it. Can I just compile and sign on the server then and it will all start to work? I use the following command to sign:

jarsigner -keystore yourKeystore test.jar YourName

(Well spotted by the way)

Mike
26  Game Development / Newbie & Debugging Questions / Re: Trying to get jar to run as web start/jnlp on: 2012-06-26 23:33:56
At least one of your JARs is not signed.
It's actually only one jar. I signed it on my dev PC and then transferred it to the server along with the jnlp file. I'll be the first to admit I'm feeling around in the dark here. I thought web start and jnlp were almost the same thing but obviously not - I'll google to find out more. Is it better to use JWS rather than JNLP then?

The downside is that people might get put off running the program if they're told it requires special permission to run. I think nothing of running any applet but I'm wary of running applications. Why it needs any permissions at all to just run in full screen mode and to access a web page (in the same directory) is beyond me (and perhaps this thread).

I believe a verified cert costs a few hundred $ which, for a free app, doesn't make sense.
Quote from: kappa
JWS doesn't suffer from the same problem? JNLP files occasionally open with a text or xml editor.
I seem to get different behaviour depending on which PC I open the page on - my dev PC just goes quiet after loading the Java, my wife's PC just displays the XML on screen, none actually play the game which is a bit frustrating.

EDIT: actually when I run on my PC now it downloads the app, starts of Java, asks if it's OK to run and then says it's unable to run the application :
Name : Retro arcade game ...
Publisher : Mike Robinson
From file :// Huh
27  Game Development / Newbie & Debugging Questions / Trying to get jar to run as web start/jnlp on: 2012-06-26 22:19:34
I wanted to use web start with my Java game as it gave me access to full screen mode. The downsides are that the user now has to approve the program (as full screen and getting high scores from web both require permissions) whereas before they could just play the game as an applet. The other (rather major) downside is I can't get it to work outside of my own dev machine (an XP SP3).

Can anyone suggest where I might have gone wrong?

http://www.checkmypages.com/swarm

Many thanks

Mike
28  Game Development / Game Play & Game Design / Re: language for platform games on: 2012-04-03 01:27:09
I believe that is what Sratch was made for.
I hadn't heard of it so I just had a look at it. It certainly looks like it might make game programming slightly easier but it's still very procedural ie you have to code each movement etc etc. Have you used it? and if so what did you produce? and how long was the resultant code? did it take long to write? I'm hoping to allow kids to produce games they'd be pleased to play (and write) in under a dozen lines of code. Not sure whether I'll achieve that but hey ho.
29  Game Development / Game Play & Game Design / Re: language for platform games on: 2012-04-02 17:28:43
I suppose my son is the impetus but I like to have interesting projects. I'm just coming to the end of writing a chess program at the moment! I'm pretty sure my son would use it, at least for a few games, especially if he could give a link to his friends so they could play. An interesting side effect might be to interest him in programming - if it only takes a few lines to create a game and you can immediately see the effect on screen then that makes it more interesting than writing a similar amount of code to say "hello world"! Lastly I like creating new languages but I'll admit I sometimes get carried away doing stuff that no one would ever use Undecided

My son has just created a game using powerpoint (bizarre but that's what he did) and I'd like to make it easy for him to create games of his own design. I think it's good exercise for the mind. I think if I could appeal to school kids, teach them a little about coding and perhaps amuse my son for 20 minutes then it might be worth it. If it does work well then there's quite a lot of room for expansion of the idea.
30  Game Development / Game Play & Game Design / Re: language for platform games on: 2012-04-02 14:59:30
Thanks for the feedback. My younger son's 12 but quite bright. The aim of the language was to just define where the platforms are etc and no more work would be required ie jumping etc would be handled by my part. The advantage of this little language is that you could create your own playable platform game in just a couple of lines of code as opposed to writing 100's or 1000's of lines of code ie the code snippet below is one whole platform game. The other advantage is that these levels could plug together.

This is a better description of what the previous program does:
# simple set of 5 platforms with a ladder between each
define x   40                            # sets x to 40
loop 5                                     # loops round 5 times
    define y   loop * 40               # y gets set to 1*40 then 2*40 etc
    platform at x, y                     # draws a platform at x,y coord
    ladder at x+rnd(100), y           # draws connecting ladders

The above would be enough to start playing a game. It looks intuitive to me obviously because I came up with the language but it was interesting to hear I need to make it easier. The advantage of my small design is that I can create types of things (like platforms) and then plonk them on the screen to use. This is how I would define the platform and I'd do it elsewhere so the user doesn't have to write the standard stuff:

define platform                          # this defines what a platform is
      image "plat.png"                  # there's an image
      extend right 100                  # that gets repeated for 100 pixels going right
      action stand                       # the player can stand on this item


Other options apart from stand are :
  • stand         # player can stand on this
  • climb         # for ladders or trees I guess
  • die            # any contact will kill player
  • ignore        # just part of background image
  • push          # the player can push this item around

You can define various things for any item, so above we have the platform extending to the right for 100 pixels but, if that wasn't what you wanted, you could just add a different extend when placing a platform ie:
platform at x, y extend up 200

Other options allow items to move so you could just define an elevator to go from the bottom of the screen to the top as follows:
define elevator                        # this defines what an elevator is
       image "plat.png"               # just used same picture but could be anything
       action stand                    # must be able to stand on it
       move up 400 restart          # it will move up the screen 400 pixels and then restart


then I could place elevators anywhere on screen:
elevator at 50,0
elevator at 400,40


Does that make it clearer?
Pages: [1] 2 3 4
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (34 views)
2013-05-17 21:29:12

alaslipknot (42 views)
2013-05-16 21:24:48

gouessej (72 views)
2013-05-16 00:53:38

gouessej (71 views)
2013-05-16 00:17:58

theagentd (79 views)
2013-05-15 15:01:13

theagentd (74 views)
2013-05-15 15:00:54

StreetDoggy (116 views)
2013-05-14 15:56:26

kutucuk (139 views)
2013-05-12 17:10:36

kutucuk (140 views)
2013-05-12 15:36:09

UnluckyDevil (147 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.244 seconds with 20 queries.