Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,758 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Block breaker help or tutorial? #320326
04/20/10 22:29
04/20/10 22:29
Joined: Apr 2010
Posts: 59
Lagos, Nigeria
gameaddict Offline OP
Junior Member
gameaddict  Offline OP
Junior Member

Joined: Apr 2010
Posts: 59
Lagos, Nigeria
Hi! I'm a beginner and I'm trying to learn the coding aspect of the engine. I'm trying to code a game of block breaker but I can't figure out how to make the upper blocks appear. I already have the graphics and everything and I've coded the paddle for the player and the ball. I can't figure out how to make multiple paddles that will be broken by the ball. Do I create an array of some sort? How do I go about it? Please help me.


I know I can.
Re: Block breaker help or tutorial? [Re: gameaddict] #320381
04/21/10 12:25
04/21/10 12:25
Joined: Apr 2010
Posts: 59
Lagos, Nigeria
gameaddict Offline OP
Junior Member
gameaddict  Offline OP
Junior Member

Joined: Apr 2010
Posts: 59
Lagos, Nigeria
Hey guys! Is anyone going to help me? Please...


I know I can.
Re: Block breaker help or tutorial? [Re: gameaddict] #320386
04/21/10 13:32
04/21/10 13:32
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
please be more patient, wait at least 24 hours until you ask again.

You don't need an array for that, use ent_create in a loop like this:

Code:
int i,j;

i = _; // edge of field
while (i < _)
{
  j = _;
  while (j < _)
  {
    ent_create(vector(i, j, 0), _, _);
    j += _;
  }
  i += _;
}



this code is not complete and untested, you need to replace the _ with fitting values for your game. It can create fields of enemies.
check ent_create in the manual if you don't know it yet.

Re: Block breaker help or tutorial? [Re: SchokoKeks] #320432
04/21/10 18:22
04/21/10 18:22
Joined: Apr 2010
Posts: 59
Lagos, Nigeria
gameaddict Offline OP
Junior Member
gameaddict  Offline OP
Junior Member

Joined: Apr 2010
Posts: 59
Lagos, Nigeria
Thanks for replying. I'll try the code. thanks a million.


I know I can.
Re: Block breaker help or tutorial? [Re: gameaddict] #320434
04/21/10 18:55
04/21/10 18:55
Joined: Apr 2010
Posts: 59
Lagos, Nigeria
gameaddict Offline OP
Junior Member
gameaddict  Offline OP
Junior Member

Joined: Apr 2010
Posts: 59
Lagos, Nigeria
I'm actually creating a 2d version so I decided to use bmap_create. The game loads but the blocks are not displayed. Then I tried using a panel without using bmap_create inside the loop but it is only showing one block. Please how do I fix this?


I know I can.

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