Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: MGOS on August 19, 2012, 06:06:05 am

Title: [Axe] Bullet Proof
Post by: MGOS on August 19, 2012, 06:06:05 am
Since playing games with friends is much more fun than alone and everyone loves shooters :P, I decided to make another mini game for the 83+:

                                                  Bullet Proof

(Edit: It was actually Eiyeron who came up with the name sometime on irc, and I thought it was a nice idea. ;))

So what I wanted to do was a little, not too complicated platformer with decent physics and collision stuff playable on only one calc.
It has got a variable key configuration, so each player can choose his keys for the control of his character. It also comes with a level editor which let's you "draw" a custom map and place the spawns of the characters. It only saves one map atm in the same appvar as the keys.

(http://img.removedfromgame.com/imgs/1-game.gif)
Some Gameplay
(http://img.removedfromgame.com/imgs/edit.gif)
The Map editor
(http://img.removedfromgame.com/imgs/keyconf.gif)
Key configuration
(all running at 6 mHz; sorry for bad gameplay - it's Wabbitemu)

Facts & Features:

Default controls (changeable):

Left:
Right:
Jump:   
Fire:
Player 1:   
<
>
^
DEL
Player 2:
Sto
2
4
LN


Next step:

What I've been thinking of but isn't included yet:


Controls of the editor:
  • Move cursor:
  • Add blocks:
  • Remove blocks:
  • Clear all:
  • Save and set spawn points:
  • Confirm spawns:
  • Display current spawn points:   
Arrow keys
F1
F2
F3
F4
2nd
F5

-> Current version (http://ourl.ca/16832/314714)


Download this version:
Title: Re: [Axe] Bullet Proof
Post by: Hayleia on August 19, 2012, 07:09:59 am
(I'm not sure who recommended that name a while ago on irc, but I thought it was a nice idea. Tell me and I'll give you credit ;))
I think it was Eiyeron. Not sure either.

Anyway, this seems like a great project, good luck for the continuation :D

Also, great idea to put key configuration. I also did that on TinyCraft because some keys are obvious to me but others may not like it, so now, let's just everyone choose.
Title: Re: [Axe] Bullet Proof
Post by: MGOS on August 19, 2012, 07:17:56 am
Thanks Hayleia :)

when school starts in three weeks, there might be some changes my friends suggest.

Also 200th post for me  ;)
Title: Re: [Axe] Bullet Proof
Post by: TIfanx1999 on August 19, 2012, 09:16:44 am
I think link play is a must for this type of game. ;) Are you going to add different types of weapons or scrolling maps?
Title: Re: [Axe] Bullet Proof
Post by: MGOS on August 19, 2012, 09:28:42 am
I think link play is a must for this type of game. ;) Are you going to add different types of weapons or scrolling maps?

I'll probably add some more collectible power-ups like weapons and armor (faster machine gun, grenades?). Scrolling maps is only possible with one screen per player, what requires ether two calcs and link or split screen.
Title: Re: [Axe] Bullet Proof
Post by: Freyaday on August 20, 2012, 07:16:27 pm
Sounds cool! Perhaps an AI? :P/me downloaded
Title: Re: [Axe] Bullet Proof
Post by: leafy on August 20, 2012, 07:53:59 pm
I actually had an idea for splitscreen where you turn the calc sideways, with players opposite from each other; each half of the screen can then be used as a smaller screen.
Title: Re: [Axe] Bullet Proof
Post by: DJ Omnimaga on August 20, 2012, 10:55:34 pm
Looks quite nice. One thing that would be cool is if scrolling was added (assuming there was split screen, AI or linked play), so it's harder for your opponent to know where you are.
Title: Re: [Axe] Bullet Proof
Post by: MGOS on August 21, 2012, 11:14:16 am
Update!

Added:
Changed:

(http://img.removedfromgame.com/imgs/game03.gif) (http://img.removedfromgame.com/imgs/game031.gif)
Hadn't that much luck recording the screen shots, but I hope you get the point ;-)

Split screen with scrolling will maybe added in the next version (not too soon since I'm quite busy right now).
AI is quite difficult for this type of game I think. It'd have to calculate a way to the opponent / power ups, keep distance, shoot etc. But feel free to comment how you would do it :)


Downloads for version 0.3 (ion) and the map shown in the screen shots:
Title: Re: [Axe] Bullet Proof
Post by: Munchor on August 21, 2012, 12:45:04 pm
This game is looking very good, nice job :)
Title: Re: [Axe] Bullet Proof
Post by: Freyaday on August 21, 2012, 05:44:17 pm
AI is quite difficult for this type of game I think. It'd have to calculate a way to the opponent / power ups, keep distance, shoot etc. But feel free to comment how you would do it :)
I'd have to sit down and plan it out, but I'll see what I can do about an algorithm.
Title: Re: [Axe] Bullet Proof
Post by: shmibs on August 21, 2012, 10:40:16 pm
this looks like a fantastic start, but either link play or a good AI (or both :P) and larger, scrolling maps are practically a must for this kind of thing.
/me wishes you good luck =D
Title: Re: [Axe] Bullet Proof
Post by: MGOS on August 22, 2012, 10:01:44 am
Here come a few issues with scrolling maps:
Give that a thought, and let me know if you know a way to solve it.

The rest won't be that hard I think, I actually might do the scrolling in asm.
Title: Re: [Axe] Bullet Proof
Post by: leafy on August 22, 2012, 12:58:45 pm
I agree that the scrolling maps will become unmanageable if you keep them 2x2 blocks. Why not make them larger, say 4x4 or 8x8, add a bit of detail, and give the environment a more comfortable look?
Also, if the entire tilemap is loaded into L3, why does the map need to be loaded again to check bullet collisions? If you're using pixel-based checks, you can easily change that to pointer-based detection to avoid the screen problems (there are plenty of tutorials on this lying around).
Good luck!
Title: Re: [Axe] Bullet Proof
Post by: shmibs on August 22, 2012, 01:52:02 pm
exactly this /\
checking the map data directly rather than "loading and pixel checking" will be much more feasible, and larger tiles will both cut the required map data to one half/fourth/eighth of what it is now, while playing right into axe's strength of drawing 8*8 tiles.
Title: Re: [Axe] Bullet Proof
Post by: Hayleia 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 (http://ourl.ca/15124/283447) to have fast scrolling and pixel based detection. But good luck inserting Runer's code in yours :P
Title: Re: [Axe] Bullet Proof
Post by: Freyaday 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.
Title: Re: [Axe] Bullet Proof
Post by: MGOS 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 (http://ourl.ca/15124/283447) 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.
Title: Re: [Axe] Bullet Proof
Post by: shmibs 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 =)
Title: Re: [Axe] Bullet Proof
Post by: Freyaday 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.
Title: Re: [Axe] Bullet Proof
Post by: Yeong 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
Title: Re: [Axe] Bullet Proof
Post by: Eiyeron 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 ^^
Title: Re: [Axe] Bullet Proof
Post by: MGOS 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?
Title: Re: [Axe] Bullet Proof
Post by: leafy 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
Title: Re: [Axe] Bullet Proof
Post by: MGOS 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.
Title: Re: [Axe] Bullet Proof
Post by: Eiyeron 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.
Title: Re: [Axe] Bullet Proof
Post by: chickendude 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..?
Title: Re: [Axe] Bullet Proof
Post by: MGOS 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 (http://ourl.ca/16763/313528).

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().
Title: Re: [Axe] Bullet Proof
Post by: MGOS 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:

Changed:

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

Download:
Title: Re: [Axe] Bullet Proof
Post by: Sorunome on September 19, 2012, 11:32:16 pm
necro-update O.O
Any chance of getting a screenie?/me is very busy and has almost never time to actually try out stuff
Title: Re: [Axe] Bullet Proof
Post by: MGOS on September 20, 2012, 01:30:49 am
The last screeny should be it except for the machine guns.
Title: Re: [Axe] Bullet Proof
Post by: Sorunome on September 20, 2012, 11:07:26 pm
Oh, it's looking pretty cool :D
Title: Re: [Axe] Bullet Proof
Post by: MGOS on September 21, 2012, 11:17:32 am
Oh, it's looking pretty cool :D

It's fun to play against your neighbors in our math course :)

Things planned atm: