My first multiplayer internet fighting game(GTGE) applet and jar

hey darrin thanks for feedback.

I have a slight problem with the graphics at the moment i am reluctant to change them till i get better sprites but i know what you mean. the difference in animation speeds was purpose i couldnt see the moves they were too fast and i have set the game to 30fps to see if it plays the same on different pcs i have.I will experiment on that later.

are you talking about the frame to frame speed for the sprites or how fast they are moving across the screen i can change both i will experiment.

when i first started making this i had a memory problem because of the sprites being so big so i purposly made each move with 1 to 3 frames of animation now that java update 10+ is on the scene i can think of adding more frames but this is where i get depressed i want better sprites but cant afford them for now so i am concentrating on making sure the game works correctly no matter how naff the graphics and animation are they can be changed quite easily once i have them elusive graphics ;D

ewww street fighter i was hoping you would say mortal kombat :P. To be honest i didnt want a clone of other fighting games which all play the same way hence no jumping(i tried jumping and it looked lame and my physics suck). The thing i will try and change is knocking the opponent back a few inches for certain attack moves when at the correct possition.I will add a gore sprite when i can find a good one to steal(i mean aquire) can be replaced later when i find an artist.

sorry i cant put swing frame in gtge as gtge works from a frame i think, it was the only way i could get a scrollable chat area which gtge doesnt have.

lol at “b” key i noticed that too but again down to graphics, and both my wife and myself are non violent ppl we wouldnt know how to kick and punch realisticly if we were paid haha. I had to beg her to let me take a few pics of her just to get the prototype up and running.

I want to move more on the statergy side of the game play and away from the arcade style as i said before xbox fighting games are far superior so even if i had a pro artist do graphics i still think it would be crap(no offence to any pro artists).

Any way thanks for your input most appreciated and i know theres loads of things i can do to make this game better so gonna concentrate on the things i can do and will think about the rest later.Thankyou ;D

Both slow animations and game speed. I didn’t see the fps. Might be a good thing to put up so people can report. The game overall was just slow when I was expecting twitch. Like only take a second to move across the screen or blinding fast punches. Some of the animations just seemed to be faster.

As for a strategy game, hmm dunno. Turned based might be interesting. Plan your attacks, etc. What game would you say this is similar to? Sorry can’t be more helpful but this style is not my area of expertise.

Hi was thinking of making it like mafia wars 7 million ppl cant be wrong no animations just click on buttons and fights based on how many ppl you got and what weapons you have.
i made it 60fps now and increased moving speed and sped up between animation frames i will have a go at adding the fps counter right now.
now now they fly across the screen and have fast punches and kicks ;D

I just played mafia wars. Pretty interesting game. Yeah, my preference would be make it like that and less twitch base. Both though are going to take some serious. coding. Make the game you love and we will love it too.

hey all ;D

I’ve made some alterations regarding the single player ai modes,i have completely removed my collision detection class as it wasnt working the way i wanted it,(the joys of inhereting other ppls code when your a newbie programmer. the ai matches now run at 100fps using my new code rather than the fluctuating fps between 5 and 100.
when you go to the ai settings theres some text you click on to upgrade your strength, speed, agility and stamina see how far you can get against an offline ai human on level 1 then see if you can beat my ai human on level 5 with full upgrades…i got to level 2 before i had to cheat well technically its not cheating i havent implemented when you properly recieve the upgrades yet.
LINE UP LINE UP dont be shy have a try…lol
would like some feedback regarding the ai settings is the ai too hard to beat?
i hope you got fast fingers ;D

http://www.kickassevolution.com/bm3source

I Installed ubuntu and after about 4 hours of faffing around trying to get it to work i can confirm the applet loaded ok with java6 plug in with the latest version of firefox and may i just say …OMG how can anyone use linux its so naff,each to thier own i guess. :o

I downloaded the JAR and it works. I get this exception:
java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:41)
at java.awt.image.Raster.createPackedRaster(Raster.java:458)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
at java.awt.image.BufferedImage.(BufferedImage.java:321)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:537)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:521)
at sun.java2d.loops.MaskBlit$General.MaskBlit(MaskBlit.java:171)
at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Blit.java:186)
at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:73)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:998)
at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:178)
at sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:2909)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3047)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3001)
at com.golden.gamedev.util.ImageUtil.splitImages(Unknown Source)
at com.golden.gamedev.util.ImageUtil.getImages(Unknown Source)
at com.golden.gamedev.engine.BaseLoader.getImages(Unknown Source)
at com.golden.gamedev.engine.BaseLoader.getImages(Unknown Source)
at com.golden.gamedev.GameObject.getImages(Unknown Source)
at training1.initResources(training1.java:259)
at com.golden.gamedev.GameObject.start(Unknown Source)
at com.golden.gamedev.GameEngine.startGameLoop(Unknown Source)
at com.golden.gamedev.Game.start(Unknown Source)
at com.golden.gamedev.GameLoader.start(Unknown Source)
at bloodmoneyGameEngine.main(bloodmoneyGameEngine.java:76)

I’m going to increase the maximum memory, it will work :slight_smile:

Edit.: I cannot login anymore with the member login I have just created, why? :’(

huray it worked sorry about you crashing.
My game server still thought you were logged in.thats why you couldnt log back in.
i have manually removed the flag for logged in, in mysql.
when running from the jar i run it from a bat file i should have included that
i can see a null in the chatwindow but …the only time a client stays in so far is when running from opera web browser i will re look at my game server code and see why,i cant see why it wouldnt have logged you out from the application most strange.Thanks for checking it out :slight_smile:

OK i think but im not sure, i think the reason why clients stay logged in the chat amd i will be fixing it very soon.

When i first started making the game server i wasnt going to use swing but when i finally started understanding it i wanted to integrate it into my current game server but didnt know how.

They both run as seperate applications and talk to each other to relay messages.when you crash,normally from a heap space error from the application running without the extra memory you crash in the original game server and the application that logs you out if you crash normally doesnt know it happend so you cant get back in.

Looks like i will have to learn how to integrate them and fast. Coffee at the ready should take me about 5 hours going to stop up all night to fix it.

WOW must be getting better at java i fixed it all integrated now i just need someone to try and crash it with the non expanded memory from the jar…ive tried but it works on mine but i just loose one of the characters ??.
Im going to have that coffee anyway i deserve it ;D

I fixed the opera issue with staying logged in when the browser was closed.(I hope)
I will be learning how to create a webstart so wont be around for a while this may take some time.
Sod that for a game of soldiers looks too hard to figure out.ill stick with applet.

Please use my own JNLP file as an example, some programmers here did this :wink: it is quite easy, put your own parameters.

I got webstart working yeah ;D i had to increase the heap size to 256mb because one of the characters disapeared when playing, i suppose its better than a java heap space error.

http://www.kickassevolution.com/bm3source

yeah i copied the index.html file. im lazy like that :persecutioncomplex:

I will sort out the site later. i have me a leaderboard to code.

It works but the AI always beats me :frowning: It would be better if I could jump.

I am ashamed to say that when i tried to implement jump and make it look ok i failed badly.
how did you get it to give a null value in the chat dialog box?
i never tested what would happen if you actually ran out of cash its supposed to top you up automaticaly back to 100
i best test that.
it kept you logged in?
did you play from the jar you downloaded?
i uploaded a new version with that bug fixed and also webstart.
i got it to jump in a straight diagonal line and fall down super fast thats why i made it go invisible instead in the head to head version,
that and i cant do walking animation without it looking stupid.
i will have another go at it when i have had some sleep.

I used your webstart.

I have changed the graphics from png to jpg and its shrunk the jar size by 50% now its less than 5mb so should download quicker.
Eventually it will be running from a dedicated server so should be super fast.
I will be trying to rearrange the website and see if i can make the ai easier to beat.

A few more changes made and a few more still to come.
I completely changed the way you log in so now your only classed as logged in when you connect to a game server, that way the game server is responsible for logging you in and out.
Theres now a leaderboard highscore list when you first load the game and currently im winning yeah!! ;D
The ai has been fixed so it dont punch and kick at 60 frames persecond its now set with a timer according to what level your on.
I still got to fix the ai because not all punches and kicks are registering but its beatable at least.
when you fight in offline ai matches you actualy take money off the other player and this can affect the highscores.
I think ive fixed the simultaneous login error its only been tested on my lan.
sorry not possible for macs at the moment unless the jnlp file works not been tested.

Todays High Scores

mark mistry Level 7 uk $6263
bleh Level 1 usa $200
richard Level 1 uk $166
tumppu Level 1 suomi $140
todi Level 1 Brazil $140
steveyO Level 1 Spain $140
kitfox Level 1 Canada $120
gouessej Level 1 FRANCE $120
cgcan Level 1 LT $120
KniteBlargh Level 1 Game Jolt $120

And who evers in that list is there because i let them beat me for testing :persecutioncomplex:

Java Plug-in 1.5.0_19
Using JRE version 1.5.0_19 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\mistry


----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at sun.applet.AppletClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadCode(Unknown Source)
	at sun.applet.AppletPanel.createApplet(Unknown Source)
	at sun.plugin.AppletViewer.createApplet(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

This is what i see when i tried compiling with jdk 1.5.0_19 and running as an applet,
this is my html for applet…

<applet code="testgamelauncher.class"
	archive="kae.jar"
	width="800" height="600">
<PARAM name="java_arguments" value="-Xmx256m">  //<---is this going to be a problem for mac's?
</applet>

This is soley for mac users can anyone with a mac please tell me if they see the applet on thier computer or if they can get it working from the .jnlp file
this is my jnlp file…

<?xml version="1.0" encoding="utf-8"?> 

<jnlp 
  spec="1.0+" 
  codebase="http://kickassevolution.com/bm3source/mac"
  href="kae.jnlp">
  <information> 
    <title>KickAssEvolution's BloodMoney</title>
    <vendor>Mark Mistry</vendor> 
    <homepage href="bm3source/mac/index.html"/> 
    <description>Free Multiplayer Online Fighting Game. KickAssEvolution's BloodMoney</description> 
    <description kind="short">BloodMoney</description> 
    
    <offline-allowed/> 
  </information> 
  <security> 
  </security> 
  <resources> 
    <j2se version="1.6+"initial-heap-size="128m" max-heap-size="256m"/> 
 
    <jar href="kae.jar"/> 
  </resources> 
  <application-desc main-class="bloodmoneyGameEngine"/> 
</jnlp> 

http://www.kickassevolution.com/bm3source/mac for applet page

http://www.kickassevolution.com/bm3source/mac/kae.jnlp

Totally redesigned the game.

Works like mafia wars or vampire wars still a few things to do like
sort out the animation and find some good images that are not borrowed off google ;D

You get a bonus every time you log on plus what ever your earnings are

there are 1000 missions so far
there are 1000 items to collect
you have to learn the moves before you can use them there are 1000 of them
you can master your moves to give you better attack and defence
you will be able to choose what moves you want to use in your fights
you can loose cash if someone attacks you when you are offline
you can fight head to head
its got chat
you can master the missions and get bonus items
your health stamina and energy are updated when you next log on
and you can play this game when your computer is not turned on.
you can choose what character you want to play as.

i will be uploading the jar and jnlp when ive finished testing it myself and after i have a few friends try it out