Vegas > a different page for each subject would be better, listed in the roadmap page
277 2014-01-18 14:46:12
Re: Can't find maratisExporter (6 replies, posted in General)
kostik > thank you for reporting, the link is fixed in the tutorial.
278 2014-01-18 04:35:31
Re: my project for the competition (30 replies, posted in Showcase)
very cool
279 2014-01-14 16:30:40
Re: 4 light source (8 replies, posted in General)
It is also a limitation of the rendering, the engine uses the 4 nearest light for each sub-mesh (or each object).
Please read this for more details : http://www.maratis3d.org/?p=277
280 2014-01-12 10:32:32
Re: Project File not Opening with Maratis (Mac) (2 replies, posted in Editor)
Hi,
it seems not supported, I'm not sure why, but it can be launched from the command line or from a script.
So I made this little launcher :
http://www.maratis3d.org/download/utils/AppleScript/
Unzip and copy "Launcher.app" in Maratis bin/ directory.
You can then associate the mproj files with "Launcher.app"
281 2014-01-11 03:58:41
Re: Full GUI (23 replies, posted in General)
Sure, you can do this if you still use percents (if the screen need to adapt to the resolution) :
int marginLeft = viewport[2]*0.1f;
int marginRight = viewport[2]*0.1f;
int marginTop = viewport[3]*0.1f;
int marginBottom = viewport[3]*0.1f;
render->setViewport(
viewport[0]+marginLeft,
viewport[1]+marginBottom,
viewport[2]-marginRight-marginLeft,
viewport[3]-marginBottom-marginTop
);
or if you want to enter pixel coords direcly :
int X = 10; // pos x
int Y = 10; // pos y
int W = 500; // width
int H = 300; // height
render->setViewport(
X,
viewport[3]-H-Y,
W,
H
);
282 2014-01-10 17:32:46
Re: Full GUI (23 replies, posted in General)
so the example run fine with the GUI and the rotating box and all ?
if yes, now you can replace the code of MGame.cpp by this :
/////////////////////////////////////////////////////////////////////////////////////////////////////////
// SimpleGamePlugin
// MyGame.cpp
//
// Code : Anael Seghezzi
/////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "MyGame.h"
// constructor
MyGame::MyGame(void):
MGame()
{}
// destructor
MyGame::~MyGame(void)
{}
// GUI scene and objects
MScene * GUIScene = NULL;
// custom begin scene
void MyGame::onBeginScene(void)
{
MGame::onBeginScene(); // call the default MGame begin scene
MEngine * engine = MEngine::getInstance(); // get the engine instance
MLevel * level = engine->getLevel(); // get the current level
// get GUI scene
GUIScene = level->getSceneByName("GUIScene");
}
// custom update
void MyGame::update(void)
{
// custom GUI
if(GUIScene) // check if the scene exist
{
// update GUI scene
GUIScene->update();
GUIScene->updateObjectsMatrices();
}
MGame::update(); // call the default MGame update (update current scene physics, animations, script... as done by default)
}
// custom draw
void MyGame::draw(void)
{
MEngine * engine = MEngine::getInstance(); // get the engine instance
MRenderingContext * render = engine->getRenderingContext(); // get the rendering context
// use a smaller viewport for the current scene
int viewport[4];
render->getViewport(viewport);
int marginX = viewport[2]*0.1f; // create a 10% margin of the current screen width : change this for your game
int marginY = viewport[3]*0.1f; // create a 10% margin of the current screen height : change this for your game
render->setViewport(viewport[0]+marginX, viewport[1]+marginY, viewport[2]-marginX*2, viewport[3]-marginY*2);
MGame::draw(); // call the default MGame draw (this will draw the current scene as done by default)
// restore the viewport
render->setViewport(viewport[0], viewport[1], viewport[2], viewport[3]);
// custom GUI
if(GUIScene) // check if the scene exist
{
if(GUIScene->getCamerasNumber() > 0) // check if there is a camera in the GUI scene
{
MOCamera * camera = GUIScene->getCameraByIndex(0); // get the first camera
render->clear(M_BUFFER_DEPTH); // clear depth buffer (to not be affeted by the current scene)
// draw GUI on top
camera->enable();
GUIScene->draw(camera);
}
}
}
- Then use your own game instead of the example or copy the dll in your game directory.
- name your GUI scene "GUIScene" or change the reference name in Game.cpp
- don't use render to texture or scene layer for the gui (it's all done by the cpp)
The code create a smaller viewport to render the current scene and draw the scene named "GUIScene" on top.
The part dealing with the viewport size is this :
int marginX = viewport[2]*0.1f; // create a 10% margin of the current screen width : change this for your game
int marginY = viewport[3]*0.1f; // create a 10% margin of the current screen height : change this for your game
Et voila, a custom game plugin, you'll see it's no so complicated once you understand c/c++ syntax.
In c++ you can access the engine directly, so anything can be done.
283 2014-01-10 06:17:05
Re: Full GUI (23 replies, posted in General)
"release" should be somewhere in the top bar,
usually a project is in "debug" mode by default, if you see "debug" somewhere, clic on it to change to release.
when you compile, the project should create a file named "Game.dll"
if it's not done by visual studio, copy it inside the maratis project folder
284 2014-01-10 06:12:52
Re: cursor position (6 replies, posted in General)
You'll do that using getUnprojectedPoint() :
mx = getAxis("MOUSE_X")
my = getAxis("MOUSE_Y")
mz = 0.1 -- change this number to move the cursor further : 0.0 correspond to the camera clipping near, 1.0 correspond to the camera clipping far
cursor3d = getUnProjectedPoint(Camera, vec3(mx, my, mz))
285 2014-01-09 13:57:34
Re: Full GUI (23 replies, posted in General)
tell me if something is not going well,
it should be ok, there is a visual studio project in the example
- install visual studio (version 2005 works, express edition is free, I'm not sure with the more recent versions)
- open the .sln file
- check the paths in the project properties
OR be sure the .sln file access maratis SDK folder this way : "..\..\..\..\SDK"
OR open the vcproj file with a text editor and replace "..\..\..\..\SDK" by your own path
- compile in "release" mode
286 2014-01-09 06:47:43
Re: my project for the competition (30 replies, posted in Showcase)
hi, that's cool
nice to see a game moving !
287 2014-01-09 06:43:46
Re: Full GUI (23 replies, posted in General)
ok
did you ever tried to compile this example ?
http://www.maratis3d.org/?p=563
because the code you need will be a minor modification of this.
288 2014-01-08 05:20:19
Re: Full GUI (23 replies, posted in General)
there is no reason I see that would make isActive not working, maybe you mean "isVisible" ?
because isVisible depends on the active view, in this case it tells you if the object is visible from Camera 2 and not camera 1 as expected.
By making a plugin, we can use a smaller sub-window (viewport) without using render to texture so the active camera will be camera 1.
289 2014-01-07 09:14:39
Re: Full GUI (23 replies, posted in General)
ok, I understand.
mathematically, with the first method, a larger FOV will produce the same result, even with a moving cam,
the only negative point is that a part of the drawing will be rendered for nothing.
about the sound problem with the render to texture, I don't have a solution that can be done in lua,
the only way I can see is to make a custom game class with a plugin. If you can manage to compile it yourself,
I can make you the code, it's not very complicated.
290 2014-01-07 05:23:01
Re: Full GUI (23 replies, posted in General)
Hi, I get your problem with sound with the render to texture option.
But I don't understand why you can't use the first setup ?
What do you mean "The interface overlap the main game screen so it's not good." ?
291 2014-01-07 05:17:59
Re: "Follow" lag (3 replies, posted in Scripting)
Yes, there is typically a one frame delay, specially with the use of physics.
When not using physics, the delay can be removed by forcing the matrix update from script : updateMatrix(player)
This is because the game update happens as follow :
1 : script "onSceneUpdate"
2 : behaviors update
3 : scene update
4 : physics update
5 : matrices update
If you want a perfect attach with no delay, it's better to use parenting (edit > link selection).
292 2014-01-05 05:42:55
Re: "Follow" lag (3 replies, posted in Scripting)
Hi, welcome,
your message got cut.
Just in case, did you check the "YoFrankie" example,
or "Jules" in "Small Demos" ? : http://www.maratis3d.org/?page_id=53
There is a base for a 3rd person character in both examples.
293 2013-12-28 05:34:18
Re: Test projects (25 replies, posted in Showcase)
Tutorial Doctor : true, I also recently watched some videos of tomb raider 1 and it's still working very well, gameplay is there, atmosphere is there. Indeed a lot of things can be done with small budgets.
294 2013-12-28 05:28:24
Re: No Scite for Mac? (5 replies, posted in Scripting)
the original version is actually open source : http://sourceforge.net/projects/smultron/
(apache license)
295 2013-12-27 19:37:42
Re: No Scite for Mac? (5 replies, posted in Scripting)
"Smultron" for mac is good and minimal,
I was thinking adding it in the mac maratis bundle
296 2013-12-26 03:59:23
Re: Merry Christmas! (3 replies, posted in Off-Topic)
thank you
enjoy your holiday
297 2013-12-22 13:16:43
Re: Standard Renderer Performance (1 replies, posted in General)
Hi,
the z pre-pass is useful as a general technique to reduce fragment call
and improve performance for complex shading or middle-aged graphic card,
at the same time the pass is building occlusion culling.
You might be able to get better performance for special use by skipping it indeed,
but large scene with complex shading/lighting will usually get improved.
Different 3d cards can react differently (on some, like iPhone/iPad pre z-pass to reduce fragment call is bad because the card already does it internally as a strategy).
298 2013-12-14 09:24:59
Re: How to save user data (e.g. progress/option)? (1 replies, posted in Scripting)
yes, there is no ready-made solution yet,
it is not ideal, but when you distribute your game the file will be relative to the player.
We will work on a better solution for the future.
299 2013-12-13 17:06:08
Re: Non-english text (e.g. russian) support (2 replies, posted in Engine)
Hi, thank you for the tip,
I started adding real unicode support in the experimental branch,
so I'll also try to check that to be sure the symbols are loaded by lib freetype.
300 2013-12-09 09:15:26
Re: Can't load engine dynamic library on OSX (2 replies, posted in Engine)
The libs are copied during building,
did you look at the trunk/dev/prod/ directory ? where the final app is ?
more info here : http://wiki.maratis3d.org/index.php?tit umentation