Gamestudio Links
Zorro Links
Newest Posts
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,296 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: create an endless Sideview level [Re: Espér] #213244
06/26/08 15:00
06/26/08 15:00
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
its like helgast already sayed he can exlain it better i think

here i used my powerfull paint maby you get what i mean


so you need to cut your realy big lvl in to small ones because they are easyer to create remove and delete
and the player doesnt notice much lagg
if you load the whole lvl in the first frame it takes a while


"empty"
Re: create an endless Sideview level [Re: flits] #213248
06/26/08 15:06
06/26/08 15:06
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok.. you meant:
this in as entity action:
Code:
action fieldmovement()
  {
    my.x -= 4*time_step;

    if my.x <= -20
      {
        ent_remove(my);
        ent_create("nameofmodel/terr/floor..",vector(800,0,helden_ent.z),fieldmovement);
      }
  }


Just as example.. But like that???


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: create an endless Sideview level [Re: Espér] #213249
06/26/08 15:13
06/26/08 15:13
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
like that, yes. but i would not create a new model in the action. removing my is ok but try to create an independent function which checks for entities which are to be created.

and you need the action code to be in a while loop, obivously...

Re: create an endless Sideview level [Re: Joey] #213251
06/26/08 15:23
06/26/08 15:23
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Code:
action fieldmovement()
  {
    while(1)
      {
        my.x -= 4*time_step;

        if my.x <= -20
          {
            ent_remove(my);
          }
        wait(1);
      }
  }


and
Code:
var map_position = 0;

function mapsetter()
  {
    while(1)
      {
        if (map_position == map_index[counting]){ent_create(...fieldmovement);}
        map_position += 1;
        counting += 1;
        wait(1);
      }
  }


where map_index is an Array with the Modelname and the time map_position must reach to create the object...

Better???


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: create an endless Sideview level [Re: Espér] #213287
06/26/08 19:43
06/26/08 19:43
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
map_position += time_step makes it framerate-independent.
way better. i'd check for the player's position instead of the time elapsed if i was you. then you get it totally time-independent.

since you're moving the level and not the player, keep an internal position vector at the player's virtual position. you can use double for a higher range.

Re: create an endless Sideview level [Re: Joey] #213428
06/27/08 20:14
06/27/08 20:14
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
i´m confused...
not a bit..
very hard confused ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: create an endless Sideview level [Re: Espér] #213461
06/28/08 07:39
06/28/08 07:39
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
var map_position = 0;

function mapsetter()
{
while(1)
{
if (map_position == map_index[counting]){ent_create...fieldmovement);counting += 1;}
map_position += movement_of_main_player;
wait(1);
}
}


Last edited by flits; 06/28/08 07:39.

"empty"
Re: create an endless Sideview level [Re: flits] #214300
07/03/08 22:53
07/03/08 22:53
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok..will try


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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