ForumsProgramming ForumBotsi - My first really flash game XD

48 22137
Carlytoon
offline
Carlytoon
324 posts
Nomad

Hi
I just worked 1 month and 3 weeks to develop my first master creation, its botsi, a game about a robot that need to be tested to know his true potencial.

Here is the link to play it:
http://miprogramacionenas3.blogspot.com/2011/10/botsi.html

Move with arrows keys and jump with Z.
Comment and enjoy!!!

  • 48 Replies
Carlytoon
offline
Carlytoon
324 posts
Nomad

Explain to me how the collisions work in this game, provide the code

Great, but i warn you that it gonna a be a big explain, sorry if in the comments I have spell error (im mexican).

Here is the code (just for bottom collision), I suggest you hightlight the code:

//Defining the boxBottomMeeting ubication;
package myGameLibrary.Collision{
//Importing flash classes, because i gonna use them in my function;
import flash.display.MovieClip;
import flash.geom.Rectangle;

//boxBottomMeeting function starts here.

//Notice that I manage a Array, that array holds the instanes that
//I gonna check for collsion. The function return a boolean that says
//if a collision ocurred;
public function boxBottomMeeting(clip:MovieClip,dist:int,array:Array):Boolean {
//The boolean that I gonna return;
var collide:Boolean = false;

//Clip is the player, but it can be any Movieclip I want;
//Box is a rectangle that is part of my custom class;

var w1:Number = clip.box.width / 2;
var h1:Number = clip.box.height / 2;

var x1:Number = clip.x + clip.box.x + w1;
//Okay I gonna explain the previous var part for part...
//I add to the clip.x the clip.box.x for manage boxes with different positions;

//Same thing as previous var.
var y1:Number = clip.y + clip.box.y + h1;

//I gonna define this vars latter...
//Acutally is the same thing that I do with upper vars.
var x2:Number;
var y2:Number;
var w2:Number;
var h2:Number;

//Looping all the array to check if theres a collsion;
for (var i:int=array.length-1; i>-1; i--) {
//The same thing that I do previously, but this is for the
//second object indispensable for check the collision.
w2 = array[i].box.width / 2;
h2 = array[i].box.height / 2;
x2 = array[i].x + array[i].box.x+w2;
y2 = array[i].y + array[i].box.y+h2;

//Checking if clip (in this case player) is higher than
//array[i] (in this case the wall)
if (y1 > y2) {
//Okay, is hard to explaind this, I gonna try to explain it in
//a image more later...
if ((y1< y2+h1+h2+dist)&&(x1>x2-w1-w2+1)&&(x1< x2+w1+w2-1)) {
collide = true;
}
}
}
//Return if theres a collsion;
return collide;
}
}

Here a image where I explain how the function and variables works:

Collision image.

I hope this is sufficient proof
Carlytoon
offline
Carlytoon
324 posts
Nomad

Whoops, I forgot to say that "dist" is for the distance that you want to check the collision, for example:

if(boxBottomMeeting(clip,-4,wall)){
doSomeThing();
}

Darkroot
offline
Darkroot
2,763 posts
Peasant

When I go through you stuff in more detail including the game and your last project I see things that strongly suggest it's based on an engine. Including small problems with the implementations of the engine in the game. Your last post on the level editor is also eerily similar to the fixel one including your controls. Shift+click in both of them? Especially when that is an poor design scheme to have. You didn't really summarize the code only comment in it. Which could of just been reworded.

But I think we should just drop the issue. Programming forum is about programming. I keep pressing my ideals of a full-fledged mature forum but this obviously does not fit this site. Since the original intent of this thread was as a review and did not provide any code it should have been placed in the flash game thread where only comments on the game and design would of been invoked.

So basically my proposition is that don't post your game here unless you feel like posting the .fla with any .as with it and if you want to review then just post it in the flash game section. Since this is a pure programming thread not a flash game design review thread. It seems fair to both side and hopefully stop this endless and tiring conflict.

Truce.

Carlytoon
offline
Carlytoon
324 posts
Nomad

Darkroot stop being jealous and please go with your "I dont believe you because you are better than me" comments and dont post in this topic again.

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

At what point did Darkroot state that he is jealous?

And he has total rights to continue posting in this topic.

So basically my proposition is that don't post your game here unless you feel like posting the .fla with any .as with it and if you want to review then just post it in the flash game section. Since this is a pure programming thread not a flash game design review thread. It seems fair to both side and hopefully stop this endless and tiring conflict.


I completely agree. This forum was created to users to help other users with programming or get help themselves for programming. This is not a 'show off your games here' forum.
gaboloth
offline
gaboloth
1,613 posts
Peasant

Though, since we don't have a game design forum, it's totally legit to post a game without the source code if you want some help with the game design and the art, isn't it?

Darkroot
offline
Darkroot
2,763 posts
Peasant

http://www.youtube.com/watch?v=6lLs2dC9NaE


I don't really like John Lennon and it is funny how you change the direction to my claims.

Darkroot stop being jealous and please go with your "I dont believe you because you are better than me" comments and dont post in this topic again.


When did I ever say that? You are on the verge of personal insults which against community rules. Not posting here is something I would do out of respect not as something that is against community rules if I continued to do. Don't mistake the two.

Though, since we don't have a game design forum,


Maybe it's something we should have or consider. The flash game thread to be pretty good for since it is about flash games.

it's totally legit to post a game without the source code if you want some help with the game design and the art, isn't it?


Sure is, I just offered a beneficiary solution since the whole intent of this thread was a review of a flash game and talk about it. Seems to be suited to the programming thread.

@Carlytoon It is really nice to see how you really are.

The issue will turn out the way people want it to.

Anyway I think this topic has deviated enough lets just post on the game now.
Carlytoon
offline
Carlytoon
324 posts
Nomad

Okay, but please, dont say me things like "You based your engine from another engine" or "Is hard to believe you". I made all the engine by myself.

@Darkroot, sorry for my comments and my conduct, but you need to understand how I feel, I mean, I made a whole game by myself and the people just dont believe me, it hurts D:

So darkroot, do you wanna forget all of this and be friends?

other people, please, comment about the game, and dont ask for the source code because I dont gonna reply you.

KyahcoSukaimasutae
offline
KyahcoSukaimasutae
311 posts
Nomad

uhg... @darkroot and other "devs"
no comment...

nice system for collision, i must say it is very effectent. i don't see why it is though to be "complex" and "out of your's and mine's range" as it is simple when you understand it, though i like that yours does not use libraries or any thing, mine needed flashpunk, but awesome job on that!

i would ajust the numbers on the gravity and such, i used 0.2 for gravity and 4 for jumping and 0.5 as my base speed (3 as a max, but i would set a friction if your doing volacity), those are what i used but they limited my player to jumping only 40 pixels or so on a "hold button jump" i would set jump to 5 or so maybe more, but realy just messing around with it A LOT will give it that smooth feel.

So darkroot, do you wanna forget all of this and be friends?


i have asked you this to darkroot, what do ya say? for the both of us?
OneWizard
offline
OneWizard
5 posts
Nomad

Hey Carlytoon! Botsi was a fun game, and I was surprised to see somebody who has a working platforming engine (all the ones I looked up were terrible, so I made my own too). A few suggestions though:

1. I noticed that when you hold a key after you beat a level, the game doesnt realize that it is still being held in the next level (just a matter of transporting the key variables between levels).
2. The finish and checkpoint boxes are conflicting with the rest of the cool graphics.
3. The game is sort of short and repetitive.

Also, it would be cool if there was a main menu of some sort, and a pause menu, but those are just extra things.

Carlytoon
offline
Carlytoon
324 posts
Nomad

@OneWizard, Im glad that you find and tell me that bugs, I will take these issues in mind when developing another game, thanks.

Dannydaninja
offline
Dannydaninja
948 posts
Nomad

@Carlytoon I know how you feel, I used to be a regular of the Kongregate programming forum. I had a bad reputation of trolling and stealing/copy-pasting code. So when I eventually stopped and made a game with my own code, nobody believed me at all. So I understand that you got upset when you worked hard and people seem to be accusing you of stealing code, but getting angry and slightly insulting other programmers on this forum isn't the way to go. Don't lose your cool, this is only the Internet! :P

SkeloPatch
offline
SkeloPatch
13 posts
Nomad

its a nice game for a first

Smokeshow
offline
Smokeshow
69 posts
Peasant

o.O your first game? Man you should be proud this game rocks! Hope you submit it on [b]ARMOR GAMES!

Carlytoon
offline
Carlytoon
324 posts
Nomad

o.O your first game? Man you should be proud this game rocks! Hope you submit it on ARMOR GAMES!


Do you think that Botsi is a game that armor games users will enjoy?
Showing 16-30 of 48