Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  Game Engine (generic)  (Read 4801 times)
0 Members and 1 Guest are viewing this topic.
Offline 1st4ck

Junior Newbie

« Posted 2010-07-23 00:06:03 »

Hi, i am new to this forum, i am trying to make a game.

I am trying to make a "copy" of the tower defence game "Plants vs Zombies". i love that game but the game offers no challenges after you complete the game. Also i am trying to make a game with more Scale, (bigger maps and lots of monster) i want to see the war at max. Cheesy

There is some "Engines" for games to make things easy for developers, i know few but i can only remeber "GreenFoot".
My first question is "Is there more good engines for java? and What is the good of each?"

As i told greenfoot is a good engine it allows for rapid programming, but its dificult to make it work with "Eclipse" or other IDE. Also the interface is is stricted to what "greenfoot" designed.

The engine have about 5 Classes only, and could be enouff but i think it lacks much so i am making a new.

GreenFoot have the:
Actor -> An Actor is an object that exists in the Greenfoot world.
Greenfoot ->   This utility class provides methods to control the simulation and interact with the system.
GreenfootImage ->   An image to be shown on screen.
MouseInfo ->   This class contains information about the current status of the mouse.
World ->   World is the world that Actors live in.

This ideas of the game is Ok but there could be more like:
Menu -> Like a world but for Menu stuff
MenuItem -> like actors but for Menu

And some others.

The logic About the Engine.
Right now i have something like this:

Create a Swing interface and with a big Canvas. (All happens inside canvas)
Create a World like greenfoot ( in the constructor you put all items you want the world to have )
Define the bounds of the World
Create a Menu ( create all items for menu in the contructor )
Add the world to the menu (this is just a instance so you can acess directly)
define the bounds of the world

Its all created now...

Define the Frames per Second: (using later )

The reall engine comes next: i have it inside a diferent thread
We need to get the time of the PC (i use nanoseconds)
them do a while(true) and inside put this:
Get clock
render World and Menu
Run Update for world (menu should not be needed)
Get clock and check how much time this actions took
With this you need to calc what time is left till the next Loop (remeber about the Frames per second desired)
Wait for the next loop and repeat.

its all:
now you need to put the logic in the update of world and the visual in the render of it.

This work like a tree so you need to loop every child of each so they can do their "thing"

Hope this helps someone, and someone can help me to clean this idea. and add some more consepts.

Tomarow i will try to put some code about this.

i have made some progress on the game and now its playable.

I have put the src files too.

Plz give some opinions. Cheesy
Offline h3ckboy

JGO Coder

Medals: 5

« Reply #1 - Posted 2010-07-23 13:37:43 »

yes, ther are many good ones for jaava Smiley. slick, pulpcore, GTGE, and rebirth are the first hat pop into my mind.
Offline 1st4ck

Junior Newbie

« Reply #2 - Posted 2010-07-24 13:37:33 »

Fixed a Majox bug where the ball weapon was not being garbage collected after leaving the Screen.

That would make all balls leaving the screen still being calculated, so after some minutes the CPU would stat incrising the calcs needed and so the performance would continuosly drop.

its fixed now, but was good to find what i did wrong in the first place.

next task is implement the Cash on the game so it can be more balanced.

here is the current Source.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline h3ckboy

JGO Coder

Medals: 5

« Reply #3 - Posted 2010-07-24 15:50:53 »

im confusecd, are u asking for engines? or are u making one?
My first question is "Is there more good engines for java? and What is the good of each?"

this would lead me to to think ur looking for one,

but it sounds like u just released a new version?
Offline 1st4ck

Junior Newbie

« Reply #4 - Posted 2010-07-24 17:21:29 »

At first i was looking for a engine, but i didn't liked any of those i found... Sad

So i tryed to make a new.

The game is already starting to become stable and having some features.

if someone want to support it would be cool.

After this is more stable i will release a Game pakage so other developers can use this engine in their games too.

the idea i am making is like this:

Create your window and them get a Canvas control and send to the "Game" object the instance of this canvas, a MyWorld, and a MyMenu.

then you just make some classes that extends this classes.

The idea is the engine support all developers need to start their game.

I am posting now a version that let you real play the game with the Credits like the original game.

At first build 4 plants so you get the Sun needed to start mass the Shooters.

the game is endless so you can play as you want, the current wave number of monsters is exponencial... with 1.6 multiplier.

i added some debug to the game so you can see some info of the objects on map.

Pages: [1]
  ignore  |  Print  

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

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

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

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

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (899 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (812 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!