First testing app :)

Post screenshots, binaries and projectfiles of the projects you have made with ZGE that you want to share!

Moderator: Moderators

Post Reply
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

First testing app :)

Post by turshija »

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
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.
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

The first ZGE application not written by me :D

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.
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

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 :)
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

You can still have varied levels using code like:

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
}
But I see your point, and I will put file input/output on
the feature request list.
User avatar
turshija
Posts: 127
Joined: Sat Feb 17, 2007 9:26 am
Location: Novi Sad, Serbia
Contact:

Post by turshija »

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 ...
Yo mama's so fat that a recursive function computing her weight causes a stack overflow.
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

I'm thinking about this, and I will make some kind of file input feature
for reading data from files similar to how you describe.

But I will first release the 1.0 version, then add more features afterwards :)
Post Reply