3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: painkiller]
#292799
10/07/09 06:40
10/07/09 06:40
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
i will upload the latest version.
Do you know a good website to upload?
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: maslone1]
#292854
10/07/09 14:54
10/07/09 14:54
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
i will upload the latest version.
Do you know a good website to upload? I upload my creations to filefront, but the files are deleted autocatically after x time without any download, if you don't prevent it. I think you can upload it to mediafire, the donīt delete the files
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: painkiller]
#293177
10/09/09 18:24
10/09/09 18:24
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
thank you for that information
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: maslone1]
#294086
10/16/09 07:25
10/16/09 07:25
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
Hey there!
So i have continued this project, and i am also do little tests with it to find bugs. So i fixed some bugs. But i have a little war with one BUG. If i delete the player-ship and the player- function + reload the player with the player-function during i press (any) key, the value for the key keeps "1" (True). So i have to press the key again (for short) to reset it. That means for me: i have to write an own function that gives the key information to the player-ship. But isn't there an easy way.
while(xxxx){ ...... ..... .... wait(1);} key_force.x = 0;
-> is not possible (i have tested it, and the bug is still there....)
So do you know this bug in your projects? Have you other ideas to fix this?
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: maslone1]
#294245
10/17/09 14:22
10/17/09 14:22
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
I think if you open a new topic more people will see yor problem
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: painkiller]
#307352
01/28/10 18:02
01/28/10 18:02
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
..... ok,..... so i have started this "open-source" for nothing... ? like nothing-need-this-source no one added some functions, created other versions...?
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: maslone1]
#319962
04/19/10 00:25
04/19/10 00:25
|
Joined: Aug 2002
Posts: 572 Toronto
MadMark
User
|
User
Joined: Aug 2002
Posts: 572
Toronto
|
Hey Maslone1,
My wife upgraded my software last Christmas to A7 Commercial, so I am pleased to find your codebase. Rather than try and re-write my old C-Script space game from scratch in Lite-C, I am attempting to learn Lite-C as I fiddle with your source. Thanks for making it available.
Can you tell me what I would need to do to change the camera from 850 quants above the ship to first person perspective? I have modified F_cam_one, but I'm sure the keystrokes and other stuff also need to be changed. Not sure where or to what values...
function Cam1() { var cam_goal_dist; //Variable for the camera-distance camera.z = Ships[1].z + 50; // cam-starting position while(1){ camera.x = Ships[1].x; camera.y = Ships[1].y; cam_goal_dist = Ships[1].x + 850 + facCamAbst; if(camera.x < cam_goal_dist) { camera.x += 1.8; } // the cam position follow the calculated cam_goal_dist variable if(camera.x > cam_goal_dist) { camera.x -= 1.2; } camera.tilt= 0; // -90 = look down camera.roll= -90; // -90 = look forward camera.pan = 0; // -90 = look sideways wait(1); } } Mark
People who live in glass houses shouldn't vacuum naked.
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: MadMark]
#320114
04/19/10 19:04
04/19/10 19:04
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
Hey MadMark! Now the new changed code for you (and all other people):
function Cam1()
{
var cam_goal_dist = -40; //Variable for the camera-distance
//camera.z = Ships[1].z + 850; //thats the cam-starting position
camera.x = Ships[1].x; //the x and y position is always the player x and y position
camera.y = Ships[1].y;
camera.z = Ships[1].z;
while(1){
rotate_rel(camera.x, Ships[1].x, Ships[1].pan, vector(cam_goal_dist,0,0));
if(key_u != 0) { cam_goal_dist += 2*time_step; }
if(key_i != 0) { cam_goal_dist -= 2*time_step; }
//camera.x = Ships[1].x; //the x and y position is always the player x and y position
//camera.y = Ships[1].y;
/*
cam_goal_dist = Ships[1].z + 850 + facCamAbst; // always the standard-distanze plus the variable distance
// how the variable-distance ist calculated you see in Pl_Ship.c
if(camera.z < cam_goal_dist) { camera.z += 1.8; } // the cam position follow the calculated cam_goal_dist variable
if(camera.z > cam_goal_dist) { camera.z -= 1.2; } // the reason why i use this: it brings more "dynamic" to the cam-movement
*/
camera.tilt= 0;
camera.roll= 0;
camera.pan = Ships[1].pan;
wait(1);
}
}
and the same code again, but this time without "nonsense":
function Cam1()
{
var cam_goal_dist = -40; //Variable for the camera-distance
camera.x = Ships[1].x; //the x and y position is always the player x and y position
camera.y = Ships[1].y;
camera.z = Ships[1].z;
while(1){
rotate_rel(camera.x, Ships[1].x, Ships[1].pan, vector(cam_goal_dist,0,0));
if(key_u != 0) { cam_goal_dist += 2*time_step; }
if(key_i != 0) { cam_goal_dist -= 2*time_step; }
camera.tilt= 0;
camera.roll= 0;
camera.pan = Ships[1].pan;
wait(1);
}
}
With the key " U " and " I " you can scroll / change the distance between camera and spaceship. scroll down to "zero" and you have your 1person camera. or change the value "cam_goal_dist" to zero. The important part is this function: rotate_rel(camera.x, Ships[1].x, Ships[1].pan, vector(cam_goal_dist,0,0)); have a look at "F_math.c". there you see how ot calculates the position for the camera. I hope it helps you. But remember, thats simply the code for 2.5D. you cannot fly in complete 3d.
Last edited by maslone1; 04/19/10 20:51.
A8c, Blender, FlStudio, Unity3d
|
|
|
Re: 2.5D Spaceshooter - OpenSource
[Re: maslone1]
#320616
04/23/10 06:10
04/23/10 06:10
|
Joined: Jul 2007
Posts: 424 EUROPE
maslone1
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2007
Posts: 424
EUROPE
|
Have u tested the code, madmarK?
A8c, Blender, FlStudio, Unity3d
|
|
|
|