Slick Forums

Discuss the Slick 2D Library
It is currently Mon May 20, 2013 6:20 pm

All times are UTC




Post new topic Reply to topic  [ 111 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject:
PostPosted: Sun Jun 29, 2008 6:17 pm 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
made some changes:
*Buymenu items are now aligned properly (this was EXTREMELY difficult to do)

*Buymenu is now overlaid on an image of the planet and stars.

*Most of my custom colors are now cached in a new static class called Colors

And I think I've decided on how to move between systems.

Instead of having the minimap pan around and have one huge world (this would make things pretty slow), I plan on having several "systems" between which the player can "jump". These will act sort of like levels. The first system, or level, will be the tutorial level. In this level, the player will learn about the game, and his final goal will be to gather up a huge sum of money to pay the toll to "jump" to the next system. I'm not sure what the next system will be.

So, I will make a class called starSystem which loads data from a text file describing all the locations of objects in the world, and I will handle goals for each mission in code.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 30, 2008 12:52 pm 
Offline
Regular

Joined: Sat Jun 07, 2008 6:54 pm
Posts: 119
I love the idea of the gathering money to pay the fee to get to next level-idea.

In fact, I love the gathering money-part in any game. My next game will focus on that element. And possibly fast food. Think pizza tycoon.

With that said, when can we try this out? You need some beta-testers don't you?

Ask away if you need help with webstart.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 12:50 am 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
tackle wrote:
I love the idea of the gathering money to pay the fee to get to next level-idea.

In fact, I love the gathering money-part in any game. My next game will focus on that element. And possibly fast food. Think pizza tycoon.

With that said, when can we try this out? You need some beta-testers don't you?

Ask away if you need help with webstart.


Webstart is a serious issue for me, and I can't quite figure it out. I may just distribute a .jar with all of the required libraries in it. If that doesn't work, I might just have to distribute the source code :roll:

This is the biggest problem with Java for me, confusing distribution.

Anyway, made a few changes:

*Added shield system. It currently only works for the player, but certain enemies will eventually have shields. A player will take damage to the shields, which recharge very slowly, until the shields are depleted. If the shields are depleted, they will not recharge for 30 seconds. During this critical phase, enemies can damage the player's hull. Currently this makes the player practically invincible, so I will be doing much tweaking to get this to work.

*Cached even more colors

*Optimized certain code features to make the game on average about 5 FPS faster. The game is still VERY slow when enemy AI is concerned, so I will be doing some optimization in this area. I will also need to find a better way of drawing gold and dust, because whenever an asteroid explodes, the game slows to 18 FPS. Gold is currently drawn by assigning a 4x4 pixel .GIF to each gold piece. I might try experimenting with image buffers for the gold, and I will lower the density and transparency of the dust.

EDIT: I also made a new logo for the game and header for the buy menu


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 5:08 am 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
New video:
http://www.youtube.com/watch?v=HJoseXNkW-E


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 8:37 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
nice video :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 9:31 am 
Offline

Joined: Thu Sep 27, 2007 2:36 pm
Posts: 20
Location: Hamburg
im glad you're still on your project. nice video.
zaxar engine? your own?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 11:40 am 
Offline
Regular

Joined: Sat Jun 07, 2008 6:54 pm
Posts: 119
Thatotherguy, how far have you come with making a webstart?

I simply went and took an existing jnlp, in this case from Kev's kitipong, and altered the text in it, like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<jnlp
  spec="1.0+"
  codebase="http://www.karlmacklin.com/java"
  href="memory.jnlp">
  <information>
    <title>Karl's Kard's</title>
    <vendor>Karl Macklin</vendor>
    <homepage href="http://www.karlmacklin.com"/>
    <description>Karl's Kard's</description>
    <description kind="short">Karl's Kard'ss</description>
    <!--<icon href="icon.gif"/>-->
  </information>
  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+" max-heap-size="128m"/>
    <jar href="memory.jar"/> 
    <extension href="http://slick.cokeandcode.com/demos/slick.jnlp"/>
  </resources> 
  <application-desc main-class="com.karlmacklin.memory.Memory"/>
</jnlp>


What you do is simply exchange the relevant info with your own, save as a jnlp, execute it (no need to put the jnlp online) and see if that works. Now, things might get more complicated if you're using any extra libraries, which I guess you do, but I'm sure someone could help out with that little problem.

The jar file itself is like a zip file. For my memory game, the files it contains are the class files and the resources, and that's it.
At first I was set on creating a working executable jar file, and I tried putting in every lib I could find, ended up with a 10 mb jar that still couldn't be run.

Also, you might see it says version="1.4+", well that's not true in my case so that messed things up for some ppl with older Java versions, but it worked for anyone with the most recent version. I myself am totally lost when it comes to webstart's, and I agree on Java having a distribution system quite disheartening for newbies.

Just try it out, see how far you get and post any troubles here and I or someone can hopefully push over the next hump.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 3:40 pm 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
atomhamster wrote:
im glad you're still on your project. nice video.
zaxar engine? your own?


The Zaxar engine was a physics/gaming engine I coded last year to simulate particles, vectors, forces and fields. I took it to the Inter-Industry/Service Education and Simulation conference in November. The only things I kept from Zaxar for Rocketpod were the basic methods for bullets, firing weapons, and gravitational fields. Everything else is basically the same as in Zaxar, but with much better implementation.

Here is a very old video of Zaxar:
http://www.youtube.com/watch?v=ebEpRUHwkL8


Last edited by Thatotherguy on Tue Jul 01, 2008 3:48 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 3:42 pm 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
tackle wrote:
Thatotherguy, how far have you come with making a webstart?


Just try it out, see how far you get and post any troubles here and I or someone can hopefully push over the next hump.


I've made a .jnlp and put my .jar in it, but I can't get it to run because of securities. Apparently I'm supposed to have a signed .jar, and I can't figure out a good way to do this. I'm making my .jar with an IDE tool, you see, and I can't find a tool which will sign it for me. As for Apache Ant and the -jarsign command, I'm totally lost.

I think it also has something to do with the fact that my webserver isn't set up to run .jnlps.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 4:42 pm 
Offline
Regular

Joined: Sat Jun 07, 2008 6:54 pm
Posts: 119
Not sure this is helpful, but:

When I got it working, I never signed any jar at all. I had Eclipse make the jar for me with an ant.

Also, when it comes to the server supporting jnlp's or not, I'm not sure that's as important as it may seem.

For instance, when I had my jar uploaded to my webserver, and I had my jnlp on my computer, I executed it from my computer and that worked just the same.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 5:01 pm 
Offline
Oldbie

Joined: Tue Jun 17, 2008 5:11 pm
Posts: 336
If you want to sign the jar just follow Kev's instructions found here: http://www.cokeandcode.com/webstarthowto

It's fairly straightforward, I think. As for your server add a .htaccess file to get the mime type right -- see the link above to see how to do that, too.

If you're really having trouble though go to the thread I started on this in help/discussion and let's hash it out there.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 6:35 pm 
Offline

Joined: Thu Sep 27, 2007 2:36 pm
Posts: 20
Location: Hamburg
Thatotherguy wrote:
Here is a very old video of Zaxar:
http://www.youtube.com/watch?v=ebEpRUHwkL8


looks like nice action. initially i was a bit confused how shooting works, as the cursor looks so standard, but that's only a matter of time i guess.

how much gold is flying around when it's causing a fps drop?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 7:30 pm 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
atomhamster wrote:
Thatotherguy wrote:
Here is a very old video of Zaxar:
http://www.youtube.com/watch?v=ebEpRUHwkL8


looks like nice action. initially i was a bit confused how shooting works, as the cursor looks so standard, but that's only a matter of time i guess.

how much gold is flying around when it's causing a fps drop?


usually between 10-20 pieces. I think it has something to do with the fact that I'm making a new copy of the gold image for each piece of gold.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 8:15 pm 
Offline
Regular

Joined: Sat May 31, 2008 12:26 am
Posts: 207
I've practically got my .jnlp working, I just keep getting this same error. It launches the application, and then when its about to load resources it says:

Code:
java.security.AccessControlException: access denied (java.io.FilePermission .\dust.xml read)
   at java.security.AccessControlContext.checkPermission(Unknown Source)
   at java.security.AccessController.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkRead(Unknown Source)
   at java.io.File.exists(Unknown Source)
   at org.newdawn.slick.util.FileSystemLocation.getResourceAsStream(FileSystemLocation.java:52)
   at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoader.java:61)
   at org.newdawn.slick.particles.ParticleIO.loadConfiguredSystem(ParticleIO.java:51)
   at Game.init(Game.java:462)
   at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:155)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:337)
   at RocketPod.main(RocketPod.java:97)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.sun.javaws.Launcher.executeApplication(Unknown Source)
   at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
   at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
   at com.sun.javaws.Launcher.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Do I have to do something special to load particle systems from a .jar?

Here is my (unsigned) jar: www.kittsplace.com/klingenco/rockets/RocketPod.jar

and here is my .jnlp
www.kittsplace.com/klingenco/rockets/RocketPod.jnlp


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 01, 2008 8:23 pm 
Offline
Oldbie

Joined: Tue Jun 17, 2008 5:11 pm
Posts: 336
I tried signing the jar but you still the get the error. First off, though make sure you can sign the jar because it ultimately won't work w/o it being signed. You can read how to do that on the link I already gave or also by following the same link in the thread I'm about to link.

http://slick.javaunlimited.net/viewtopic.php?t=1118

The above thread might solve your problem (I really think it will). You need to change the way you access your resources, no more "./" which is almost surely the problem. So, scroll down the thread and see where it talks about referencing your project resources.

Hope that helps!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 111 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group