About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Edit Existing Project With Code Editor
Author Message
Tristan Offline
Member

Post: #1
Edit Existing Project With Code Editor
Hello,

This may be a simple question but I cannot seem to find the answer. Can we only edit ES based projects with the code editor? Is there no way to import or edit current projects directly that were not started or made in the Code Editor?

Thanks!
08-24-2012 01:28 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Edit Existing Project With Code Editor
Hello,

Code Editor does not support importing VS or Xcode or other projects.
You need to manually create ES files, and copy the contents of cpp/h files
08-26-2012 02:19 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #3
RE: Edit Existing Project With Code Editor
Hi, I'm having the same issue here, recycling VS code I used for Esenthel 1.0 in order to use it in 2.0. As I don't really know the ES files format/structure and so on, could you please detail this answer a bit? Or point me to a tutorial or somewhere where this is explained.

OR, I can handle working in VS with code only, but that way I don't know how to import my models in the code anymore. There is no more Data folder to be included, I'm really not sure how data is manipulated in this version of Esenthel. Is there a tutorial on this somewhere?
(This post was last modified: 03-13-2013 02:49 PM by AndrewBGS.)
03-13-2013 02:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Edit Existing Project With Code Editor
Hi, the ES file is just a regular text file, like CPP.

But you can just drag and drop CPP file into EE 2.0, it will be imported as source code.
Or you can right click on project and select "New Code" and then copy code there.
03-13-2013 09:55 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #5
RE: Edit Existing Project With Code Editor
Right, I naturally tried that, and it didn't work.
Besides the cpp codes I have libraries that I'm really not sure how to integrate.
Is there really no example on how to do this? (I know data path to objects and those things need to be changed, I can handle that. What I can't handle is the rest.)
I don't have just cpp files, I have .h ones too. Now what should I include, and what not?

Using just the cpp's I get countless "undeclared identifier" errors, if I drop the headers in too I get a ton of other errors, most about type redefinition.

I haven't used objective C before esenthel, and just when i was starting to understand it I got moved to EE 2, and my code feels damn useless here.

I'm totally lost here. I tried understanding the code of Bloody Massacre. I opened it in VS to be able to find declaration of symbols, which as expected are declared in .h headers. But now those headers are nowhere to be seen, and I have no idea how you could have created them, and so, how am I supposed to create mine.

Isn't there a way to keep coding separated from the editor? That would be just perfect.
(This post was last modified: 03-14-2013 02:15 PM by AndrewBGS.)
03-14-2013 02:07 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #6
RE: Edit Existing Project With Code Editor
So while waiting for an answer, I started working baby-steps to understanding the code. I started rebuilding everything I head according to the Bloody Massacre example, but I've hit an ugly bug.

I just tried to display my world after going through menu and intro, and the best I can get is an amazingly dark world with quite ugly horizons. I'm loosing my mind here, I can't figure this thing. I tried with other worlds too, same result.
This would be the code I'm using:


bool GameInit()
{ Physics.create(EE_PHYSX_DLL_PATH);
Game::World.activeRange(D.viewRange());
Game.World.setObjType(Items , OBJ_ITEM )
//.setObjType(Statics , OBJ_STATIC )
.setObjType(Players , OBJ_PLAYER );
Game::World.New(UID(1229526079, 1183863936, 619973049, 2080236982));
//if(Game.World.settings().environment)Game.World.settings().environment->set();
Game.World.update(Cam.at);
return true;
}

void GameShut()
{}

bool GameUpdate()
{
if(Kb.bp(KB_ESC))return false;
CamHandle(0.1, 100, CAMH_ZOOM|(Ms.b(1)?CAMH_MOVE:CAMH_ROT));
Game.World.update(Cam.at);
return true;
}

void Render(){
Game.World.draw();
}

void GameDraw(){
Renderer(Render);
}


at this point it's almost copy-paste from the tutorial, and still fails. Could there be something wrong with my world? I have the default environment linked to my world, and the result is damn dark with or without that segment of code commented.
03-14-2013 03:59 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Edit Existing Project With Code Editor
Yes you can use just Visual Studio without the Esenthel's Code Editor
http://www.esenthel.com/community/showth...9#pid36959
03-14-2013 04:28 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #8
RE: Edit Existing Project With Code Editor
I know I can, in theory, but now that Data isn't laying around in an actual folder where I can see and manipulate it, but instead it's hundreds of files that look identical to me, it's hard to handle all the code just with VS. But I will try to do that though, I just don't know how to integrate resources in the code anymore.

Are the settings you linked valid for EE2 also? I notice it has some different libraries, as projects now start with EE_Init() instead of setting data path.
03-14-2013 04:34 PM
Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #9
RE: Edit Existing Project With Code Editor
think of each file in EE v2 code editor as header with cpp files in one.
It took me a while to prefer v2 editor over VS 8

You can use vs by building your project, unfortunately (actually fortunately) any change made in VS will not be brought back to EE v2 editor

These settings: http://www.esenthel.com/wiki/index.php?t...ual_Studio

Are for VS not EE, don't get confused between v1 and v2 code, there's a difference.

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
03-14-2013 10:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #10
RE: Edit Existing Project With Code Editor
I know what the settings are for, I have a lot of experience with VS. That's why I'm confused now that I try to work with EEE, a lot of thing in there don't make sense to me.
But I can handle it eventually... now however I'm stuck failing to mail the character in my world move. I tried rebuilding everything I had in EE1 piece by pice (code and models) and I'm stuck at applying animations on the character. The guy moves, but he's not animated. All my settings look just like the tutorial ones, no idea what could be wrong.
03-15-2013 12:13 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #11
RE: Edit Existing Project With Code Editor
(03-14-2013 04:28 PM)Esenthel Wrote:  Yes you can use just Visual Studio without the Esenthel's Code Editor
http://www.esenthel.com/community/showth...9#pid36959

I use v1 and if I ever came across to v2, how can this be done? There doesn't appear to be any way to use data assets outside the editor? There is no convertor tool or model editor tool that let you create data assets the way we do in v1. Are you supposed to work with all those strangely named data files in your VS code? How would you know what is what? Where are the .gfx and .mesh files for example, when using VS with v2?
(This post was last modified: 03-15-2013 03:24 AM by fatcoder.)
03-15-2013 02:28 AM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #12
RE: Edit Existing Project With Code Editor
Ditto fatcoder.
03-15-2013 05:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #13
RE: Edit Existing Project With Code Editor
All of game project resources are stored in "project_hash_name/Game" you can set DataPath to it, look at built in EE_INIT function in the EE 2.0 editor (middle mouse button click it to jump to definition) in any kind of project.
That's it, with making that kind of DataPath and engine setup, you can access resources through normal caches like Meshes, Images, etc, and by specifying the UID of the resource, which can be obtained from the editor.
Meshes(UID(..))->

The resources are automatically converted/processed by the Editor for you, that's why you don't need and should not need to perform any manual changes on those files, the Editor does that for you.

You should first give it a serious try.
03-15-2013 12:51 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #14
RE: Edit Existing Project With Code Editor
I really am trying to give it a serious try, that's why I keep asking these questions.

I'm working slowly from zero to rebuilding my game, and now I'm stuck trying to make my character use the default animations for moving: http://www.esenthel.com/community/showth...4#pid37784

And I'm urrently kinda upset that I can't figure why on Earth the animations aren't used; I can't see what is different in my code-world-resources from the Tutorial ones (which work). Besids this (which is quite an issue for me) I managed to get the basics of the editor, and indeed it's not really so bad after you get used to it.
Thanks for the middle mouse button tip, that's very useful!
If you could help me with the animations too, it would be just lovely.
03-15-2013 01:47 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #15
RE: Edit Existing Project With Code Editor
(03-15-2013 12:51 PM)Esenthel Wrote:  you can access resources through normal caches like Meshes, Images, etc, and by specifying the UID of the resource, which can be obtained from the editor.

Sorry, but that part right there is a step backwards in my opinion. If you need to get the mesh for a model called, "fred" then you first need to open the editor, search for "fred," right click on the model, select Properties, click the Copy button for the ID, alt+tab back to your code (in VS) and then paste into Meshes(UID(..)). Are you serious?

Not to mention your code is then littered with all these UID's that you have no idea which is which. You come back to a section of code months later and have no clue which mesh it is referring to. So you have to go back to the editor and... wait, how does that work? Search every single mesh until you find the one with the matching UID?!?!?

In v1, you just type Meshes("obj/fred.mesh") for example. That's it. How is the v2 method better?

v2 would have been brilliant if it still had the same data structure with recognizable files names that can be easily accessed and manipulated both inside and outside the editors... like v1. grin
(This post was last modified: 03-15-2013 11:12 PM by fatcoder.)
03-15-2013 10:38 PM
Find all posts by this user Quote this message in a reply
Post Reply