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  
  Building a level-editor  (Read 950 times)
0 Members and 1 Guest are viewing this topic.
Offline brollysan

Junior Devvie

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: 382
Projects: 11
Exp: 4 years

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

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

What kind of game is it?


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:

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.


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 Devvie

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  

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

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

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

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

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

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

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

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

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

Solater (172 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!