Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: nxtboy III on September 30, 2012, 01:44:24 am

Title: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on September 30, 2012, 01:44:24 am
Hi everybody!
I am making a new NXT game called Angry Blockheads!
Thanks to Builderboy, this game is possible. He helped with the physics (he helped A LOT).

You are a Lego Minifig head. Your goal is to smash a tower made of Lego bricks. Each time you smash a tower you get money (not added yet). You want revenge on those Lego bricks for, well, being Lego bricks. :P
You launch the Lego head at a certain angle and power, and try to destroy the tower. If you get all the blocks (and the player) below the line, you win!
Now with improved graphics, scrolling, and more!
Here's a screenie: (Sorry the screenie is flashing, it is the screen recorder's fault. On the actual NXT it doesn't flash and it looks perfect)
(http://img.removedfromgame.com/imgs/AngryBlockheads-3_003.gif)

Credits:

Physics- Builderboy
Main Programming- nxtboyIII



Any ideas/suggestions? Just reply! :D

Thanks, and have a nice day,
nxtboy III
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: chickendude on September 30, 2012, 04:25:19 am
Wow, that looks really cool. The physics have got to be a pain! I'd love to see a screen with less flashing (maybe turn off grayscale emulation?). It looks really amazing!

Btw, what is NXT?
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: Sorunome on September 30, 2012, 12:58:34 pm
wow, this is awesome! How do you actually program the nxt like that? (lejos?)
Btw, what is NXT?
That lego-robotor, the newest one
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: nxtboy III on October 01, 2012, 04:41:44 pm
The video isn't flashing because of grayscale. D:
It's just because the recorder doesn't respond to display flags and refreshes at 50 ms the least. D:

Any ideas/suggestions? :D
Thanks

EDIT: Now, in the new update, to win a game, all the blocks must be below a certain line and not moving. Also, the title screen looks cooler when transitioning.

EDIT2: New screenie!
(http://img.removedfromgame.com/imgs/AngryBlockheads-1_001.gif)
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: DJ Omnimaga on October 01, 2012, 05:05:12 pm
Looks nice. What do you use now to make the screenshots? They look much better
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: nxtboy III on October 01, 2012, 05:07:29 pm
I use the same program I used to use. XD
It looks better because this game isn't in grayscale.
Any suggestions? Or anything? :D

Thanks, and have a nice day,
nxtboyIII
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: DJ Omnimaga on October 02, 2012, 01:12:34 am
I don't have much ideas yet, but do you think you could fix the flickering when stuff moves around?
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: Darl181 on October 02, 2012, 01:36:36 am
Not sure if this is just me, but first thing that went through my head when I saw this was "Zedd."  Tho reading the post again I guess it checks :P

Looking pretty good anyways. It might help to make the transition from the menu/splash screen faster if possible, but the effect is nice :)
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: chickendude on October 02, 2012, 06:37:45 am
In WabbitEmu/PindurTI/tilem2 they all slow the refresh rate to try to emulate grayscale, but if you aren't using grayscale it tends to give blurry screenshots. In WabbitEmu/PindurTI you can change the actual refresh rate, in tilem2 you can just turn off grayscale support. How do you take your screenshots?

In any case, it looks amazing, it seems like you're already really far along.
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: nxtboy III on October 02, 2012, 12:49:23 pm
Well builderboy helped a ton with the physics, so thats probably why you thought of Zedd.
I am actually using a screen recorder, not an emulator. the NXT is connected to the computer via USB and the software records the screen.
So what do you all think of my game so far?
Any sugggestions?
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: Sorunome on October 02, 2012, 08:02:36 pm
It is looking pretty nice! :D
and/me pokes his question if you are using lejos
Title: Re: [NXT] Angry Blockheads!-Destroy the tower, win the $
Post by: nxtboy III on October 02, 2012, 08:13:06 pm
oooooh thanks.
Ya i'm not using LeJOS. I'm using NXC (http://bricxcc.sourceforge.net/nbc/nxcdoc/index.html).
NXC is SO awesome! It stands for Not eXactly C. It is very similar to C, so it is very easy to use and has many, many functions. I love it so so so so much. XD
So, do you have any suggestions for my game? Like what I should add to it? Or change to it? :D

Thanks,
nxtboyIII
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 08:22:51 pm
maybe that it counts how often in a row you won and make out of that a highscore list :D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 08:24:32 pm
hm... Good idea! :D
How would I make it so each level gets harder?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 08:25:40 pm
mhmm, maybe bigger blocks, different arrangement....or, lower the line
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 08:28:03 pm
Yeah I could make the chance of a bigger block being chosen more high (each level has random blocks) since bigger blocks have a bigger mass, and therefore are harder to move.

EDIT: Hopefully this screenie looks better:
(http://img.removedfromgame.com/imgs/AngryBlockheads-2_002_002.gif)
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 09:22:26 pm
The screenie is A LOT better, this shows how the game is moar awesome!
Do you actually draw everything by drawing rectangles or by using sprites?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 09:23:26 pm
I use sprites that I made.
Any suggestions (I know, I keep asking that :P)?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 09:24:45 pm
Does it involve your new touchpad for aming?
If no - that is a suggestion :P
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 09:27:52 pm
Oh. No it currently doesn't but that would be an awesome feature.
Anything else? :D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 09:29:41 pm
maybe you could try to add the nxts beeping and maybe even add enhanced sound effects :D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 09:42:24 pm
Nxt's beeping? It's way better.
When 2 objects collide, they make a sound usually. The faster (harder) they hit, the louder the hit sound is. :D
Also there is a sound effect at the beginning screen, and sound effects for winning and losing.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: chickendude on October 02, 2012, 09:51:02 pm
*Doh* i just realized this wasn't for the 83/+ and now i'm really bummed out. That new screenshot looks much better! My only suggestion i can think of is larger more complex levels.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 09:54:16 pm
XD

lololol. Thanks anyways. The screenie looks like a TI84 screenie, doesn't it? XD
So what could I add to make levels more complex?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 09:54:48 pm
maybe also different shapes :D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 10:01:26 pm
Different shapes?
Like besides rectangles? I can only have a rectangle collision shape. D:
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: chickendude on October 02, 2012, 10:03:14 pm
I was thinking it would be cool to have larger levels, i don't know how difficult it would be to have a field larger than the screen (so that it scrolled). You could also add in objects that don't move that you have to go around.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Sorunome on October 02, 2012, 10:04:08 pm
or objects where only the mass is different, not the size
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 02, 2012, 11:22:15 pm
hmm..mhmmm...mmmmmmmhhhhhmmmmmmmmmmmmmmmmmmmmmm..........
...
That would be AWESOME if the map was scrolling!!! Nice idea!!!!!!!!!
@Sorunome Yeah so different objects could be like, different materials (heavier)? Sweet! :D Thanks you all!
Lol any more suggestions? XD
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 05, 2012, 12:45:51 am
New update!!
Improved graphics, scrolling, and more! :D
(http://img.removedfromgame.com/imgs/AngryBlockheads-3_003.gif)
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 08, 2012, 10:34:52 pm
So what do you all think of the new update?
Any suggestions?

Thanks,
nxtboy III
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: lkj on October 09, 2012, 06:56:36 am
Is there a download so people with an NXT can test it?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 09, 2012, 04:45:34 pm
No not right now. Do you have an NXT?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Yeong on October 09, 2012, 06:06:20 pm
I just stumbled upon this project. Nicely done. :D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: lkj on October 10, 2012, 08:06:24 am
No not right now. Do you have an NXT?
Yes, I'm using it for a school project.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: chickendude on October 10, 2012, 10:49:07 am
It looks a lot better :) Is the flicker that bad on the actual NXT? The only thing i can say is that i think the block should have a little more space to move on the screen without shifting it. Currently it moves the whole screen a lot and it can feel a bit dizzying.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Stefan Bauwens on October 10, 2012, 12:22:55 pm
Looks nice nxtboy IIII.
Offtopic:I wonder if you could send a z80 rom to the nxt or something and then have a caluclator working on it.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 10, 2012, 05:09:57 pm
Thanks stefan and chickendude. :D
On the NXT it doesn't flicker at all. It is completely flickerless (except at the top right of the screen).

Anything else?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: DJ Omnimaga on October 10, 2012, 05:54:13 pm
I like the newly added graphics O.O

Also I need to check if Zellers got NXT stuff for when their liquidation sale nears its end, in case they still have some for cheap.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Builderboy on October 10, 2012, 06:00:11 pm
I would suggest making the tower blocks a lot heavier, such that it is much harder to break down towers, requiring more strategy.  I would also suggest pre-built configurations for each level, that way the tower doesn't fall apart right as you start, and also so you can make the levels harder without simply lowering the bar.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on October 11, 2012, 07:47:14 pm
@Builderboy
Yeah I will make the player's mass smaller, that way, as you said, it is harder to destroy towers. But how would I have pre-built levels? That would be cool if I made a level editor.

@DJ_O
Thanks. Should I change the graphics for the blocks?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Spenceboy98 on October 28, 2012, 05:43:52 pm
How did you do the collisions and physics?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: ben_g on October 28, 2012, 05:53:15 pm
This looks like a nice game.

It's quite unrelated, but I wonder if those games could be converted or the source code recompiled to work on the 84+. The screen looks very similar and it looks like processing speed is not much different from that of the calc.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: DJ Omnimaga on October 28, 2012, 05:57:00 pm
@Nxt nope I think the graphics looks pretty fine for the blocks. Also having them look simple compared to the landscape  makes them easier to see.

You could maybe have black blocks, though, with a second line. The black blocks would need to be under the lowest line while the others would be fine if it's under the highest line. There could be an hard mode forcing white blocks to be between both lines, but I think that might be sadistic XD
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on November 13, 2012, 08:54:36 pm
hmm....
Good ideas, good ideas.

@ben_g
Yeah that would be cool if it were converted to TI 84. :D

@Spenceboy98
The physics? Builderboy helped me a ton with that. Well, for collision, when 2 objects collide, it detects which axis they collided on, then, based on that, it uses an equation to calculate the velocities once they collide, based on current velocity, their mass, and the global bounce absorption.
Each objects has it's own X, Y, velocity X and Y, mass, etc.
Those are each essential to the physics engine.
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Spenceboy98 on November 13, 2012, 09:12:38 pm
@Spenceboy98
The physics? Builderboy helped me a ton with that. Well, for collision, when 2 objects collide, it detects which axis they collided on, then, based on that, it uses an equation to calculate the velocities once they collide, based on current velocity, their mass, and the global bounce absorption.
Each objects has it's own X, Y, velocity X and Y, mass, etc.
Those are each essential to the physics engine.

Would you mind sending me the equation(here or by pm)?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on November 13, 2012, 09:19:45 pm
Ok, sure.

Well, I used Builder's equation. :D
Here it is (Do this 4 times, 2(1 for each object) for X and 2 for Y):
By the way, V is velocity, C is the bounciness (from 0 to 1), and so on.

V1 = (C*M2*(V2-V1)+M1*V1+M2*V2)/(M1+M2)
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: leafy on November 13, 2012, 09:30:32 pm
It's the classic equation for the coefficient of restitution - if you want a more in-depth explanation, look it up on Wikipedia ^^
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on November 14, 2012, 10:33:04 pm
:P

Any suggestions?
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Camdenmil on November 14, 2012, 11:33:51 pm
Wow, I just stumbled upon this topic. have you tried grayscale? 83+ style 3 level grayscale looks good on my NXT. ;D
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: leafy on November 14, 2012, 11:37:00 pm
One thing I think you're ready for now is destructable blocks (maybe even pigs?) I'd probably give each block a starting health, and subtract from it each time something hits it by the mass times velocity. Unfortunately, there are some drawbacks to this method, but it should be pretty interesting to see what you come up with ^^
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on November 20, 2012, 11:29:27 pm
Thanks for the idea.
(lol pigs)

What are the drawbacks?

@Camdenmil
Well, yeah, I have made 4-level grayscale games for the NXT, its actually pretty awesome. :D

Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: nxtboy III on May 14, 2013, 07:58:04 pm
lol
Title: Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
Post by: Hayleia on May 15, 2013, 02:38:45 am
Was there a post in between or are you lol'ing because you necroposted ? ???