Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Auctus[0.1]  (Read 3908 times)
0 Members and 1 Guest are viewing this topic.
Offline mcurry

Junior Member


Medals: 1
Projects: 1



« Posted 2012-09-25 21:43:21 »

So I've created a pretty simple game in a matter of a couple of days (don't ask me why it took so long to make something so simple), and I've got it sorted and ready to go. It's called Auctus - which is the latin word for growth.

You start out as a square in a world full of other squares, your task is to consume the smaller squares and avoid the larger squares, similar to the Cell Stage in the game "Spore", and the game "Feeding Frenzy". It's kinda fun, but in it's very early and undeveloped form it's also kinda crappy, and you have to exit the game every time you win or lose. You also lose a lot. It's a little bit buggy still and will need a bit of fixing. The code's messy too.

I've decided to release it open source, it's in Java, so I know a lot of people on this particular forum can probably have fun modifying it and making it better, I'm really looking forward to that part.

I've created a .jar file for it to run from, so all you need to do is make sure that you have Java1.6 or higher installed on your computer, then you just have to double click the jar file, and the game should run.

Anyway, here's some screen shots for you "no-pic-no-clickers"

What you'll see when you first fire the game up.



Game over screen, probably seen shortly after firing up the game.




When you know you'll win.




When you've pretty much won.




What you'll see when you win




And finally, here's the download link, not adf.ly ridden, you'll be pleased to know.
Download: http://goo.gl/tqMKo - 8.12MB (Megabytes) - 8 seconds download on a standard 8Mbps download speed.
Source: http://goo.gl/QM8sn - 2.04KB (Kilobytes) - Less than a second to download on most, if not all internet connections.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #1 - Posted 2012-09-25 22:19:25 »

A heads up before I play - your download link has several typos.

Ok played [and lost] the game, and to make this game 1000x better, change
1  
numberOfEnemies = 500
to like
1  
numberOfEnemies = 5
, or better yet, remove that variable entirely.  Change the win condition to a particular size, which is greater than or equal to the maximum size of the enemies, and include spawning code. On a side note, your enemies should be a List, not an array. 

Here is an example of what I would expect your spawn code to look like.
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  
private static final float SPAWN_CHANCE = 0.01f;
private static final int MAX_ENEMIES = 25; // or something
private static final int WIDTH = 640; // or whatever it is
private static final int HEIGHT = 480; // again, the actual number
private static final int MAX_SIZE = 25; // whatever your max size is

private Random gen;

...

private void spawn() {
  if(enemies.size() < MAX_ENEMIES && gen.nextFloat() < SPAWN_CHANCE) {
     float x = gen.nextFloat() * WIDTH;
     float y = gen.nextFloat() * HEIGHT;
     float xVel = (gen.nextFloat() + 1) * 3; // this can be changed of course
    float yVel = (gen.nextFloat() + 1) * 3; // again, can be changed
    float size = gen.nextInt(MAX_SIZE); // no idea what you use
    enemies.add(new Enemy(world, x, y, xVel, yVel, size)); // Or whatever your constructor is, but this is what I would expect
 }
}

..

private boolean checkIfWin() {
  return player.getSize() >= MAX_SIZE;
}


Another thing I noticed, you generally want to avoid polling input in the same spot you move, make an update method (Or use slicks one) and do it there.  When polling input, set the velocity of the character.  This also allows for neat effects like you speed up to the max velocity and slow down to zero, or making it take a moment to change directions.  Being a square I'd imagine it takes a bit to get moving.

Also with this kind of spawning, you can make it fancy and have it make less and less small squares as you get bigger, and less huge ones when you are tiny.


http://goo.gl/tqMKo is the correct link, I believe
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 781
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2012-09-25 22:21:41 »

Moved to WIP board Pointing

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mcurry

Junior Member


Medals: 1
Projects: 1



« Reply #3 - Posted 2012-09-25 22:23:02 »

Yes, I'll change that now. Thanks.
Offline Screem
« Reply #4 - Posted 2012-09-26 00:49:47 »

Quite a fun game! After about ten thousand a dozen or so tries, I managed to win twice. Cheesy

Just a suggestion, but you should probably set a minimum size for your square. To avoid things like this...


Offline mcurry

Junior Member


Medals: 1
Projects: 1



« Reply #5 - Posted 2012-09-26 06:55:04 »

That's brilliant, I was looking for a way to make it do that but wasn't sure how, thank you! I'll change that when I get a chance.
Offline mcurry

Junior Member


Medals: 1
Projects: 1



« Reply #6 - Posted 2012-09-26 06:56:23 »

Yeah, I definitely had that on the list to do before I uploaded it, but if I wasn't ashamed of the mess I had uploaded, it wouldn't be version 1.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #7 - Posted 2012-09-26 14:34:36 »

Of course, nothing to be ashamed of, it's 1million times better than the average computer user has ever done =)
Offline StumpyStrust
« Reply #8 - Posted 2012-09-26 15:32:58 »

Broh, yeah I said broh, don't worry about how ugly the code is or how horrible the design is. We all start some where. I should show you some of my early code. Everything in one huge ass class.

And it looks like you use lwjgl? It is no easy feat to get stuff working in opengl. Keep up the work.

I would recommend getting some images in there as a next step. Get a background going and maybe make the squares into textured quads. Just 3 images: background, good guy, and bad guy. If you need help ask around here as we have a great many people who are quite pro at opengl.

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #9 - Posted 2012-09-29 16:37:36 »

Very difficult and fun. However, the fps counter is showing things like 700 fps. I would recommend you cap the fps to increase performance, as when I run the program I get around 70% CPU usage.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sothatsit

Senior Newbie


Projects: 1



« Reply #10 - Posted 2012-09-29 23:30:01 »

doesnt run for me Sad i get this error

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1045)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
   at org.lwjgl.Sys.loadLibrary(Sys.java:95)
   at org.lwjgl.Sys.<clinit>(Sys.java:112)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
   at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
   at auctus.Auctus.main(Auctus.java:204)
Offline Tim Spekler
« Reply #11 - Posted 2012-09-30 16:17:57 »

This is really hard  Tongue ! Pretty fun though.
Sometimes I have no time to react, I die almost instantly. Starting with a better position would be a good idea Smiley
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

atombrot (25 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!