Here we are again!
Working now on graphics... here is draft ( to improve )
You are not logged in. Please login or register.
Maratis forum » Posts by SadWolf
Here we are again!
Working now on graphics... here is draft ( to improve )
Hey it looks very good! I'd like to add something like animated pieces
Hi there i'm creating a list of plugins and games of maratis in the wiki!
So add all your plugins here and I'll update the wiki page!
@Tutorial doctor thanks!
Updated with the last game version,
I disabled UCI for now , and enabled a simple LUA based AI
enjoy
still missing a menu and a decent graphics
Actually I love maratis cause you can do more with less...
If you use complex libraries, it's painfull to learn everything, even simple things takes a lot of work...
maratis is very easy and usually most common things has a lua function,
and anyway having a tool like the maratis editor makes the job done faster.
All libraries in maratis are already togheter: audio, graphics and physics... this make it a complete game engine
So why do I like maratis?
-cause is _easy_ ,
-is fast for _prototyping ideas_
-no complex setup, just download the zip e start lua code
-perfectly compatible with blender ( which works good on linux )
-easy plugin system to extend the game engine with new funcitons
-good builtin editor
Hi heartseed!
Thanks for the consideration !!!
(You re an artist! So you can help me with graphics!!! XD)
Thanks for trying the game! At the moment it works only on linux, bring it to windows and macosx soon...
Actually I'm a coder and I'm pretty confident with maratis system.
Before of maratis I used many other engines so I'm not so new to game ambient...
At the state of art the game took me about 12 hours.
I haven't uploaded yet the latest version, cause it works only on linux at the moment.
I will finish it on linux, then port it to windows and then to macosx.
The pre-pre-pre-alpha version haven't the AI integrated yet.
Lua based AI are too weak beacuse lua is a bit slow for intensive computation.
So I have integrated C based strong AIs with UCI.
I will upload tonight the 0.1 version I'll try to port it on windows.
I haven't done it yet on windows cause I have to compile C plugin on windows,
I'm not sure if windows has all the library that I used in C
or if they are linux-specific libraries.
The problem of making a game is that we always overthink about what to do
we are atracted by big titles and we want to make big-title-games too...
in the end we finish with too much work to do and... give up...
I think that you should go with simple projects espacially if you are all alone to work on it...
Anyway hope you'lll give a try to my game soon
I'll upload it asap!
Hi!
I'm getting segmentation fault in MaratisEditor Linux
on the SpecialEffects example after two or three explosions pressing "space"
So milestone!
Beta UCI protocol interaction completed!
Now you can play a match as white aganist an uci engine that plays as black!!!
after a lot of work between nigth and morning I have created a plugin that can interact with an external program throught the stdin/stdout
here is the code...
The tricky part was finding a way to create a fullduplex communication system between two process throught stdin/stdout
Hope this helps someone
#include "ChessEngineInterfacePlugin.h"
#include <MEngine.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <poll.h>
#define READ 0
#define WRITE 1
int infp, outfp;
char buf[4096];
struct pollfd ufds;
/** Interprocess comunication throught stdin/stdout */
pid_t
popen2(const char *command, int *infp, int *outfp)
{
int p_stdin[2], p_stdout[2];
pid_t pid;
if (pipe(p_stdin) != 0 || pipe(p_stdout) != 0)
return -1;
pid = fork();
if (pid < 0)
return pid;
else if (pid == 0)
{
close(p_stdin[WRITE]);
dup2(p_stdin[READ], READ);
close(p_stdout[READ]);
dup2(p_stdout[WRITE], WRITE);
execl(command, command, NULL);
perror("execvp");
exit(1);
}
if (infp == NULL)
close(p_stdin[WRITE]);
else
*infp = p_stdin[WRITE];
if (outfp == NULL)
close(p_stdout[READ]);
else
*outfp = p_stdout[READ];
return pid;
}
int readChessEngineOutput(){
int rv;
rv = poll(&ufds, 1, 1);
if ( rv > 0 ){
read(outfp, buf, 4096);
printf("%s",buf);
}
return 0;
}
int sendCmdToChessEngine()
{
printf( "write to chess engine" );
write(infp, "uci\n", 4);
return 0;
}
int initChessEngine()
{
if (popen2("./Linux/rodent-32-ja", &infp, &outfp) <= 0)
{
printf("Unable to exec sort\n");
return -1;
}
*buf = '\0';
ufds.fd = outfp;
ufds.events = POLLIN | POLLPRI;
printf("Chess engine link started");
return 0;
}
void StartPlugin(void)
{
MEngine * engine = MEngine::getInstance();
MScriptContext* script = engine->getScriptContext();
initChessEngine();
script->addFunction("initChessEngine", initChessEngine);
script->addFunction("readChessEngine", readChessEngineOutput);
script->addFunction("commandChessEngine", sendCmdToChessEngine);
}
void EndPlugin(void)
{
close(infp);
close(outfp);
}
@argoon: thanks! my first goal is to make a simple playable version using external professional chess engines
second goal is to make it usefull for learning adavanced tecniques and openings, with supports and hints
@anael: I'm trying to create a plugin, I have started with a simple helloworld, it worked!
/////////////////////////////////////////////////////////////////////////////////////////////////////////
// SimpleGamePlugin.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <MEngine.h>
#include "SimpleGamePlugin.h"
#include <iostream>
int helloworld()
{
std::cout << "hello world" <<std::endl;
return 0;
}
void StartPlugin(void)
{
// get engine
std::cout << "hello world plugin started" <<std::endl;
MEngine * engine = MEngine::getInstance();
MScriptContext* script = engine->getScriptContext();
script->addFunction("helloworld", helloworld);
}
void EndPlugin(void)
{
}
Today I have studied a bit the uci interface.
UCI compatible chess engine are standalone programs that works with commands throught stdin / stdout.
I will need two half-duplex connection between maratis and the chess engine process.
Lua can't handle a half-duplex interprocess connection so I need to implement, two lua functions
1 - lua function for sends commands from maratis to the other process throught the stdin of the receiver
2 - lua function that receive the stdout of the other process
Do you think that's gonna be painfull?
Here is Maratis Chess
an UCI Chess client written with Maratis ( actually using cross-platform Rodent Chess Engine )
end of this match
Everything about controlling legal move, checkmates , check , castlings and stalemate are done.
Input:
"arrow" to rotate te board "space" to reset the view
mouse click and move system implemented
here is the project if you wanna take a look
Still missing a working chess engine to play human vs computer
missing a turn control
pre-pre-pre-alpha
UPDATE: 01/09/2013
updated wih a lua based ai too try on other platform ( win & mac reports are welcome )
UPDATE: 28/08/2013
--First milestone!
UCI Protocol comunication plugin implemented
Now you can play as white anganist an UCI chess engine!
Next step:
-turn control!
-playing color selection!
-table switching!
-improve graphics!
hope to get a final/usable product soon!
Which is the logical difference between scene and levels?
When should I use a new scene instead of a new level and viceversa?
Is there a way to pass data between levels in lua?
A sort of global variables for lua?
Thanks!!!
Worked for the skirt
It didn't work for the hair,
but I replaced the hair UV with a simple black material ...
Something's wrong with the hair/skirt uv texture... if i use plain colors they became visible...
hi!
I'm trying to export this model to maratis from blender ( v2.63 )
http://blender-archi.tuxfamily.org/imag oman.blend
the model is composed by 3 planes: 1-body, 2-skirt, 3-hair
but when I imported the model in maratis the planes about the hair and the skirt are missing, only the body is visible
any help?
ps: you have to save the pngs file from the UV panel in maps to make it work...
Did anyone do this?
an ingame menu that stops everything e show a panel ?
I thought to use the same system of the GUIs using another scene
but I don't know how to freeze the current scene...
any help?
but how to access to text of a different scene?
no problem
found
scene2 = getScene("scene2")
scene2object = getObject(scene2, "object")
Does maratis support md2/md3/ecc formats?
I think that You has to disable the behaviour when the person goes away from the sensor.
if isCollisionBetween(player,sensor) then
--code to enable behaviour
else
--code to disable behaviour
end
I have created a set of objects to display around the level,
but what if I have a object made of five entities or more for logic,graphics,physics,ecc ecc?
I have to duplicate them around the world and if change something I have to make the change to everything
So what I've done...
In example let's say that I created a special ladder that needs 4 entities
I create one special ladder as template then I put a invisibile box with name SpecialLadderPointer1 in every place where I want a special ladder
So every change that I made to the template model will be apply to the pointers
1. SpecialLadderTemplate = { list of objects of the template objects}
2. SpecialLadderPointers = { list of pointers objects}
3. for loop where I deactivate the template
4. define a function getSpecialLadderCloneAt( pointerObject ) which get a pointer position and clone a template at that position
5. for loop where for each pointer I call getSpecialLadderCloneAt( pointer )
I'll create a lua class for this method asap
Nice Work!
I'll use them for sure!
That's a fantastic shortcut to create that type of object.
Ooooooook! my frustration is over! I can finally export the textures correctly!
Maratis forum » Posts by SadWolf
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.