Galaxy613
JGO n00b  Posts: 25
|
 |
«
on:
2010-04-17 01:45:37 » |
|
 Tiny Star Fighter **Game Specs Subject to change!** Fly around in full eight ( 8 ) directions of freedom! Fight through five ( 5 ) sectors to stop an invading alien force! Three ( 3 ) different types of weapons! Two ( 2 ) nearly impossible ( ? ) to defeat bosses! Try it! - http://galaxy613.110mb.com/java/ [Updated 5/22/10] What I WANT it to be is a 8 direction space shooter. We'll see how far I get. Pictures below. The "lolcept" is just a concept, the other one is where I am at right now.
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Eli Delventhal
« League of Dukes » JGO Kernel      Posts: 3574 Medals: 44
Game Engineer
|
 |
«
Reply #1 on:
2010-04-17 14:14:42 » |
|
Looks cool. 
|
See my work:OTC Software<br /> Currently Working On:Secret project... I edit JGO in production, because I simply don't waste time writing bugs
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #2 on:
2010-04-18 23:30:20 » |
|
Thanks Demonpants.  Today I learned that threads are annoying.  Mainly a problem caused by trying to merge Markus' framework with Shannon's. At anyrate, I now have all 8 directions of a space ship! Man I wish I had some webspace to show my latest stuff off on. :<
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Games published by our own members! Go get 'em!
|
|
Markus_Persson
JGO Kernel      Posts: 2092 Medals: 10
Mojang Specifications
|
 |
«
Reply #3 on:
2010-04-19 10:57:19 » |
|
That's looking mighty good. =D
|
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #4 on:
2010-04-19 14:00:42 » |
|
Thanks. Hopefully I'll have more to show soon. I just got all 8 directions of the player's ship working and drawing. :3
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #5 on:
2010-04-20 10:16:03 » |
|
Thanks to Wyrframe's egaEditor, I have made a title screen for TSF when it's starts or paused! The only problem is, the image is an outside file and when I try to upload it, it refuses to load it. So I tried putting all the .class's and the image inside a .jar file but that's not even working on my computer.  Jar's have NEVER been nice to me  Does anyone have any pointers? If all else fails I'll make the egaEditor save an array for pixels[] so I can just put it inside of my code...
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Eli Delventhal
« League of Dukes » JGO Kernel      Posts: 3574 Medals: 44
Game Engineer
|
 |
«
Reply #6 on:
2010-04-20 10:37:43 » |
|
Are you loading resources via the resource loader stream or by files? Files won't work.
Also, I can't get your applet to run. Just a white screen.
|
See my work:OTC Software<br /> Currently Working On:Secret project... I edit JGO in production, because I simply don't waste time writing bugs
|
|
|
ShannonSmith
Sr. Member   Posts: 365 Medals: 13
|
 |
«
Reply #7 on:
2010-04-20 11:08:21 » |
|
With the typical resource sizes for these games I think it makes a lot of sense to Base64 encode them into String literals embedded in code. I am writing my own paint program applet that will output a string that you can dump your code with some code for loading them. Should be done in a few days.
|
|
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #8 on:
2010-04-20 14:14:57 » |
|
Are you loading resources via the resource loader stream or by files? Files won't work.
Also, I can't get your applet to run. Just a white screen.
I'm loading the image as a file... is the a tutorial you could point me to on how to do it correctly? I'm not even sure what to Google search for to figure it out on my own. :X The white screen is because of the current issue.. I'll upload a working version without the title screen soon. *Edit* Ok I figured out a way to turn a URL into a InputStream and now I can load it using the URL to the image on my website, but it's not loading it from a local .jar which is what I wanted to do, but it IS working if you go to the link in the first post.
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
ShannonSmith
Sr. Member   Posts: 365 Medals: 13
|
 |
«
Reply #9 on:
2010-04-20 14:58:55 » |
|
For loading resource from a jar that is included in the classpath: 1 2 3 4 5 6
| ClassLoader cl = Thread.currentThread().getContextClassLoader(); InputStream stream = cl.getResourceAsStream("myimage.png"); BufferedImage img = ImageIO.read(stream); |
Alternatively use the applet to load the resource: 1 2 3 4 5 6
| ClassLoader cl = Thread.currentThread().getContextClassLoader(); URL url = cl.getResource("myimage.png"); Image image = getImage(url); |
Alternatively use the Swings ImageIcon loading routine to get the resource, this is (or was) probably the most robust/fastest method 1
| Image image = new ImageIcon("myimage.png").getImage(); |
All of these rely on the jar being included in the classpath and also using the correct path to the image.
|
|
|
|
|
Games published by our own members! Go get 'em!
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #10 on:
2010-04-20 15:10:37 » |
|
Thanks Shannon! Now I can use the .jar like I wanted to. The only thing is I'm not using normal image files, I'm using Wyrframe's .ega image format. But it still looks like you can open InputStreams using those methods you just posted so it's all good and will probably help me in the future.  *Edit* The applet on my site is updated now, you should see the neat title screen now! Also, Eclipse is pretty friggin nice. When I rename variables I just have to hover over the old variable name and click on "Rename" and it renames all the old instances.  *Edit* Revamped the test page. It's now keeping track of how many hits it has and also looks a bit nicer.
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #11 on:
2010-04-23 16:03:34 » |
|
Currently revamping how the game is setup. I was using one big tinystarfighter.java file to handle both applet AND game stuff.. I've split the game-related stuff into Game.java that uses ALOT more functions and thus has more clearitiy than ever before. The idea was to get tinystarfighter.java as light weight as possible, and I think I'm succeeding.  After I am done with this refactorization, I'm going to get bullets working and shooting. *Edit* Awesome! Everything is working on the first try... I guess this isn't a surprise because Eclipse keeps compiling the code as I go... this might've not be as fun as it was if it didn't show me errors as I went along.. *Edit2* Alright, got bullets nominally working! I had to wrangle me some bugs with the bullet Iterator and destroying bullets once they got to old. I found out that you had to remove it from the Iterator, NOT within my Update() method! Try it out! I also made the music a little faster pace... http://galaxy613.110mb.com/java/
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #12 on:
2010-04-29 15:57:20 » |
|
Watched Markus program on LiveStream and gave me a lot of ideas. For one I refactored my code to use packages and folders (for instance his EgaImage class is now in the notch.graphics package) I also added in his awesome image loading code so I can load normal PNG's and it automatically finds the closest colors! So I updated the live test in the first post with the new code. Most of it isn't visible, but I also fixed the scrolling stars. Before they cut off after a little bit, but now they go on forever!
I still am not completely sure WHAT I want to do with this. Do I just want to make it some arcade-type game with periodical weapon upgrades? Or do I want to make it something more like EV Nova with multiple systems, docking, trading, buying upgrades, etc...
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
Galaxy613
JGO n00b  Posts: 25
|
 |
«
Reply #13 on:
2010-05-22 16:28:55 » |
|
Alright, finally updated whats uploads. No gameplay yet, but I'm slowly making my way to it. Here some concept art of what's to come:  Gonna make it more of a arcade shooter with upgradables instead of a EV Nova clone.. not enough space. Or more like, I don't want to put up with the lack of space. Maybe after I finish this game I'll try it.. Anyways, go visit the link in the first post and try out the new main menu and look at the in-game stats screen!
|
Programming since 2001 (Technically  ) Uses: BlitzMax, Java, C++ Computers: W7 Desktop and a Triple Booting Netbook.
|
|
|
me
Full Member   Posts: 158 Medals: 1
Java games rock!
|
 |
«
Reply #14 on:
2010-05-26 05:33:27 » |
|
Hello Galaxy613,
Ran on: Acer Aspire 5740, Windows 7 , Internet Explorer, jdk1.6.0_20 Mac Mini, Snow Leopard OS X, Safari, jdk 1.6.0_20 Suse 10 (Virtual Machine), firefox 2.0.0.14, jdk 1.6.0_19 HP Compaq 6820, Fedora 8, Firefox 2.0.0.10, jdk 1.6.0_04
For the Mac there was one time a situation that it crashed safari. Could not reproduce it the second time. I think I was flying to the upper right corner and pressed two keys simultaneously to get to the bottom right screen while I was pressing the fire button.
I noticed that the stars are being drawn when for instance I move up. It always takes a while before they are drawn. Maybe you are after that effect, I don't know, but I just noticed it.
Good luck with the rest of the project.
Best regards from
M.E.
|
M.E. --------
|
|
|
Sardtok
JGO n00b  Posts: 15
|
 |
«
Reply #15 on:
2010-07-07 06:44:07 » |
|
The physics of the movement is pretty nicely done.
I'm guessing there's some kind of mathematical miscalculation as to what stars are shown, but they seem to be drawn in the right place when they do get shown. *shrug* (The problem referred to by M.E.) In the worst case scenario it seems the ship has to pass the star tile before it gets drawn, or when flying in the opposite direction it disappears when the ship flies past it. And it only seems to happen when flying far to the top left (both the top tiles and the left tiles disappear early), but I haven't tested it extensively.
When I've done space shooters, I just use some simple particles with positions relative to the viewport (local/relative, not global/absolute positions), it really simplifies the wrapping.
|
|
|
|
|
|