Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
My game ccb !

carlosm
Registered User
Quote
2019-12-14 21:24:02

- CopperCube people.

Well, two months I am developing a game with a ccb.

well the platform game is mixed with rpg. The character is a druid I am thinking of changing characters.


🔎︎


I am making a random drops code available.

var drop_aleatorio = function() {

var key_drop_aleatorio = ccbGetCopperCubeVariable('key_drop');

if(key_drop_aleatorio == 1){
var maximo = 14;
var resultados = 7;

var i, arr = [];
for (i = 0; i < maximo; i++) {
arr[i] = i + 1;
}

var p, n, tmp;
for (p = arr.length; p;) {
n = Math.random() * p-- | 0;
tmp = arr[n];
arr[n] = arr[p];
arr[p] = tmp;
}

for (var i = 0; i < resultados; i++) {

var nome_mob = 'Mob_' + arr[i] + 'N';
var nome_item = 'item_' + arr[i];
ccbSetCopperCubeVariable(nome_mob, nome_item );
}


ccbSetCopperCubeVariable('key_drop', 0);
}
};

ccbRegisterOnFrameEvent(drop_aleatorio);


This code above generates without repeating numbers randomly according to the number generated by mobs (enemies) that are selected and received an item!


srfstudio
Registered User
Quote
2019-12-15 13:48:31

This is a very nice project, good luck!
I also really like the cartoon approach, I think it's a great way to get the most out of CC and it's always a good choice for creating a fun game.


carlosm
Registered User
Quote
2019-12-15 15:56:08

Thank you. @srfstudio

Please be aware that after seeing your project Aziella Chronicles, decide to do mine too.


srfstudio
Registered User
Quote
2019-12-16 13:21:26

That's great to hear, I'm very pleased that my game has such a nice reception, cheers!
I do believe that cartoon/cartoonish/stylized visual approach is a way to go with CC. It's less intense for engine to render & it's more realistic to be finished from the one-man-does-all type of game development :)


just_in_case
Moderator
Quote
2019-12-17 11:01:22

Nice Project. Visuals are also good.


carlosm
Registered User
Quote
2019-12-19 15:04:13

I solved the problems encountered with the space key and the behavior between two points! it was the variable TimeMs. after changing everything works fine.
Thank you.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact