any example of split screen game ?

Posted By: Realspawn

any example of split screen game ? - 02/01/16 19:38

Looking for information on how to create a split screen for
2 player game on one pc laugh

I found one in old aum but that was an old template one

Posted By: 3run

Re: any example of split screen game ? - 02/01/16 20:47

Hey!

I'm currently away my PC, but probably tomorrow by the evening I'll get back home, so I'll be able to give you some examples.
Last Stand 2D


Greets!
Posted By: sebbi91

Re: any example of split screen game ? - 02/01/16 21:53

split screen isn`t that hard smile

First of all you need two views and of course deactivating the old camera:

Quote:



VIEW* camera1= //camera player1
{
layer=15;
arc=110;
}

VIEW* camera2= //camera player2
{
layer=15;
arc=110;
}

.......

//call that in your main-function

//define new views (splitted like in HALO)

camera1.pos_x=0;
camera1.pos_y=0;
camera1.size_x=screen_size.x;
camera1.size_y=screen_size.y/2;
camera2.pos_x=0;
camera2.pos_y=screen_size.y/2;
camera2.size_x=screen_size.x;
camera2.size_y=screen_size.y/2;

//activate new views and deactivate the old camera

reset(camera,SHOW|AUDIBLE);
set(camera1,SHOW);
set(camera2,SHOW);


Now your ready for development wink

-set the camera to your players-position
-make a movement script
-Weapons
-and so on

Good luck wink


best regards sebbi
Posted By: Realspawn

Re: any example of split screen game ? - 02/02/16 07:01

Thank you for taking the time laugh I will try this and let you know if i got it all to work
laugh
Posted By: Wjbender

Re: any example of split screen game ? - 02/02/16 08:39

heads up : whilst two camera and viewports is not that hard , be aware that keyboards in general have limitations , perhaps you are planning to use joystick input ?
Posted By: Realspawn

Re: any example of split screen game ? - 02/02/16 16:29

I got it to work laugh will soon upload some pictures and i might use indeed joypad and keyboard but first all needs to run smooth laugh

Player 1 works perfect now working on player 2 laugh
Posted By: sebbi91

Re: any example of split screen game ? - 02/02/16 20:14

I am glad to hear that laugh
Posted By: EpsiloN

Re: any example of split screen game ? - 02/13/16 09:28

Originally Posted By: Wjbender
heads up : whilst two camera and viewports is not that hard , be aware that keyboards in general have limitations , perhaps you are planning to use joystick input ?

I cant confirm this with facts, but I think this problem exists only on some keyboards or for certain keys. If a keyboard stops working after 3 buttons, try using other 3 buttons, this has worked for me in the past laugh ... I just love NFS:HP...

PS.: Too bad I deleted all of my old projects. I made an awesome split-screen shooter in a dungeon setting once laugh
© 2024 lite-C Forums