Author Topic: [AXE] Bullet Hell  (Read 14636 times)

0 Members and 1 Guest are viewing this topic.

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #15 on: November 27, 2012, 12:46:53 pm »
Well to speed up each bullet you could use two rectangles to draw the back part of the bullet and one rectangle for the overlay.
Well, the bullet outline is not a square... it is meant to be a circle.
If you look closeley at it...
_**
*__*
*__*
_**
And I was thinking about using four pxl-on( commands...  Anybody know the fastest way to fill a two by two square?


*EDIT*
 :crazy:  Page#2!!!
:w00t: *.* :w00t: *.* :w00t: *.* :w00t: *.* :w00t:
« Last Edit: November 27, 2012, 12:49:29 pm by Roboman »
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: [AXE] Bullet Hell
« Reply #16 on: November 27, 2012, 01:02:25 pm »
You can still make the circle with just two RectI commands.
In-progress: Graviter (...)

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [AXE] Bullet Hell
« Reply #17 on: November 27, 2012, 01:11:48 pm »
Leafy, won't that be slower?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [AXE] Bullet Hell
« Reply #18 on: November 27, 2012, 01:24:48 pm »
You can still make the circle with just two RectI commands.
True, I do that in TinyCraft :P
RectI(X+1,Y,2,*2)
RectI(X,Y+1,4,/2)

But yeah, I don't know if it is faster than a sprite.
« Last Edit: November 27, 2012, 01:27:58 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #19 on: November 27, 2012, 02:22:47 pm »
Ok...  Somebody ask Runer what the fastest method of drawing these two sprites... be it the sprite command, or something else...
-**-
*??*
*??*
-**-    the ?'s do not matter... they will be overwritten by the sprite below...
::::::
--
--       right now i am drawing ** after i drawInv and then drawInv after
                                            **

I am at school and omnom.omnimaga does not work here(some part of the url must be blocked) and efnet is entirely blocked.
If someone can do this b4 I get home that would be great.
« Last Edit: November 27, 2012, 02:26:07 pm by Roboman »
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [AXE] Bullet Hell
« Reply #20 on: November 27, 2012, 03:01:24 pm »
That looks nice but really hard O.O

It reminds me of another game called The Game, which you cannot win. Just kidding. For the special effect I wouldn't add it. Like Art said it's not worth the speed decrease and I actually prefer how it looks like without it. With it, it would do a nice job for some bubble game, though.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #21 on: November 27, 2012, 03:23:22 pm »
DJ_O, when I first mentioned this project to you, you sounded really excited...  and you just now posted here...  You must have a lot of topics to keep updated on all the time XD.
And when multiple bosses are done I will try to make a nice difficulty curve.
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [AXE] Bullet Hell
« Reply #22 on: November 27, 2012, 03:33:46 pm »
Roboman I have about 2 years of posts to catch up on (about 150000 posts). >.< I usually now skip plenty of them and check threads randomly, since I wouldn't be able to keep up otherwise.
« Last Edit: November 27, 2012, 03:34:11 pm by DJ_O »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: [AXE] Bullet Hell
« Reply #23 on: November 27, 2012, 04:38:20 pm »
Regardless, I think it's better off with the graphical effect. I tried doing the same thing a while ago, and I got it to work at a more than decent speed, so I'm sure that with some optimizations you should be able to get nice speeds and nice graphics at the same time :)
In-progress: Graviter (...)

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #24 on: November 27, 2012, 05:35:01 pm »
So far to create that effect I have been doing this:

DrawInv
for loop executes this for every bullet
draw a second 'bullet core' sprite(8*8!!!)
end for loop
DrawInv

I think I should instead do this:

for loop executes this for every bullet
pxl-off(B-XPos+1,B-YPos+1)
pxl-off(B-XPos+2,B-YPos+1)
pxl-off(B-XPos+1,B-YPos+2)
pxl-off(B-XPos+2,B-YPos+2)
end for loop

What do you think?
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: [AXE] Bullet Hell
« Reply #25 on: November 27, 2012, 08:51:34 pm »
I might be looking at this wrong, but have you tried masked sprites?  You could make it fill the middle with black as part of the sprite drawing itself.
The problem I see with this is they could/probably will overlap each other..also I'm not sure if it'd be faster/how much faster it would be.
« Last Edit: November 27, 2012, 08:53:05 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #26 on: November 28, 2012, 12:50:18 pm »
The problem I see with this is they could/probably will overlap each other..
That is exactly why the second part must be in a second for( loop, and also why something like masked sprites will not achive this effect in one for loop

and anyways, I THINK four pxl-on('s are faster than one pt-on(



*Edit*
I have made up my mind.
I will keep the graphical effect, and until someone tells me a faster way, I will use four pxl-on commands.
« Last Edit: November 28, 2012, 02:02:33 pm by Roboman »
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #27 on: November 30, 2012, 01:06:15 pm »
Ok...  You are no longer without a weapon, and the boss is no longer indestructible...
I cannot upload a screenie or the code yet, I am at school.
You're weapon is a laser beam that is drawn before the bullets are drawn(is behind the bullets) but after the boss is drawn(in front of boss) and it is drawn as RectI(A+1,0,2,B).  I is now the 'greyscale' variable(I refuse to use the back buffer)  every frame I do this   :not(I)->I:  and the laser is drawn as a 'greyscale inverted rectangle' *.*.  There is a downside to shooting your laser beam...  while you shoot the laser you'r energy bar(hp bar) does not regenerate.
and if I want something drawn as 'gray'  I do if I:draw...  :end
however, I am not sure how to draw the boss health bar if different bosses have max hp...
What are you thinking about this new update?  Likes?  Dislikes? Post below  :'(
« Last Edit: November 30, 2012, 03:02:23 pm by Roboman »
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: [AXE] Bullet Hell
« Reply #28 on: November 30, 2012, 05:25:56 pm »
Maybe if you posted a screenshot, we can give you some more critique - it's a lot easier to understand what you're talking about when we can see it :)
As for the greyscale, that should work since the laser shouldn't be that wide, but generally we avoid that method because the  resulting greyscale usually isn't all that great.
In-progress: Graviter (...)

Offline Roboman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 96
  • Rating: +10/-2
  • These peanuts taste so good!
    • View Profile
Re: [AXE] Bullet Hell
« Reply #29 on: November 30, 2012, 09:24:11 pm »
Oh...
So screenies =  :w00t: 8) :thumbsup:
And no screenies =  :-X ??? x.x
Putting up a screenie every single time can be a hassle... <_<

Here is the screenie(spoiler for what I am doing next at the end :o

And I was not really going for a solid gray... I was going for a 'flickery gray'.  It makes the laser look unstable and when the ship is gray(invuln) it is a gray/black&white flashing hybrid.  It also leaves the back-buffer untouched that has to be a plus ;D
And I moved the laser rectangle to after the bullet render... I think it looks better.
And here is the sourcecode
http://www.mediafire.com/download.php?c3y2epad2kn9xzh
:w00t:
UP-UP-DOWN-DOWN-LEFT-RIGHT-LEFT-RIGHT-B-A-ENTER


I always post in good faith!
http://en.wikipedia.org/wiki/Good_faith
If I end up being rude please tell me and understand!
Spoiler For Spoiler:
:-[  I never mean to say things ... negativley...
I am a bit socialy aqward so I often dont pick up on sarcasm or recognize myself being rude...

...

I am sorry for any offence...