Free In Game Level Editor

Posted By: Pappenheimer

Free In Game Level Editor - 07/30/09 20:21

Hi,

dieses ist ein freier Ingameleveleditor! Dafür gedacht, jüngeren Kindern zu erleichtern, einfache Level zusammenzubauen. Ich hatte ihn für Workshops programmiert, die ich mit Kindern ab 10 Jahre durchführe. Letzte Woche war so ein Workshop, der 5 Tage a 6 Stunden gedauert hat.
Alle weitere Information folgt in Englisch, da das eh in diesem Forum die meisten beherrschen.

Im Spiel/Editor kann man zwischen den Sprachen mit den Tasten 1 und 2 umschalten.
F1 zeigt den kurzen Hilfstext.
Strg + Alt + E startet den Editor, mit der rechten Maustaste dreht man die Kamera im Edtor.
Mit WASD und Pfeiltasten bewegt man die Kamera.

Vieles ist etwas umständlich, das Meiste aber hoffentlich ziemlich selbsterklärend! blush

Hi,

I've created a level editor for a workshop for kids with the age between 10 and 14. The workshop happened last week and lasted 5 days and 6 hours a day.
The intention of the workshop was to create a game with children with only free programs like Lite-C, its MED, Gimp and Teddy.
Don't know whether it was a success. I hope the children still like me! wink They were extremely dedicated and concentrated to learn all the hard stuff - now, I know what parts of the hard stuff have to be avoided the next time! (Did you know that Teddy can't save its models without admin rights in Windows XP? I didn't, and it was very frustrating, especially for that kids who did a great job with that modeller.)

The Ingame Level Editor should make level building easier. It is still very basic.
I added a shadowmapping for the terrain with the help of Scorpion. There is a set of prefabricated actions. One of them is the flight action from mercuryus, one snippet is from HeelX.

The code is Lite-C, it is quite messy, a mixture of English and German, and some the code is buggy. You get a crash from time to time in "schwerkraft()", I couldn't find the reason, yet.
The code is partly not time corrected - while writing the code, I switched from writing an easy to learn code to a more elaborated code, forth and back.

This is all free for non-commercial use, except the font.

The terrain shadowing has still a 'glitch', the shadow has an offset to the model. I don't know how to solve this. Maybe, you have an answer.

I am still new to Lite-C.

To start the game look for start.exe, or, as it is meant as help for your game, you can open the start.c and the editor.c in SED. In editor.c you can add further functions to a list to make them available in the editor, the editor simply writes the number of given entities in the level and the entities' names, positions, angles, scales and their function number into a simple text file, called 'level0.txt'.

F1 for help - very short.
Ctrl + Alt + E to start the editor.
RMB to turn the camera, WASD and arrwo keys to move the camera.

Its a bit cumbersome, but I hope you can understand the most of its buttons without any further explanation!



You can download it here:

Echt3D_Herbst_2009_11_05.zip

It is easy to improve and extend the editor, don't hesitate to do so, and share the results with us! wink

Thank you! laugh


C&C is welcome!

Posted By: Cowabanga

Re: Free In Game Level Editor - 07/31/09 11:35

Works great, on a very old laptop, with a weak VGA card.
but what's the point here?? A flying duck?? A running diabled turtle??

But the leveldesign is great anyway. laugh
Posted By: Pappenheimer

Re: Free In Game Level Editor - 07/31/09 11:54

thanks for trying! smile

Press Ctrl + Alt + E,
then scroll through the models in the folder,
choose one,
create it,
move, rotate scale it in the world with the help of the arrows (click and hold on an arrow, move the mouse up and down),
choose and assign an action
and start the game to see the added model with the assigned action in the level.
Posted By: Nowherebrain

Re: Free In Game Level Editor - 07/31/09 12:03

must get to work, but I will try it out later.
Posted By: rincewind

Re: Free In Game Level Editor - 08/01/09 06:35

Nice job, Ia m sure this will helpful, especially for those who have a hard time when trying to code (like me :-))

Have a nice weekend
Rince
Posted By: Pappenheimer

Re: Free In Game Level Editor - 08/01/09 11:33

Great, that there's someone who found it useful! smile

I should have stressed that it is mainly meant for the users of Lite-C free, because there isn't much need for those who earn an edition which comes with WED.

It is meant to fill in the actions that you need for your game:

in Line 296 you add the name of your action or function that you want to assign to a model:

Code:
TEXT* action_strings =//die hier genannten actions müssen natürlich auch in "created_ent" aufgeführt werden
//the actions that you fill as a string in this text, must filled in in the function 'created_ent' as well
{
	strings = 15;//Anzahl der actions angeben
	string = "boden", "zweig", "Spielfigur1", "Spielfigur2", "dreh_dich_zum_spieler", "ent_little", "plant_simple", "Fliegender_Spieler", "witch_craft", "Folgende_Kamera", "zaehler1", "zaehler2", "Meine_Animation", "ente_flieg", "blaues_leuchten";
// 	flags = VISIBLE;
}




in the function 'created_ent' there is a list of the functions:

Code:
if(my._action == 0){boden();}
	if(my._action == 1){zweig();}
	if(my._action == 2){Spielfigur1();}
	if(my._action == 3){Spielfigur2();}
	if(my._action == 4){dreh_dich_zum_spieler();}
	if(my._action == 5){ent_little();}
	if(my._action == 6){plant_simple();}
	if(my._action == 7){Fliegender_Spieler();}
	if(my._action == 8){witch_craft();}
	wait(1);
	if(my._action == 9){Folgende_Kamera();}
	if(my._action == 10){zaehler1();}
	if(my._action == 11){zaehler2();}
	if(my._action == 12){Meine_Animation();}
	if(my._action == 13){ente_flieg();}
	if(my._action == 14){blaues_leuchten();}



Let's says, you have a simple action like this:
Code:
function polygon_on()
{
	set(my, POLYGON);
}



Then you add in the text at the end of the list of strings:
"polygon_on" and increase the number:
Code:
strings = 16;



And you add in the function 'created_ent':

Code:
if(my._action == 15){polygon_on();}



The difference of 16 strings ad action == 15 relates to the count of the actions which begins with zero.

The whole script has functions that are meant to be short and easy.
But there are several that aren't that easy, because it wasn't that easy, to code a nice looking gravity code (called 'schwerkraft') or to code a follower that you can push away.

BTW, a list of the already given functions:

Quote:

1. boden = ground : function for the terrain, setting polygon collision
2. zweig = branch : function that sets a simple collisionbox related to the rough shape of the model
3. Spielfigur1 = player1 : player movement with gravity and sliding and pushing and pushable: control: arrow keys and ctrl
4. Spielfigur2 = player2 : player movement with gravity and sliding and pushing and pushable: control: WASD and E
5. dreh_dich_zum_spieler = turn to player : as it says
6. ent_little = Kleine_Einheit : scans for other moving entities, follows the next entity and can be pushed
7. plant_simple = einfache Pflanze : sets transparent and passable
8. Fliegender_Spieler = flying player : this is an action from mercurious, slightly modified
9. witch_craft = Zauber : scans for moving entities and morphs it to a star sprite
10. Folgende_Kamera = following camera : a more sofisticated function: you set an entity near the entity that shall be observed by the camera. It scans for the nearest entity in the beginning of the game start. If you place two of this entities then you get splitscreen (although it doesn't always work - don't know why, yet.)
11. zaehler1 = counter1 : a target that counts te entities around it
12. zaehler2 = counter1 : a target that counts te entities around it
13. Meine_Animation = my animation : simply plays all animations of an entity in a cycle
14. ente_flieg = duck fly : a following entity : scans for other moving entities, follows the next entity and can be pushed, no gravity applied
15. blaues_leuchten = blue light : a request of a participant of the workshop : an entity emits blue light (works only under certain circumstances, is a matter of the views, but I didn't have a further look at the reasons.)

Posted By: Pappenheimer

Re: Free In Game Level Editor - 11/05/09 22:07


http://www.myvideo.de/watch/7062868/Game_Editor

Hi folks,

here is a new version of the free Game Editor.

It got a menu where you can choose between levels, game editor, languages of the interface and quit.
There are several additional functions to choose from in the editor like quest giver, quest asker & quest fulfill, level_change etc. Means there are functions where you can set skills like quest number, quest item and fill in a quest text, or sounds.
To find out how it works, look at the levels from 1 to 5 in game and in the game editor mode.
The interface to move and change an entity within the level is less cumbersome now.
Game Editor
To use it, start the "start.exe" in the main folder, or start the "start.c" from SED (that of the free Lite-C).
Feel free to look at the code as well.

Feedback is much appreciated. I hope you enjoy to have look at it.

The sounds, levels and a lot of the models are build by kids of a workshop, because of a lack of time they are mostly plain white.

Have fun!

Achim

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hallo Leute,

hier gibt es eine neue Version des freien Game Editors.
Er ist deutsch und englisch, man kann die Sprache über das Menü einstellen. Die Funktionen sind allerdings in Englisch geschrieben und deshalb auch die Namen der Funktionen.

Das Ganze ist für Workshops entstanden, in denen Kinder lernen sollen, ein Computerspiel zu machen. Deshalb sind die Töne, Level und viele der Modelle von Kindern dieses Workshops hergestellt.
Game Editor
Um den Editor oder die mit ihm erstellten Level zu starten, die "start.exe" starten, oder aus SED (der der freien Lite-C-Version) die "start.c" starten.

Man kann nun über den Editor Quests sehr einfache Quests erstellen. "Questeinstellugen" lassen sich bei Funktionen wie "quest_giver", quest_asker", "quest_fulfill", "level_change" und "ent_little" aufrufen.
Das Ganze ist natürlich noch ausbaufähig.
Deshalb freue ich mich über jede Kritik, Wünsche und Anmerkungen.

Viel Spaß!

Achim
Posted By: Blink

Re: Free In Game Level Editor - 11/07/09 16:10

all of the great new tools are for lite-c only. my poor poor c-script. good luck, it looks great.
Posted By: Pappenheimer

Re: Free In Game Level Editor - 11/07/09 16:15

Sorry Blink!
Maybe, it could be of help to switch from C-Script to Lite-C? laugh
It is actually my first attempt with Lite-C!
And I used Lite-C for the first time only, because I wanted to give the participants of my workshops the chance to continue after the week with me, without the need of buying any program (free Lite-C, free Teddy(modeling software), free Gimp).

EDIT:
The scripts are all free for use:
some are very unsorted, but defines.c, panels.c, sounds.c, editor.c, quests.c and some parts of simpleKI, shouldn't be too complicating - although, I confess that it has not much comments - feel free to ask.
Posted By: Blink

Re: Free In Game Level Editor - 11/08/09 03:15

i am lost trying to convert, so i guess i will miss this one like other ones. looks great.
Posted By: Anonymous

Re: Free In Game Level Editor - 11/08/09 07:22

Look like a great project.
(not only the cool editor but also the game project!)

keep it growing...
Posted By: msl_manni

Re: Free In Game Level Editor - 11/08/09 07:37

My suggestion would be to use Newton or Physx physics for collision detection and object movement. That way you will have much better collisions and will have much better control over characters.
Posted By: Pappenheimer

Re: Free In Game Level Editor - 11/08/09 11:59

Thanks for the 'keep it growing' and the suggestion! laugh

Mercuryus, I used the fly action from your contribution, thanks for that.
(It is not implemented in the game of this course, though.)

The course has been five days, 6 hours a day (including pauses for lunch and sports of course!), where the kids of the age from 10 to 14 learn a bit of the tools each day while parallel collecting and discussing ideas, and producing models, sounds, skins for the game and its story. After that we find an agreement about the story's final shape and produce terrains, levels, texts and the rest of animations and models needed for the story.
The kids request some functions for their visions and I have a look whether I can add one or two of them. I had to add several functions, because the given set of functions was very incomplete.

When I started the game editor, I did it badly organized, because I was unsure about which functions are needed. But, I think I'm on the right way with the quest system, now. There is still a huge area for improvements, but it is a base for making simple games where the kids can enjoy adding quests, models, sounds, texts, levels and even (very) small functions or modifications within functions etc.

msl_manni,
I thought about Newton, but I have no experience using it.
PhysX isn't free, and I don't want to force the kids to buy anything, in case they want to continue making games after the course.
Posted By: FBL

Re: Free In Game Level Editor - 11/08/09 12:22

For Newton there is a very nice wrapper in the contributions.

But I think is not super easy, meaning it might not be the right thing for your course. But you should take a look. At least I was able to hook it into my current project, so it can't be really difficult.
Posted By: msl_manni

Re: Free In Game Level Editor - 11/09/09 03:03

PhysX isn't free, then go with Newton. There are many who would help you, and I will also try occasionaly, when I login. And this time, please organise the project and keep the coding in english, espically the variable & function names, add comments for others to understand.
I really like what you have achieved till now.
Posted By: Pappenheimer

Re: Free In Game Level Editor - 11/09/09 10:46

Originally Posted By: msl_manni
And this time, please organise the project and keep the coding in english, espically the variable & function names, add comments for others to understand.
I really like what you have achieved till now.

Thank you for your offer. I'm not sure when I will have time to clean that things up,
but you are certainly right that I have to do so.
© 2024 lite-C Forums