Im working on a 2D Minecraft and ran into a small problem.
Im in the process of adding trees. The wood generation is finished and works great but the leaves is what I would like help on.
I could easily make it so it spawns a certain cluster of leaves around the top block of wood or something like that, but what I want is something a bit more random.
I want it to create a random cluster of leaves around the top block so its different every time and appears more natural than having every tree have the same leaves around it.
Is there a certain type of formula or algorithm to do something like this? If so please help me out and let me know.
Thanks!
- Game Maker Community
- → Viewing Profile: Topics: Sinsation
Sinsation
Member Since 30 Mar 2012Offline Last Active Apr 30 2012 03:59 AM
Community Stats
- Group New Member
- Active Posts 13
- Profile Views 144
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
-
Version
GM8
0
none
Friends
Sinsation hasn't added any friends yet.
Topics I've Started
Random "Specific" Cluster Generation
16 April 2012 - 03:33 AM
Inventory Problem
08 April 2012 - 05:31 AM
I'm not very good at finding problems with code so I really need to ask for help from you guys
When the player collides with a block it uses this code:
It looks good in the inventory hotbar and everything then when I right click it just spawns another player.( obj_player );
On right click code:
If you need any more info or code just let me know.
When the player collides with a block it uses this code:
Found = 0;
for( i = 0; i < global.AvailableInv; i += 1 )
{
if( global.Inv[i,0] == other.Name )
{
global.Inv[i,1] += 1;
Found = 1;
break;
}
}
if( Found == 0 )
{
for( i = 0; i < global.AvailableInv; i += 1 )
{
if( global.Inv[i,1] <= 0 )
{
global.Inv[i,0] = other.Name;
global.Inv[i,1] = 1;
global.Inv[i,2] = other.RealName;
global.Inv[i,3] = other.sprite_index;
break;
}
}
}
with( other ) instance_destroy();It looks good in the inventory hotbar and everything then when I right click it just spawns another player.( obj_player );
On right click code:
if( !instance_position( mouse_x, mouse_y, block_parent ) && !instance_position( mouse_x, mouse_y, obj_player ) )
{
if( global.Inv[global.CurrentInv,1] > 0 )
{
instance_create( ( ( mouse_x div 32 ) * 32 ) + 16 , ( ( mouse_y div 32 ) * 32 ) + 16, global.Inv[global.CurrentInv,2] );
global.Inv[global.CurrentInv,1] -= 1;
}
}If you need any more info or code just let me know.
Requesting Military-Like Turrets
30 March 2012 - 03:52 AM
I am currently in the process of making a Tower Defense with a sort of "Defend your country" kind of theme.
Im a fairly decent coder but my spriting skills is quite frankly, awful.
Im just wondering if someone could create a few sprites for me:
1. A machine gun type turret
2. A missile launcher turret
3. A air-lock turret( Only shoots planes and that kind of thing )
4. Flame thrower turret
These should all be based on the military and should all have the same theme.
Any help would be appreciated, thanks guys!
Details:
Size: 32 x 32
Colors: Grey or white - metallic( looking ) if possible
Perspective: Top-Down
Im a fairly decent coder but my spriting skills is quite frankly, awful.
Im just wondering if someone could create a few sprites for me:
1. A machine gun type turret
2. A missile launcher turret
3. A air-lock turret( Only shoots planes and that kind of thing )
4. Flame thrower turret
These should all be based on the military and should all have the same theme.
Any help would be appreciated, thanks guys!
Details:
Size: 32 x 32
Colors: Grey or white - metallic( looking ) if possible
Perspective: Top-Down
- Game Maker Community
- → Viewing Profile: Topics: Sinsation
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content