Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: epic7 on October 29, 2011, 11:02:01 pm
-
I was going to start with a TD, but I decided to start smaller. I'm going to make my first game, called RoboGun.
I call it RoboGun because basically the player controls a robot gun, a gun that moves by its self.
I got the idea of moving objects that dont normally move on their own from Parser Padwan's game, swords.
I'll finish this game before December 1st and I'll post updates :D
-
That is probably a good idea to start small but I still hope you make TD sometime
-
I hope to make a TD eventually.
-
ok good but sweet I love any game that has stuff moving that shouldnt
-
Like annoying orange :P
-
??? you mean he does not move
-
What's a TD? (I'm guessing "top-down" shooter, but I'm not sure.) Good luck with your project, anyway :)
-
tower defense
-
Oh, I see. By the way epic7, right-clicking Google links and selecting "Copy link address" is a terrible idea, thanks to Google's incessant URL masking :(
-
Edited and used the real url this time :P
-
yeah google urls are long
-
What's a TD? (I'm guessing "top-down" shooter, but I'm not sure.) Good luck with your project, anyway :)
I am doing a top down shooter. :P
Would there be a way to make a background for the level without covering the enemies and stuff? Grayscale, maybe?
-
Store your image to either L3 or draw sprites using Pt-On()^r (2nd, angle, 3), then use DispGraph^r. This displays them in greyscale.
For example:
[Pic0]->Pic0 //Uses the OS Pic0 in the program
For(A,0,755) //756 time loop
{Pic0+A}->{L3+A} //Stores the info in the Pic to the greyscale buffer
End
DispGraph^r
Repeat getkey(15)
End
try that
-
Store your image to either L3 or draw sprites using Pt-On()^r (2nd, angle, 3), then use DispGraph^r. This displays them in greyscale.
For example:
[Pic0]->Pic0 //Uses the OS Pic0 in the program
For(A,0,755) //756 time loop
{Pic0+A}->{L3+A} //Stores the info in the Pic to the greyscale buffer
End
DispGraph^r
Repeat getkey(15)
End
try that
Actually this would be much more efficient with the Copy command:
[Pic0]->Pic0
Copy(A+Pic0,A+L3,755) // Also, put constants at the end of equations for a small optimization
DispGraph^r
Repeat getkey(15)
End
-
K. What does ^r do?
What does A+pic do?
-
Store your image to either L3 or draw sprites using Pt-On()^r (2nd, angle, 3), then use DispGraph^r. This displays them in greyscale.
For example:
[Pic0]->Pic0 //Uses the OS Pic0 in the program
For(A,0,755) //756 time loop
{Pic0+A}->{L3+A} //Stores the info in the Pic to the greyscale buffer
End
DispGraph^r
Repeat getkey(15)
End
try that
Actually this would be much more efficient with the Copy command:
[Pic0]->Pic0
Copy(A+Pic0,A+L3,755) // Also, put constants at the end of equations for a small optimization
DispGraph^r
Repeat getkey(15)
End
Thanks!
K. What does ^r do?
It draws to the back buffer, aka the greyscale buffer, instead of the solid black front buffer
-
Use the A+pic without using the for?
-
Use the A+pic without using the for?
Use Ztrumpet's code, it will work better/faster than mine, and it does the same thing
-
Do you have to give A a number or something, or does copy do that for you.
-
Do you have to give A a number or something, or does copy do that for you.
Whoops, I fail. I just blindly copied and pasted without double checking what I was doing. This will actually work:
[Pic0]->Pic0
Copy(Pic0,L3,768) // Fixed this line
DispGraph^r
Repeat getkey(15)
End
-
Now I get it. I was confused with the other one.
-
I'm going to take this game a little farther than I first anticipated. I'm going to make different levels and maybe even a story mode.
Here's a screenie of a primitive version of RoboGun. 1 enemy, lvl 1 gun, upgrade menu partially done, no collision detects, no background or money/score count.
I also have to figure out why a bullet randomly shoots in the start of the game.
-
I like the screenie!
I +1ed XD
-
Bullets bigger than the gun itself XD
You might want to make the gun slightly bigger. As well as the enemies. Something like this:
-
Keoni29 + gfx = BRAIN CRUSH
-
Keoni29 + gfx = BRAIN CRUSH
Ans + Sound = Brain Implosion
-
Bullets bigger than the gun itself XD
You might want to make the gun slightly bigger. As well as the enemies. Something like this:
I was too lazy to make anything more than an 8x8 sprite :P. That's also a lvl 0 gun, so they get increasingly bigger and better. Still no bigger than 8x8 :P
Keoni29 + gfx = BRAIN CRUSH
Ans + Sound = Brain Implosion
All I got was data type error :P
I like using : P :P
-
/me lols
-
If anyone could give me some suggestions, I'd appriciate it.
I need to figure out why a random bullet appears in the beginning. Also sometimes the money on the saved games sometimes changes when loading...
Do you think gameplay is too slow in the beginning?
Robogun still only has one level with basic design. Also you're invincible :P
Controls:
Left/Right/Up/Down Arrow- Move
Alpha- Look left
the-button-to-the-right-of-alpha- Look right
2nd- Shoot/Exit Upgrade menu
Sto->- Save
Enter-Go to upgrade menu
Clear- Exit
;D(http://www.omnimaga.org/Themes/default/images/gpbp_arrow_up.gif)
The game included has no shell.
-
If you save the bullets in L1 you want to have a code like this @ the beginning of your game
for(a,0,maxamountofbullets)
0->{L1+a}
End
-
I think I have it all at 0... I'll go double check
-
Hey too address your random bullet problem at the beginning of the game, I am using similar stuff in my mario shotgun game, and I had the same problem with the random bullet. I think I fixed it by reordering either my getkeys or my bullet firing code itself. Its probably just an order problem. easy fix.
-
Not easy if I have to do it only my calc. Is there an editor for the computer? I can't get my calc to connect to my Mac, so I can't use its Ti-connect.
Well, my shoot getkey is simple, so Ill try just reordering that.
-
Yeah when I was doing it on my calc it turned out I had just told it to shoot too early in the loop. And I think you could use and emulator...Ive never used one so I wouldnt know sorry.
-
Oh. I was about to make it shoot earlier :P
I was just about to check my source code. While doing so, my ram cleared just now. D:
-
Did you have it set up to back up?
And earlier might work, in my code I have the shooting getkey at the beggining then I have all the other getkeys after the display graph and pxl tests
-
Yep, didnt lose anything.
I'll just try copying the 12 lines of the shoot getkey and bring it earlier. Not now. Have too much homework :P
-
OK cool. as and example I had
:stuff
:getkey(54)
:all that shooting stuff
:Pt change
:Pxltest
:Display graph
:pt change
:all the other get key functions
-
what is the key for starting the game and key for shooting bullet?
-
Left arrow: new game
Right arrrow: Load game
2nd: Shoot
The version I posted is a little old. The save screws up and the upgrade menu is a little weird
-
Did you solve your random bullet problem?
-
I was trying to fix some other stuff. I didnt get to it
-
what is the key for starting the game and key for shooting bullet?
If those use same button, that might be a problem. :D
-
I made sure of that. Left arrow is new game, right arrow is load game, 2nd is shoot.
-
can I see the code?
-
K. Let me just run upstairs.
Edit: How much code?
-
one that controls bullet?
-
I think this is everything that is relevant to the bullets
:55→S→T
:8→O
:2→I
:For(V,0,I)
:0→{V*5+L5}
:0→{V*5+L5+3}
:End
:.Main Loop
:Repeat getKey(25)
:.All the other getkeys
:If getKey(54)
:If T=S
:For(V,0,I)
:!If {V*5+L5}
:1→{V*5+L5}
:0→T
:Goto X
:End
:End
:End
:End
:Lbl X
:If R
:Pt-On(X,Y,L*8+Pic1)
:Else
:Pt-On(X,Y,FlipH(L*8+Pic1)
:End
:For(V,0,I)
:If {V*5+L5}=1
:X+4→{V*5+L5+1}
:Y+1→{V*5+L5+2}
:Pt-On({V*5+L5+1},{V*5+L5+2},Pic2
:1→{V*5+L5+3}
:2→{V*5+L5}
:R→{V*5+L5+4}
:End
:End
:For(V,0,I)
:If {V*5+L5+3}
:If {V*5+L5+4}
:{V*5+L5+1}++
:Else
:{V*5+L5+1}--
:End
:Pt-On({V*5+L5+1},{V*5+L5+2},Pic2)
:End
:End
:For(V,0,I)
:If {V*5+L5+1}=1 or {V*5+L5+1}>90
:sub(SET)
:Goto I
:Lbl SET
:0→{V*5+L5}→{V*5+L5+3}+100→{V*5+L5+1}→{V*5+L5+2}
:Return
:Lbl I
:End
:End
:.Stuff
:If T<S
:T++
:End
:. Collision below
:For(V,0,I)
:For(P,0,C)
:If {P*3+L2+2}
:If abs({V*5+L5+1}-{P*2+L1})<6
:If abs({V*5+L5+2}-{P*2+L1+1})<6
:{P*3+L2}-O→{P*3+L2}
:sub(SET)
:End
:End
:End
:. Other stuff including enemy death code
:DispGraph
:End
Works fine except for the random bullet at the beginning....
And occasional enemy invincibility...
-
Looks good:) can't wait to see it all debugged and such. do you want to see my mario shotgun game too see how I fixed my random bullet?
-
Okay
-
I put the shoot in the beginning of the main loop, but it still has the random bullet. Improved the game, mostly the upgrade menu.
In the gif, you'll see that my guns begin to look demented :P
-
:D Nice screenie!!!!
I +1ed XD
-
Here I'll post my Mario game so you can see how my bullets work.
-
hm, if anyone's interested, I can post some code for a possible implementation of a rotation movement engine, something like the one in Base 671 (look in my sig)
-
actually that code be useful!
-
Cool yeah.
-
yeah that would be awesome butts! :D
-
Okay, so basically you have a variable representing how much your character has rotated. I'll use F. You have two variables for position, X and Y, and two variables for direction, D and E. And you have a jump table (just a bunch of data organized in an optimized way) stored in GDB1.
.jump table goes here
Data(-3r,0r,-2r,-1r,-1r,-2r,0r,-3r,1r,-2r,2r,-1r,3r,0r,2r,1r,1r,2r,0r,3r,-1r,2r,-2r,1r)->GDB1
.vars
.facing left (0)
0->F
.start at 10,10
10->X->Y
.not moving
0->D->E
.let's get this party started
Repeat getkey(15)
.2nd moves forward
If getkey(54)
X+D->X
Y+E->Y
End
.Alpha moves backward
If getkey(48)
X-D->X
Y-E->Y
End
.turning right
If getkey(3)
F++
If F>11
0->F
End
End
.turning left
If getkey(2)
F--
If F<<0
11->F
End
End
.put the directions from the jump table into D and E
{F*2+GDB1}->D
{F*2+1+GDB1}->E
.draw the dude
ClrDraw
.who is a circle
Circle(X,Y,2)
.(a small circle)
.draw a tail
Line(X,Y,X-(D*3),Y-(E*3))
Dispgraph
End
That should work. If you want to make your own sprite table so your character isn't just a circle, you can draw some sprites and put a pointer to the start of the data in, let's say, Pic1, and you can use this:
Pt-On(X-4,Y-4,F*8+Pic1
(it's X-4,Y-4 and not X,Y because you want to center the sprite)
-
Cool, like a TD on yourself!! xD
-
I don't think I could use rotation for this project, though.
-
For the random bullet, I fixed it by putting the shooting part at the beginning of the main loop, and moving my getkeys to the end of the loop after the display graph. Could I take a look at your code inside the loop? I might be able to help!
-
Ok. I'll pm you the main loop.
Robo gun is 76.429% done! :P
-
Can anybody fix this health code?
For(P,0,C)
If abs({P*2+L1+1}-Y)<7
If abs({P*2+L1}-X)<7
E--
End
End
End
Text(40,1,"HEALTH:")
Rect(66,2,(66+(E/2)),5)
If E<1
2->N
Return
End
-
Well, Whats wrong with it? What is it doing that your don't want?
-
Usually the dying works but the rect doesn't work. Sometimes, the rect shortens then fills up again and you never die.
-
Oh yeah, I remember seeing that. What is 'E' originally?
-
60
-
wow, I'm a fail, I already printed off the code so I could look it over earlier, all I had to do was look down! :P Oh well. Anyways, I'll look it over later, I'm tired now.
-
Try:
For(P,0,C)
If {P*2+L1+1}-Y<7+({P*2+L1+1}-Y>65529)*({P*2+L1}-X<7+({P*2+L1+1}-X>65529))
E--
End
End
Text(40,-39,"HEALTH:") //"-" is subtract, not negative
Rect(66,-64,E/2,3) //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
Also, I fixed the double If because it might help your problem
-
Why the negative y coord stuff?
-
Because you were using the absolute value, right? I just took that out
-
Try:
For(P,0,C)
If {P*2+L1+1}-Y<7+({P*2+L1+1}-Y>65529)*({P*2+L1}-X<7+({P*2+L1+1}-X>65529))
E--
End
End
Text(40,-39,"HEALTH:") //"-" is subtract, not negative
Rect(66,-64,E/2,3) //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
Also, I fixed the double If because it might help your problem
It doesn't work, It just makes your health go down when ever you aren't moving. :(
-
.................……………Alrighty then. I didn't really see how it worked either. I wanted to check the absolute value of the difference of the coords to find the distance. My main problem was the rect. I think I know how to fix it nowtht I know the last arguments the width not the x2
-
Oh, I know why... let me fix... I thought I could get away with not using abs(
For(P,0,C)
If abs({P*2+L1+1}-Y<7)*abs({P*2+L1}-X<7)
E--
End
End
Text(40,-39,"HEALTH:") //"-" is subtract, not negative
Rect(66,-64,E/2,3) //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
There, try that
-
Negative y coordinates still are used?
It works less now :P
-
Yeah, it has to do with a abuse of the hl register.
For example, in Text(40,-39,"HEALTH:"), It stores 40 into hl (kinda like Ans in Ti-Basic), then subtracts 39 from hl for the y coord, which makes it 1 (so, the text is displayed at (40,1) or (40,40-39))
Hope that made sense ;D
-
Oh. I used negative. I forgot about the hl.
A few posts back you said had something to do with the abs(
-
Oh. I used negative. I forgot about the hl.
A few posts back you said had something to do with the abs(
I thought you were talking about something else :P
-
The way it removes health seems better with the double if...
It still tends to jump back up to full and stay that way sometimes.
-
Why? Faster?
If so, use the X If first, it has less of a chance of being true
-
I figured y would :P
Trying to figure out the mystery of the WTF health bar regeneration now...
Ok, changed it. I tested it about 15 times. It screwed up once.
-
Well, look for anything that is stored to E
And did the Rect() fix work?
-
Rect works. I'll have to make sure nothing else is E. Im losing track of all my variables.
-
Updates:
Death screen
Animation of killing enemies
Pretty much working health bar
Levels!
Maybe other stuff that I forgot to say :P
Malfunctioning D: :
With 4 or less enemy waves:
Health malfunctions: 6%
Enemy invincibility: 5%
No enemy regeneration: 5%
With 5 or more enemy waves:
Health malfunctions: 70%
Enemy invincibility: 90% (chance of at least one being invincible per wave)
No enemy regeneration: ?
Usually cant find no regeneration percent with >4 since enemies are almost always invincible. D:
It suddenly changes to not working once it exceeds 4.
Screenie of new stuff including flaming death :P
-
This is gonna be SO awesome!.... er um Epic! :) can't wait to see the finished project!
-
Thanks!
-
Want a gun sprite?
[0000027FB8C08000]
-
Yeah. My gun sprites start to get demented :P
Cool. Ill put that in :)
-
Halp! It skips level to in my level menu. The first 3 args are the requirements to pass the level.
The only thing different about the level 2 is that it requires a certain amount of money instead of enemy kills
.A is for level
If A=1
.The first argument is the money requirement
GAME(0,6,0,4,3,1
ElseIf A=2
GAME(300,0,0,4,3,1
ElseIf A=3
(goes on with different args 'till A=8)
End
.Lotsa stuff
Lbl GAME
.Lotsa stuff
For(P,0,r5)
.Lotsa stuff
If (r2<J) and (r1<G) and (r3<L)
.G is the amount of money the user has
A++
G-r1->G
1->N
.Level up and return
Return
End
DispGraph
End
-
Almost done :)
My main problem now is the BUGS!
I'm going to keep the max enemy count on the screen under 5 to avoid the problems there :P
The worst bug is probably the health bar suddenly going back up to the top.
I'll just try the Buttsfredskin strategy XD
Write down the problem, think hard, find the answer :P
-
This looks pretty nice. Good luck with finishing it. :)
-
If bugs were gone, robogun is now pretty much done. :w00t:
I'll work out a solution and have it finished this week.
That doesn't mean I still won't update it :)
Give me a minute and I'll post it.
-
looking forward to the finished product!
-
Here's the latest version
Arrows to move
Alpha and the button next to it to look in a different direction
2nd to shoot
Enter for upgrades
Clear to quit
Sto-> to save
Size ~9kB
-
THANKS!
-
Im making a bomb power up that will wipe all enemies off the screen including the invincible ones. The bomb is sort of an excuse for the invincible enemy bug.
They wipe all enemies out, but the kills aren't added to the amount you've killed in the level and you get no money for it.
How many should a player get for each round?
-
I'd say you get 3 bombs forever, when you run out, tough luck!
-
I think I have identified the problem for the health bar bug. If it works, it might cure the invincibility of enemies too.
-
Im pretty sure it worked! Ill start playing for a while and ensure that they don't return.
Ill still keep the bombs and I might give 1 bomb per level (but not accumlating)u
-
What happens when you have no bombs, and there are a bunch of invincible robos? I say you just have one appear randomly, just VERY rarely! like
:rand^1000
-
I only used the invincible enemies as an excuse for the bug. Now that its, fixed, I'm not going to add the invincible robos.
Im going to keep the bombs still, 1 or 2 for a level
How many? 1 or 2?
Im also making a read me with
COOL TITLE ART!
Finished upload soon after I limit and finish bombs.
-
I still say just make it a rare random amount! that way you don't get bored with the game:P or make a shop where you can buy them along with the guns!
-
Buy enemies that cant be killed?
Anyway, Robogun is finished. Finished means done with everything I desired to put in the game.
I'll still probably update and might add more features or maybe powerups
New:
Bombs
Readme
No more enemy invincibility
No more health bar malfunctions
No more level skipping
Future updates:
Powerups?
More things to buy?
Actual boundaries!
Version 1.1 attached :)
-
NO! lol buy bombs!
and what are you compiling robogun in? my calc says error:invalid
-
Ok. I might add buy powerups or health. Or maybe BLUE LOBSTERS. I'll copy homer's idea of making a blue lobster powerup :P
-
My calc won't let me play it!
-
Oh. I forgot. I compiled it for Doors cs.
-
oh ok, can I have the source then? I prefer ION
-
My mom will kill me I go back on the computer :P
-
ok well, ill work with this. the problem is I use noshell, which doesnt run doors :(
-
I'll upload no-shell tomorrow.
-
just compile in ion, and it'll still work! oh and I really like the gun pic at the menu! one thing though, I didn't see anything giving credit to you in the menu or the game, and also how do I upgrade my gun?
-
Oh yeah, I need to put my name on it :P
And you got it to work?
Enter to go to upgrades and use arrows to scroll. On buys the guns, but only if you're at a high enough level.
-
yeah I downloaded doors
by the way:
game modifications suggestions:
1:when you move left you face left, when you move right you face right
2:when you buy a gun, it skips a level?
3:give yourself credit at the beginning in the menu, you did an awesome job!
-
ok well, ill work with this. the problem is I use noshell, which doesnt run doors :(
In that case you should get Doors on your calc, because Doors has No-Shell functionality built into it :D
-
I did :)
-
It skips levels when guns are bought? Usually when you buy guns, that is the only goal of the level and once you buy them, you win.
-
I thought the goal was to kill the robos, not get guns! AGH im lost!
-
Read the text in the beginning of the mission and it tells you
-
AHH i see! thanks !
-
My sprite for lvl6 gun has gone missing. ... At least I have it on the computer.
-
Done!
I'll post the link once the download is approved
Screenie:
-
I'd download it, but Ti connect is being stupid! :banghead:
-
Link:
Click me! (http://www.omnimaga.org/index.php?action=downloads;sa=downfile&id=751)
And I guess it makes a topic once a download is approved.
-
downloading right now. ;)
-
Apparently, it doesn't work D:
I'll have to fix it tommorow
-
I don't think they would approve of it if it didn't work
-
I just noticed, the official title is RoboGun, not Robo-Gun :P
I'll change that
I actually have a download that works now! (but only for DoorsCS)
I'm still trying to get fullrene to work, but Doors works without it.
Link:
[download being approved]