Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (NnamueN, Akow, 1 invisible), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 5 1 2 3 4 5
Re: battle of smielys [Re: Random] #389096
12/10/11 15:04
12/10/11 15:04
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
OK, I got the movement stuff. Found few bugs:
* camera is jerking sometimes (got this only two times, can't recreate)
* jerking movement, caused by bullets I guess (have no other ideas)

All other ways, it looks great laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: battle of smielys [Re: 3run] #389125
12/10/11 18:00
12/10/11 18:00
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline
User
JoGa  Offline
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
trololol, why there is a troll in your .cd-File? xD

This game makes fun!
The aiming is a bit hard and I never saw a TNT next to me, which was going to blow me up. Maybe you could mark the activated TNT with some "danger-icon" or blinking?

nice project, stay on it :-)

Re: battle of smielys [Re: JoGa] #389232
12/11/11 21:24
12/11/11 21:24
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
danger-icon?
good idea ^^

I thought about adding a troll in my game, but that did not really fit grin

Now I am almost finished with adding some cars.
After that, there will be planes (jets or what ever).



Re: battle of smielys [Re: Random] #389233
12/11/11 21:25
12/11/11 21:25
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
The AI can also use the cars grin



Re: battle of smielys [Re: Random] #389240
12/11/11 23:33
12/11/11 23:33
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Hy again.
I have a little problem with my car...
I looked for a long time for the reason, why the car is not driving.
There are no warnings, errors or other stuff.
The problem I am having is that the car just not react when I press W,S,A or D.
Could somebody please tell me were the problem is?

Code;
Quote:
var constr_front_left;
var constr_front_right;

var constr_back_left;
var constr_back_right;

VECTOR mom_speed;
var max_angle;
var stear_contr;

var max_speed = 1500;
var ang_force;
var speed_contr;

function mass()
{
pXent_setmass(my,60);
pXent_setfriction (my, 100);
pXent_setdamping (my, 20, 20);
pXent_setelasticity (my,20);
}

action warthdog()
{
pXent_settype(my,PH_RIGID,PH_CONVEX);
pXent_setmass (my, 15);

pXent_setfriction (my, 20);
pXent_setdamping (my, 5, 5);
pXent_setelasticity (my, 10);

ENTITY* constr_front_left = ent_create("tire.mdl",vector(my.x+75,my.y-45,my.z-10),mass);
ENTITY* constr_front_right = ent_create("tire.mdl",vector(my.x+75,my.y+45,my.z-10),mass);
ENTITY* constr_back_left = ent_create("tire.mdl",vector(my.x-70,my.y-45,my.z-10),mass);
ENTITY* constr_back_right = ent_create("tire.mdl",vector(my.x-70,my.y+45,my.z-10),mass);
pXcon_add ( PH_WHEEL, constr_front_left, my, 0 );
pXcon_add ( PH_WHEEL, constr_front_right, my, 0 );
pXcon_add ( PH_WHEEL, constr_back_left, my, 0 );
pXcon_add ( PH_WHEEL, constr_back_right, my, 0 );
while(1)
{
stear_contr = (key_d - key_a);
max_angle += stear_contr * 3 * time_step;
max_angle = clamp (max_angle, -30, 30);
if (stear_contr != 0)
{
pXcon_setparams2 (constr_front_left, vector (max_angle, max_angle, 0), nullvector, vector (95000, 500, 0));
pXcon_setparams2 (constr_front_right, vector (max_angle, max_angle, 0), nullvector, vector (95000, 500, 0));
}
else
{
max_angle = max_angle * (1 - (0.25 * time_step));
if (abs(max_angle) < 1)
max_angle = 0;
pXcon_setparams2 (constr_front_left, vector (max_angle, max_angle, 0), nullvector, vector (95000, 500, 0));
pXcon_setparams2 (constr_front_right, vector (max_angle, max_angle, 0), nullvector, vector (95000, 500, 0));
}
speed_contr = (key_w - key_s);
ang_force = speed_contr * 1000 * time_step;

pXcon_setmotor(constr_back_left, vector(-ang_force, max_speed, 0), nullvector);
pXcon_setmotor(constr_back_right, vector(-ang_force, max_speed, 0), nullvector);
wait(1);
}
}
}


Thank you future more.

Last edited by Random; 12/11/11 23:37.


Re: battle of smielys [Re: Random] #389296
12/12/11 21:45
12/12/11 21:45
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Ok I found out.
Take a look if your interested in it, it works fine grin

Quote:
function mass()
{
while(you)
{
pXent_setmass(my,60);
pXent_setfriction (my, 100);
pXent_setdamping (my, 20, 20);
pXent_setelasticity (my,20);
//pXent_addforcecentral (my,vector(0,0,2000));
wait(1);
}
pXent_addvelcentral(my,vector(-2000 + random(4000),-2000 + random(4000),2000 + random(4000)));
pXent_settype(my,PH_RIGID,PH_CONVEX);
wait(-20);
ent_remove(my);
}

action warthdog()
{
c_setminmax(my);

pXent_settype(my,PH_RIGID,PH_CONVEX);
pXent_setmass (my, 15);

pXent_setfriction (my, 20);
pXent_setdamping (my, 5, 5);
pXent_setelasticity (my, 10);

ENTITY* FLwheel = ent_create("tire.mdl",vector(my.x+75,my.y-45,my.z-20),mass);
ENTITY* FRwheel = ent_create("tire.mdl",vector(my.x+75,my.y+45,my.z-20),mass);
ENTITY* BLwheel = ent_create("tire.mdl",vector(my.x-70,my.y-45,my.z-20),mass);
ENTITY* BRwheel = ent_create("tire.mdl",vector(my.x-70,my.y+45,my.z-20),mass);
pXcon_add ( PH_WHEEL, FLwheel, my, 0 );
pXcon_add ( PH_WHEEL, FRwheel, my, 0 );
pXcon_add ( PH_WHEEL, BLwheel, my, 0 );
pXcon_add ( PH_WHEEL, BRwheel, my, 0 );
pXcon_setparams2 (FLwheel, NULL, vector(62, 100, 0), vector(500, 100, 4));
pXcon_setparams2 (FRwheel, NULL, vector(62, 100, 0), vector(500, 100, 4));
pXcon_setparams2 (BLwheel, NULL, vector(150, 300, 0), vector(500, 100, 4));
pXcon_setparams2 (BRwheel, NULL, vector(150, 300, 0), vector(500, 100, 4));

while(1)
{
var speed=0;
var lenk=0;

speed=clamp(speed,-10000,10000);
lenk=clamp(lenk,-45,45);

if(key_w)
{
speed-=1000;
}
else
if(key_w==0)
speed+=1000;

if(key_s)
{
speed+=1000;
}

if(key_a)
{
lenk-=5;
}

if(key_d)
{
lenk+=5;
}

pXcon_setwheel (FLwheel,lenk,0,0);
pXcon_setwheel (FRwheel,lenk,0,0);
pXcon_setwheel (BLwheel,0,speed,0);
pXcon_setwheel (BRwheel,0,speed,0);

pXent_addvelcentral(my,vector(0,0,-10));

if(key_shift)
{
pXcon_setwheel (BLwheel,0,0,5000);
pXcon_setwheel (BRwheel,0,0,5000);
}
}
wait(1);
}
}


greetings ^^

Last edited by Random; 12/12/11 21:46.


Re: battle of smielys [Re: Random] #389300
12/12/11 21:59
12/12/11 21:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
How your ai are going to handle physics cars?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: battle of smielys [Re: 3run] #389383
12/13/11 18:32
12/13/11 18:32
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
With traces.
The AI drives towards the enemy (furthermore it will be a base), and jump of it there are near enough.
But if they are driving and trace something, he will turn either left or right until the trace hits nothing anymore.

I have another little question.
I notice that "ent_next" uses all entities.
Which means, that in the example below, every entity with "entity_typ = 3" becomes invisible.
But I want that only the nearest entity with "entity_typ = 3" becomes invisible.
Also the entity should become visible again, if it is not the nearest entity with "entity_typ = 3" anymore.


example:
Quote:
for (you = ent_next(NULL); you != NULL; you = ent_next(you))
{
if ((you != my) && (you.entity_typ == 3))
{
set(you,INVISIBLE);
}
else
{
reset(my,INVISIBLE);
}
}


Does anyone know how to do that?

Last edited by Random; 12/13/11 18:37.


Re: battle of smielys [Re: Random] #390022
12/21/11 15:26
12/21/11 15:26
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Please, test grin

battle of smilies test 2

Replay, if you find any bugs or stuff like that, please.
Next will be, ais in cars wink



Re: battle of smielys [Re: Random] #406025
08/12/12 20:46
08/12/12 20:46
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
I redeveloped battle of smilies, now it is called "smiley wars" ^^

New AI:
AI battle test

And more exotic AI to come:

dragon test

reviews please ^^

Last edited by Random; 08/12/12 20:47.


Page 3 of 5 1 2 3 4 5

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1