Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Big mess of an aproach to level editor.

Author
Message
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 9th Aug 2010 12:54 Edited at: 9th Aug 2010 12:56
Hi, guys i decided to share one of my projects here so i can get some feedback, so i know if i'm heading the right direction or this can go to trash.Anyway someone can benefit from this big mess of code i assembled/coded/linked myself.I write this because not entire code is mine and there is chuncks from examples or snippets i found usefull to decrease the development time by skip writing something that can fit my needs anyway.

Unfortunately i have the bad habit to forget where i get these chunks.Some parts are directly ripped from examples, other just modified.For example i'm pretty sure that camera system is pretty much the same as in the originial where i get it.Wherever it was...

I don't mind someone to claim credits on parts of this as i allways do when i know the work is not entirely mine.

Here it is the source:



I used BBB's plugin form 26.03.10.Second plugin update as i remember there could be drastic changes in it.I'm not the author so let me know if this don't work after you try to execute it.

EDIT: Matrix1's plugin too.I almost forget about this.I feel it like second nature to have it, so...

Run a search for BBB in the forum to find the original plugin thread.The plugin setup can be tricky i myself writed in the plugin thread so you can follow what problems i have back then and how i solved them if you are unable to do it properly without any help.Again let me know what's the issue.

There are few probable obstecles you can face when you try to run this.First of all the code changes colors wherever it wants to commented one in my editor, idk why.While i speak about comments i need to say that i put few lines to guide myself.You can erase them if they seem stupid to you or just ignore them.

The controls are really wierd...There is spawn gadget in the center of the screen which is controled by WASD in SlideMode 2 in which the mouse is locked at the gadget.Ascend with Q and descend with E in this mode.SlideMode 1 unlocks the mouse so you can interact with objects.Currently texturing spawned cubes with some dummy texture when LMB is pressed on the object.With "3" you actually make new cube at current position of the spawn gadget.
You may need to look carefully at the code because i really messed the part where the code is saved and loaded again.The file where the so called level is written is "level_tmp.aem" anything else won't work.If you manage ever to run this when you do click "File" in the Menu Then "Save as" and save some dummy file with extention ".aem" manually written else the program isn't gonna show this dummy file when you choose "Open" in the menu which is the next what you need to do.Once you Open this empty file anything you create in the level is gonna trigger making of "level_tmp.aem" file which can be loaded the way you make it with all cubes at the places where you position them.

This is really really big mess i have no time to put in order so i share it.Still something can be learned or copied from here.If there is someone willing to bang his head against the wall after trying to make this work properly, please welcome.

I think there can be some use to show you the other the other source file which is holding read/write routines order and the idea i've got how this is gonna develop further.



This is a long one, luck reading all this.
Cheers!

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Aug 2010 13:26
That's a lot of code. Any chance of a screenshot or a pre-compiled version as I don't have DBP installed here at the moment but I would like to get an idea whether I want the code?

Thanks for posting it anyway!

luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 9th Aug 2010 13:43
There it is. The packed content of source code + precompiled which i'm not confident that it's gonna work, because i didn't test it anywhere but on my machine.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Attachments

Login to view attachments
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 9th Aug 2010 13:57
The screenshot.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Aug 2010 14:00
I like the look of it but it's hard to use. Is there a list of controls?

Of the three compiled exe's in there only the first two worked for me and only the second one seemed to have the GUI.

Shame you gave up when it seems to be going quite well...

luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 9th Aug 2010 14:47
I haven't job when i started this and few other, i have so much ideas and so less free time.Despite this when i'm bored at work i design some code in my mind, it pass the time really fast.

It's so unfinished i hate myself for this.If i could of finish it long time ago...

About controls just look at the first post, at longest chunk of text.And the controls are really wierd but this was the only way i could of imagine to do this assuming there would be no terrain to ease the positioning part.Later i found nice 3d mouse example which apparently i lost somwhere on the HDD which was gonna be nice alternative to controls.

There are GUI and non GUI versions because in the begining i started without using BBB's plugin.Just when i begin design of menus i found it and then begin separate design of the menus.Realised that it's not gonna work like this so i merged 2 sources into one.I'm really good at this stuff Give me scrambled dbpro version of any game and i'm gonna put it in place like jigsaw puzzle.Which reminds me that i have an inventory system at arround 90-95% from which can be easily done a puzzle game.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!

Login to post a reply

Server time is: 2024-04-26 19:26:24
Your offset time is: 2024-04-26 19:26:24