More infon on 3D Development (with video)

Talk about making games.

More infon on 3D Development (with video)

Postby Hblade » Tue Jun 01, 2010 12:38 pm

Yet again, only using 2 lines of code this time, not including the if statement, I was able to create another 3D example :D


I'm going to try and make 3D water now :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: More infon on 3D Development (with video)

Postby Bee-Ant » Tue Jun 01, 2010 5:45 pm

Hmmm...but you can actually make it without IF statement with only 1 line of code... something like this...

Background -> Keydown -> Left
Code: Select all
x-=cloneindex*0.5;
//I use cloneindex*0.5 instead of cloneindex/2 because division is slower

Background -> Keydown -> Right
Code: Select all
x+=cloneindex*0.5;

In this case, you have to clone the background with vertical array cloning :D

To make sure each clone's zdepth won't override each other :
Background -> CreateActor
Code: Select all
ChangeZDepth("Event Actor", 0.001*cloneindex);


Right? :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: More infon on 3D Development (with video)

Postby Hblade » Tue Jun 01, 2010 5:58 pm

The if statement was only to handle a lock on how long you can travel xD

The 1 line of code used was - keydown
Code: Select all
x+=(yscreen/30);
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: More infon on 3D Development (with video)

Postby Bee-Ant » Wed Jun 02, 2010 7:08 am

Hblade wrote:The if statement was only to handle a lock on how long you can travel xD

Draw Actor :
Code: Select all
limit=max(-640,min(limit,640));


Then add limit adjusting on the Keydown :
Left
Code: Select all
limit--;

Right
Code: Select all
limit++;

:D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: More infon on 3D Development (with video)

Postby Hblade » Wed Jun 02, 2010 10:04 am

omg thanks :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest