Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (868)
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 11967 times)
0 Members and 1 Guest are viewing this topic.
Offline mcurry

Junior Devvie

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 ridden, you'll be pleased to know.
Download: - 8.12MB (Megabytes) - 8 seconds download on a standard 8Mbps download speed.
Source: - 2.04KB (Kilobytes) - Less than a second to download on most, if not all internet connections.
Offline Tjstretchalot

Junior Devvie

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
numberOfEnemies = 500
to like
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.
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. is the correct link, I believe
Offline Riven

« JGO Overlord »

Medals: 1371
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 Devvie

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 Devvie

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 Devvie

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 Devvie

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: 167
Projects: 5
Exp: 6 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

Junior Devvie

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(
   at java.lang.Runtime.loadLibrary0(
   at java.lang.System.loadLibrary(
   at org.lwjgl.Sys$
   at Method)
   at org.lwjgl.Sys.doLoadLibrary(
   at org.lwjgl.Sys.loadLibrary(
   at org.lwjgl.Sys.<clinit>(
   at org.lwjgl.opengl.Display.<clinit>(
   at org.newdawn.slick.AppGameContainer$
   at Method)
   at org.newdawn.slick.AppGameContainer.<clinit>(
   at auctus.Auctus.main(
Offline Tim Spekler

« JGO Spiffy Duke »

Medals: 60
Projects: 2
Exp: 4 years

« 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  

Riven (583 views)
2019-09-04 15:33:17

hadezbladez (5521 views)
2018-11-16 13:46:03

hadezbladez (2405 views)
2018-11-16 13:41:33

hadezbladez (5783 views)
2018-11-16 13:35:35

hadezbladez (1226 views)
2018-11-16 13:32:03

EgonOlsen (4664 views)
2018-06-10 19:43:48

EgonOlsen (5684 views)
2018-06-10 19:43:44

EgonOlsen (3199 views)
2018-06-10 19:43:20

DesertCoockie (4099 views)
2018-05-13 18:23:11

nelsongames (5116 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 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‑
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!