Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 2901 times)
0 Members and 1 Guest are viewing this topic.
Offline 1st4ck

Junior Newbie





« Posted 2010-07-23 02: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.

Edit:
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
« Reply #1 - Posted 2010-07-23 15: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 15: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
« Reply #3 - Posted 2010-07-24 17:50:53 »

im confusecd, are u asking for engines? or are u making one?
Quote
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 19: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.

Tips:
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  
 
 
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.

xsi3rr4x (53 views)
2014-04-15 18:08:23

BurntPizza (51 views)
2014-04-15 03:46:01

UprightPath (65 views)
2014-04-14 17:39:50

UprightPath (48 views)
2014-04-14 17:35:47

Porlus (65 views)
2014-04-14 15:48:38

tom_mai78101 (89 views)
2014-04-10 04:04:31

BurntPizza (149 views)
2014-04-08 23:06:04

tom_mai78101 (245 views)
2014-04-05 13:34:39

trollwarrior1 (203 views)
2014-04-04 12:06:45

CJLetsGame (210 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!