Pular para o conteúdo principal

Simple game test I

Based on a tutorial about how to do an atari game, I'm trying to follow the same logic to achieve the same but with gamesalad.

http://www.tinkernut.com/2010/01/05/how-to-make-an-atari-game/

Gamesalad is a "from scratch" game engine, that let you develop a game without write one single line of code and being able to deploy to a good number of platforms, like ios, android, html, windows, mac. Im not going deep about gamesalad features.



The point is that, with no experience in gamesalad i want to try do a similar game-tutorial like described above.

Well, you don't need write any code but you are not free from thinking logically.

After a while actually, for me, its being annoying so many clicks around to get things working.

No that I'm such a brilliant programmer (because I'm not) but sometimes a think some things could be solved with a little lines of code.

In an any programming language i could make an enemy chase the player with something like:

"
If enemyPositionX < playerPositionX
Then
enemyPositionX = enemyPositionX + 2
"
And so on.

With this code being part of the game-loop then we can update the enemy position to near the player position and then take care about the collision.

In game salad i create an actor, its like a game object that represents my enemy and another one that represents my player.

Then i wanted to create a new behavior, that will put some logic to this object.

But i cant reach another object attribute from here, like the player actual position.

First thing we could do is create some attribute (variable) in our "game" object. Really makes sense but like my nature is always make it harder i tried work with tables.

Tables are objects like an spreadsheet but i would like to think more its like a big array object. Yes, thats it.

Then i create this table and signed initial value to zero. Next i need to populate this  cell with player and enemy positions.

So i went to each actor and created a rule that says, every 0.0 seconds, write the position xy in my table object.

If i don't put this "write table" rule in a time loop like this, then we got the values in table cell just one time, when we created the object.

I know already that using Time and Move behavior are cpu consumer but i can change to best work arounds like Game.Time attribute and Interpolate behavior, later.

Then when i used similar rule as described in the beginning of this post, things become so lag in the game screen.

No, no, its cant be like this, so simple running every-second- tick-a test to move the enemy to the player value.

Ok, i will try the Game object attribute instead write and read from a table. Lets see what happens...

I still thinking that should be easier if i could write some if-then statement.

But its part of learning new things. Hope i can learn fast and well to really enjoy this technology. But i miss write my own rules instead clicks and drag and drop objects....

Comentários

Postagens mais visitadas deste blog

Gamasutra's Postmorten: RiverMan Media's MadStone

Aqui vão os meus comentários sobre este postmortem. O jogo em questão, MadStone, foi desenvolvido para a plataforma WiiWare, vindo de um antigo sonho de publicar um jogo para Nintendo (dos fundadores da RiverMan). MadStone é um puzzle 2d, onde as peças vão caindo (assim como tetris) e que custa U$8.00 no WiiWare. Antes de publicar um jogo para WiiWare, a desenvolvedora havia já desenvolvido outros dois jogos casuais para PC, Cash Cow e Primate Panic. Tela do jogo MadStone Bom, vamos às dicas deixadas pelos desenvolvedores: O que funcionou: 1. Correr atrás da Nintendo: Entre contatar a Nintendo e se tornar um desenvolvedor autorizado, os desenvolvedores tiveram que correr um pouco atrás. A primeira lição é justamente essa, não é fácil correr atrás e muitas vezes temos que sair de nossa zona de conforto para conseguir as coisas. 2. Plataforma 2D: A decisão de desenvolver um jogo 2D foi tomada por algumas facilidades como ferramentas de arte mais simples, como o photoshop; Pouco código

Converter campo text para varchar – SQL Server 2000

Outro dia, conversando com um analista de sistemas no trabalho, este me perguntou, qual era melhor, usar o tipo text ou varchar no campo. Bom, baseado em minhas experiências, respondi que prefiro trabalhar com varchar. Mas antes, uma breve pesquisa no google nos mostrou que: text     Variable-length data with a maximum length of 2^31 - 1 characters varchar Variable-length data with a maximum of 8,000 characters fonte: Database Journal Depois de analisarmos o propósito a que o campo serviria, decidimos por um campo varchar(500). Se você, assim como eu, tentou utilizar uma alter table, alter column, deve ter visto um aviso do SQL Server de que isto não é possível de se fazer. Mas e agora? É isso mesmo que pensamos: temos que criar o novo campo e popular com o que havia no antigo campo. Exemplo: EXEC sp_rename 'tab_inf_nota.mensagem', 'mensagem_old', 'COLUMN'

My fist job @ game industry!

Yes, yes and yes! I have no words to describe this! Awesome, hot, wild! So, what I did? Work as Game Tester for  @LowpolyStudios The game Blowing Pixels Planet Defender for #iPhone was sended to Apple Store review in August 17 and is expected to launch in August 29, so stay tunned! Blowing Pixels Planet Defender, or just BPPD, is a Defender kind game, so you have to break the enemies invasion. Actually, this game is so addictive, like play Tetris! Your brain will enjoy, hwar, hwar, hawr... You can see more details @ developer's web sites: http://www.lowpoly-studios.com/ http://www.facebook.com/LowpolyStudios http://twitter.com/#!/lowpolystudios http://www.blowing-pixels.com/planet_defender.php Oh! Yeah, the Credit Screen: I'm in Testers part: ALEX CANCADO. So, fuck'n YEAH! Next related post I will write about how I get in touch with developer and my contribution about the game.