Ok i have been playing a little bit with objects and gravity and collisioning and this is my first app with that
i need just one thing to make a little game from this thingy:
is there any possibility to make program read something from file? For example I want to make lvl1.dat , lvl2.dat ... And program reads the level layout and puts it in game...
Boris
First testing app :)
Moderator: Moderators
First testing app :)
- Attachments
-
- test.zip
- (45.91 KiB) Downloaded 715 times
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
The first ZGE application not written by me
Cool!
Hmm... file support is not a feature yet. It might come in a later
version.
Try to use procedural techniques. Instead of having each level in a file
use something like:
Calculate difficulity for new level:
NrOfEnemies=LevelNr * 5;
NrOfObstacles=LevelNr * 3;
Then spawn obstacles and enemies using a repeat-component.
Determine "random" start locations for model that will depend
on levelnr.
EnemyModel.OnSpawn:
CurrentModel.Position.X = noise2(LevelNr*10,0) * 5;
That way you can have levels which increase in difficulty by having
more enemies and obstacles, but have the same starting positions
every time you arrive at the same level, just as if they had been
predefined in a file.
Bad thing: You cannot control exactly where enemies will appear
in each level.
Good thing: If you write some clever expressions, then your game
will have an almost infinite nr of non-repeating levels
It is a bit difficult to explain. I will write tutorials on procedural techniques
later on.
Cool!
Hmm... file support is not a feature yet. It might come in a later
version.
Try to use procedural techniques. Instead of having each level in a file
use something like:
Calculate difficulity for new level:
NrOfEnemies=LevelNr * 5;
NrOfObstacles=LevelNr * 3;
Then spawn obstacles and enemies using a repeat-component.
Determine "random" start locations for model that will depend
on levelnr.
EnemyModel.OnSpawn:
CurrentModel.Position.X = noise2(LevelNr*10,0) * 5;
That way you can have levels which increase in difficulty by having
more enemies and obstacles, but have the same starting positions
every time you arrive at the same level, just as if they had been
predefined in a file.
Bad thing: You cannot control exactly where enemies will appear
in each level.
Good thing: If you write some clever expressions, then your game
will have an almost infinite nr of non-repeating levels
It is a bit difficult to explain. I will write tutorials on procedural techniques
later on.
ye, i know but i don't want to make level like me and then opponents spawn and stuff... I want to make something like arcade game, you play, jump over the obstacles and stuff like that ... Finishing levels, proceeding to next level with much harder obstacles, maybe some moving objects that will kill you if you touch them...
So thats why ZGE needs importing from file
So thats why ZGE needs importing from file
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
You can still have varied levels using code like:
But I see your point, and I will put file input/output on
the feature request list.
Code: Select all
if(levelNr>5) {
//spawn new kind of enemies on higher leves
}
if( frac(levelNr/2)==0 ) {
//even levelnr: one kind of obstacles
} else {
//odd levelnr: other kind of obstacles
}
the feature request list.
yeah, but I would like to create some of arcade games that load the level from txt or dat file and for example they are presented as a text in some format like:
@@@@@@@@@@@@@@@@@@@
@ @
@ @
@ ___ ____ @
@ / | | \ @
@ P / | /\/\/\| \ E @
@@@@@@@@@@@@@@@@@@@
or any other way ... (use imagination ) so that program can read it and set the walls and obstacles as shown in level.dat file ...
@@@@@@@@@@@@@@@@@@@
@ @
@ @
@ ___ ____ @
@ / | | \ @
@ P / | /\/\/\| \ E @
@@@@@@@@@@@@@@@@@@@
or any other way ... (use imagination ) so that program can read it and set the walls and obstacles as shown in level.dat file ...
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.