Author Topic: [Axe] Bullet Proof  (Read 12951 times)

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Bullet Proof
« Reply #15 on: August 22, 2012, 01:56:58 pm »
The only problem I see of using 8x8 tiles is that it is a shooting game, and it might be difficult to see where the enemy is if you can't see far, which will be the case with 8x8 tiles.
What you could do is draw everything in an appvar and use Runer's Pixelmapping to have fast scrolling and pixel based detection. But good luck inserting Runer's code in yours :P
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 Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: [Axe] Bullet Proof
« Reply #16 on: August 22, 2012, 05:38:43 pm »
Rough AI Workflow:
1) pathfind to back of opposing player
2) if opponent turns around to face you, run away.
3) if opponent is in line of fire, shoot.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axe] Bullet Proof
« Reply #17 on: August 23, 2012, 10:05:49 am »
The only problem I see of using 8x8 tiles is that it is a shooting game, and it might be difficult to see where the enemy is if you can't see far, which will be the case with 8x8 tiles.
What you could do is draw everything in an appvar and use Runer's Pixelmapping to have fast scrolling and pixel based detection.

That's exactly what I need for this, thanks :)

I wouldn't do the tilemap thing anyways, since then I had to completely rewrite everything. But before I include something like this, I going for the AI first:

Rough AI Workflow:
1) pathfind to back of opposing player
2) if opponent turns around to face you, run away.
3) if opponent is in line of fire, shoot.
Makes sense. 2) and 3) quite are easy, but I might need help with pathfinding.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [Axe] Bullet Proof
« Reply #18 on: August 23, 2012, 04:12:13 pm »
changing the size of the tiles does not necessitate changing the size of the player or of bullets; not wanting to have to rewrite things is understandable, though. good luck =)

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: [Axe] Bullet Proof
« Reply #19 on: August 23, 2012, 06:38:37 pm »
Rough AI Workflow:
1) pathfind to back of opposing player
2) if opponent turns around to face you, run away.
3) if opponent is in line of fire, shoot.
Makes sense. 2) and 3) quite are easy, but I might need help with pathfinding.
I haven't really done pathfinding before, so I'm probably not gonna be able to help you there.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: [Axe] Bullet Proof
« Reply #20 on: August 24, 2012, 03:16:14 pm »
This is just guessing but distance formulaing the eight directions with pixel testing? I'm pretty sure there are better ways. XP
Sig wipe!

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 Proof
« Reply #21 on: August 24, 2012, 03:26:27 pm »
THe game's name is my idea! :D Great job! But when I was thinking about the name, iI thought about a totally other game genre ^^
« Last Edit: August 24, 2012, 03:29:34 pm by Eiyeron »

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axe] Bullet Proof
« Reply #22 on: August 24, 2012, 03:35:22 pm »
THe game's name is my idea! :D Great job! But when I was thinking about the name, iI thought about a totally other game genre ^^

Lol - what were you thinking of?
« Last Edit: August 24, 2012, 03:39:15 pm by MGOS »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: [Axe] Bullet Proof
« Reply #23 on: August 24, 2012, 03:39:56 pm »
If I were you, I'd check out Builderboy's recent contest entry. You might not understand the code, but there's a pathfinder that calculates the significance of nodes based on a dynamically generated tilemap. PM'ing him might be good if you want to go through with this, but it will be fairly challenging :P
In-progress: Graviter (...)

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axe] Bullet Proof
« Reply #24 on: August 24, 2012, 03:57:27 pm »
If I were you, I'd check out Builderboy's recent contest entry. You might not understand the code, but there's a pathfinder that calculates the significance of nodes based on a dynamically generated tilemap. PM'ing him might be good if you want to go through with this, but it will be fairly challenging :P

I saw the project a while ago. Never thought of it that way. I might ask him.

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 Proof
« Reply #25 on: August 24, 2012, 04:27:42 pm »
THe game's name is my idea! :D Great job! But when I was thinking about the name, iI thought about a totally other game genre ^^

Lol - what were you thinking of?
I thought about a Contra-like.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: [Axe] Bullet Proof
« Reply #26 on: August 25, 2012, 07:11:48 am »
Wow the new updates made a huge difference, it looks really fun! I'm excited to see where it'll go. I agree with leafy and the others that a larger playing area (using larger tiles, if you'd like) would be pretty cool. Also, i think it'd be much better to compare the coordinates of the bullets to your map/player data rather than pixel tests. That would also let you shoot overtop of the items (i don't know if you can do this now?), add background tiles, and would probably be much faster.

Though now, rereading through some of your comments ("I wouldn't do the tilemap thing anyways, since then I had to completely rewrite everything."), i'm not sure if you are using a tilemap or not..?

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axe] Bullet Proof
« Reply #27 on: August 25, 2012, 09:17:45 am »
Ok, to clear thinks up a bit, here is how the stuff works:

I have a 168 byte save file, which contains the data of the map (scaled down to 1/4 because of resolution with 2x2 pixels; 156b), the spawn points of the players (4b) and the key setup (8b). How the resizing works can be found here.

The data is extracted to L3, top and bottom lines are added with another Fill( function at the very beginning. The backbuffer is used for collisions. It isn't at all change during the game. The bullets, the players and the power-ups are displayed only on L6, but they check collisions only with the constant stuff on L3. That makes it possible to walk over grenades and pass other players, as well as shooting "through" power-ups. Bullets won't pxl-test whether they hit a player, that's done with a simple subtraction and a comparison to the threshold for both X and Y. Pxl-test is only used on the backbuffer. In every frame, L3 is copied to L6 and all the other stuff "ors" over that on L6. No ClrDraw / DispGraphClrDraw to avoid another bcall().
« Last Edit: August 25, 2012, 09:18:38 am by MGOS »

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: [Axe] Bullet Proof
« Reply #28 on: September 19, 2012, 12:17:45 pm »
I couldn't do much on this, I've been working on another "scientific useful" project for some time now, but nonetheless here is an update:  :)

Added:
  • Automatic Archive/Unarchive safe file (no big deal, but was missing before)

Changed:
  • Fixed phantom grenades / grenades exploding much too late / grenades disappearing (occurred when both players throw a grenade the same time)
  • Downgraded the machine gun: only 9 shots, fire rate reduced from 200% to 150% (recommended by a friend)
  • Reduced grenade timer by 20% (explodes after 80 frames)

Since it isn't an update with changed graphics / major changes on game mechanics, I won't add a screeny.

Download:
« Last Edit: September 21, 2012, 11:18:43 am by MGOS »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [Axe] Bullet Proof
« Reply #29 on: September 19, 2012, 11:32:16 pm »
necro-update O.O
Any chance of getting a screenie?
* Sorunome is very busy and has almost never time to actually try out stuff

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!