Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  Building a level-editor  (Read 359 times)
0 Members and 1 Guest are viewing this topic.
Offline brollysan

Junior Member


Medals: 1



« Posted 2013-04-13 00:56:37 »

So our game (RPG) is nearing completion and we are at the stage where we are planning to add content to the game in form of questing, combat-able enemies, dungeons, etc. We are pretty new to java (couple of months in, university class, we know some python/c++) and have a hard time figuring out how to implement a leveldesigner. We figured we start out the same we way we did with the game, create a canvas and draw sprites on it, but that can be done with paint. We would like some advice on the next step to take from here, and would be grateful for any source of any leveleditors we can look at (learn much faster like this).

Things we are planning to implement:

  • Gameobjects
    Placing animations on the map, changing how it animates (framerate, directions). Adding enemies, with their sprites and animations and their AI, maybe even adding items and weapons to them.
  • Collisiondetection
    An invicible overlay of the currentmap that shows what is walkable and what is not, only visible in editor. Letting an object decide whether it is walkable or not, automatically updating the overlay. This would let us add cool stuff like player walking on some water (required he has Cool Item of the Waterwalker) while other water is unwalkable (ie cross rivers but not seas).
  • Porting
    This sounds like the hardest part, we would like to transfer what is on the level editor to an actual playable game without creating huge xmls or .map files or a billion different classes for loading stuff from those files proplery. The same objects exit and work problemfree in the game, so hopefully an easy solution exists for just loading them into memory as if they were intialized in the game-code.
This sounds like a lot more work than the actual game, especially for newbies but content is what drives a game, even the coolest looking game can get boring after a minute if there is nothing more to do.
Offline HeroesGraveDev

JGO Kernel


Medals: 250
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #1 - Posted 2013-04-13 01:00:12 »

What kind of game is it?

EDIT:

For my game(s) I use multiple readable text files that get parsed by the application when loading.
Any lines that don't start with a # are ignored when loading.

Here's one:

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  
27  
28  
How to use: #[entity-name]@[position]:[entity-type]

[entity-name] is the name of the entity.
[position] is where the entity spawns.
[entity-type] is the type of the entity.

Positions are represented like: (x,y)
Where x is the horizontal coordinate and y is the vertical coordinate.

[entity-type] can be one of the following:

player - A player-controlled entity. The last entity defined on this list is the one the player will control.
npc - A non-player character. Can not be attacked by the player, or attack anything else. Can be attacked by monsters.
monster - An enemy. Will attack players and/or npcs.

#warrior@(8,8):player
#sheep@(1,1):monster
#sheep@(1,6):monster
#sheep@(15,8):monster
#sheep@(5,7):monster
#sheep@(1,14):monster
#sheep@(7,3):monster
#sheep@(1,10):monster
#sheep@(6,6):monster
#sheep@(12,14):monster
#sheep@(12,10):monster
#sheep@(14,11):monster
#sheep@(8,11):monster


Then I use string functions to split each line at the @ and :, then I parse each section and use the data (eg: spawning a sheep with monster AI at the coordinates (1, 1))

Maybe you could do something like that, then add a simple GUI-based editor.

Offline brollysan

Junior Member


Medals: 1



« Reply #2 - Posted 2013-04-13 01:17:19 »

Thank you that is helpful, we can use something very similar for entityloading and expand on this!
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.

Dwinin (22 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (67 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (55 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (30 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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!