Author Topic: Could someone help me please convert this game?  (Read 6389 times)

0 Members and 1 Guest are viewing this topic.

Offline Derf321

  • LV3 Member (Next: 100)
  • ***
  • Posts: 59
  • Rating: +0/-0
    • View Profile
Could someone help me please convert this game?
« on: December 04, 2011, 03:33:20 pm »
I made this game (Birds eye view zombies game), it's pretty simple. I know it needs a lot of optimizing and whatnot, but it makes more sense to have it in Axe first. The game is an attachment, here is the annotated source:
(for whatever reason some characters change in the source, like arrows to Ü's, so use the attachment)
Spoiler For Spoiler:
ClrHome
ClrDraw:AxesOff
FnOff :ZStandard
1üÁmin
63üÁmax
1üTmin
95üTmax                //Sets the screen boundaries

Text(42,20,"BY DERF JAGGED"
Text(52,24,"(PRESS ENTER)"
Line(5,32,93,32:Line(10,29,88,29:Line(15,26,83,26

Line(5,57,11,57:Line(5,57,5,36
Line(5,36,11,36:Line(11,36,11,48:Line(11,57,20,45:Line(20,45,20,57:Line(20,57,26,57:Line(26,57,26,36:Line(26,36,20,36:Line(20,36,11,48:
Text(22,28,"AZI"
Line(50,57,68,57:Line(50,57,50,52):Line(50,52,61,52:Line(61,52,50,41:Line(68,57,68,52
Line(68,52,57,41
Line(50,41,50,36):Line(50,36,68,36:Line(68,36,68,41
Line(68,41,57,41
Text(22,70,"OMBIES")                                        //Main menu graphic
0üA
100üQ
Lbl 42
getKeyüK
If K=105:Then
0üK:ClrDraw:Goto 41:End
If A=4:Then
999üQ:0üA
Text(52,24,"CHEAT ENABLED!"                      //Confirmation of cheat code entered correctly
End
If Kø92 and Kø94 and Kø72 and Kø0:Then
0üA:End

If K=92 or K=94 or K=72:Then
If A=1:Then
Goto 11:End
If A=2:Then
Goto 12:End
If A=3:Then
Goto 13:End
If K=92:Then
1üA:Else:0üA
End
0üK
Goto 42
Lbl 11
If K=94:Then
2üA:Else:0üA
End
0üK
Goto 42
Lbl 12
If K=94:Then
3üA:Else:0üA
End
0üK
Goto 42
Lbl 13
If K=72:Then
4üA:Else:0üA
End
0üK
Goto 42
End
Goto 42
End                                   //Enables 999 health cheat after typing "1337" on main menu

Lbl 41
6üO
Menu("SELECT DIFFICULY","RECRUIT",1,"REGULAR",2,"HARDENED",3,"VETERAN",4)
Lbl 4
O-2üO
Lbl 3
O-2üO
Lbl 2
O-2üO                               //Difficulty select
Lbl 1
0üA
0üB
0üC
0üS
0üT
0üR
0üZ
0üU
1üP
1üV
1üW
100üE
1üL
20üX
40üY
XüG
YüH
0üD
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0üáZOMB                       //Set all pre-game variables (ZOMB variables unused right now


Line(1,54,25,54)
Line(25,62,25,54)
Line(3,59,4,59):Line(4,60,6,60):Line(6,59,7,59):Line(7,59,7,57):Line(6,57,6,56):Line(6,56,4,56):Line(4,57,3,57):Line(3,57,3,58):
Line(94,62,94,1):Line(94,15,1,15):Line(1,1,1,62):Line(1,62,94,62):Line(1,1,94,1
Line(16,15,16,1:Line(31,15,31,1:Line(46,15,46,1:Line(61,15,61,1
Text(49,65,"SCORE:")
Line(1,35,25,35):Line(35,35,55,35):Line(55,35,55,28):Line(55,20,55,15)

Text(35,5,"?")
Line(4,21,10,21):Line(4,21,4,29):Line(4,29,10,29):Line(10,29,10,21)

Line(19,8,19,12:Line(20,8,20,12:Line(20,12,28,12):Line(28,11,24,11):Line(21,10,22,11)

Line(37,8,38,9):Line(40,9,41,8):Line(34,10,44,10):Line(44,10,44,11):Line(41,11,34,11):Line(34,9,35,9):Line(38,12,39,12)

Line(48,10,59,10):Line(48,9,50,9):Line(50,11,53,11):Line(52,9,52,7):Line(53,9,53,7):Line(54,9,54,9):Line(57,11,58,12):Line(57,9,58,8)

Text(55,6,"-")
Line(4,8,4,11)
Line(5,8,5,11)
Line(4,11,11,11:Line(4,12,12,12:Line(6,10,6,10                 //Drawing map graphic and weapons graphics


Lbl 99                                  //Begining of game loop
getKeyüK

If K=102:Then
0üL:Else:End
If K=92:Then
1üL:Else:End
If K=93:Then                        //Press 0 for pistol, 1, 2, and 3 for other guns
2üL:Else:End
If K=94:Then
3üL:Else:End

If K=26 or K=25 or K=24 or K=34:Then
Pxl-OffY,X)
Pxl-OffY-1,X-1
Pxl-OffY,X-1)
Pxl-OffY-1,X)
KüJ
If D=0:Then
KüI
End:End

X+1(K=26 and pxl-TesY,X+1)ø1 and pxl-TesY-1,X+1)ø1)-1(K=24 and pxl-TesY,X-2)ø1 and pxl-TesY-1,X-2)ø1)üX
Y-1(K=25 and pxl-TesY-2,X)ø1 and pxl-TesY-2,X-1)ø1)+1(K=34 and pxl-TesY+1,X)ø1 and pxl-TesY+1,X-1)ø1)üY

Pxl-On(Y,X)
Pxl-On(Y-1,X-1
Pxl-On(Y-1,X)
Pxl-On(Y,X-1)                        //Movement and wall detection (so you can't walk through walls)

If K=21 and D=0:Then            //Shoot button pressed, and no bullets fired
1üD:1üT
End

If D=1:Then                        //Moves the bullet origin so you don't shoot yourself
JüI:XüH:YüG
H-1(I=24)üH
G-1(I=25)üG
2üD
End

If T=1:Then                         //If this bullet is in the air
Pxl-OffG,H)
H-1(I=24)+1(I=26)üH            //Then move the bullet in the direction indicated by I
G-1(I=25)+1(I=34)üG
If G=W or G=W-1:Then         //If the bullet hits the enemy, -100 to its health
If H=V or H=V-1:Then
E-100üE
End:End
If pxl-TesG,H:Then:5üH        //If the bullet hits a wall, then the bullet is no longer in the air (T is 0)
5üG:0üT:0üD
Else
Pxl-On(G,H)                       //Otherwise display the bullet and keep going
End:End


If E=0:Then                     //If enemy is dead, then +100 to score and make enemy dissapear
S+100üS
100üE
0üZ
Pxl-OffW,V)
Pxl-OffW,V-1)
Pxl-OffW-1,V-1:Pxl-OffW-1,V)
3üW
90üV
0üZ
End

If Z=0 and R=2                         //If no enemies, then end round
Then:0üR:P+1üP:End

If K=41 and Z=0:Then               //If no enemies and no round is going, press MATH to start next round
1üR:End

If R=0:Then
Text(10,3,"PRESS MATH TO START ROUND")
End
If R=1:Then
Text(2,26,"ROUND")
Text(10,2,"                                                                                        "
Text(2,47,P)
2üR
2üZ
End

If Z=2:Then                //If round starting, put a semi-random location for enemy to spawn
randInt55,90)üV
5üW
1üZ
Pxl-On(W,V)
Pxl-On(W-1,V)
Pxl-On(W,V-1)
Pxl-On(W-1,V-1
End
U-1(Uø0)üU
If Z=1 and U=0:Then                  //If round going, move toward player (unless theres a wall in the way)

Pxl-OffW,V)
Pxl-OffW-1,V)
Pxl-OffW,V-1)
Pxl-OffW-1,V-1)
W+1(Y>W and pxl-TesW+1,V)ø1 and pxl-TesW+1,V-1)ø1)-1(Y V+1(X>V and pxl-TesW,V+1)ø1 and pxl-TesW-1,V+1)ø1)-1(X Pxl-On(W,V)
Pxl-On(W-1,V)
Pxl-On(W,V-1)
Pxl-On(W-1,V-1)
OüU
End

If V=X+1 or V=X-2 or V=X or V=X-1 or V=X+2:Then                  //If enemy touches you, -25 health
If Y=W or Y=W+1 or Y=W+2 or Y=W-1 or Y=W-2:Then
Q-25üQ

If Q÷0:Then                  //If your health is 0, go to end script
Goto 45:End
End:End


Text(2,10,Q)            //Display health
If Q<100:Then
Text(2,18,"   "
Else:End

Text(55,18,A)       //Display gun ammo values
Text(55,33,B)
Text(55,48,C)
Text(55,65,S)       //Display score
Goto 99               //END OF GAME LOOP


Lbl 45                           //Game over graphic menu when you die
ClrDraw
Text(10,30,"GAME OVER")
Text(20,25,"YOU SURVIVED")
Text(27,45,P)
If P=1:Then                   //Display how many rounds survived
Text(34,37,"ROUND")
Else
Text(34,37,"ROUNDS")
End
Text(50,10,"PLAY AGAIN")
Text(50,65,"EXIT")
Line(9,14,48,14:Line(48,14,48,6:Line(48,6,9,6)
Line(9,6,9,14)
1üA
Lbl 46
getKeyüK
If K=26:Then
Line(9,14,48,14,0)
Line(48,14,48,6,0)
Line(48,6,9,6,0:Line(9,6,9,14,0)
Line(64,14,82,14)
Line(82,14,82,6:Line(82,6,64,6
Line(64,6,64,14
2üA                                                //Draw box around option selected (Play again/Exit)
End
If K=24:Then
Line(64,14,82,14,0)
Line(82,14,82,6,0)
Line(82,6,64,6,0)
Line(64,6,64,14,0)
Line(9,14,48,14:Line(48,14,48,6:Line(48,6,9,6)
Line(9,6,9,14)
1üA
End

If K=105 and A=1:Then
prgmZOMBIES:End                //End program, or restart depending on their choice
If K=105 and A=2:Then
ClrDraw:ClrHome:Stop:End
Goto 46

This is my first major program and it is incomplete still.

Things I can do later on my own:
-Shop system
-Highscores list
-Better looking map

Things I need help with:
-Optimizing
-Converting to Axe
-Creating array for multiple enemies to spawn
-Creating array for multiple bullets to be going (as well as functionality for other three guns)

The other guns I want to add are:
-Shotgun (shoots one pixel forward, and two others going 1 pixel away from the main bullet every 2 pixels)
-Battle Rifle (shoots 3 bullets in a line)
-Wunderwaffe (shoots a multiplication sign and either chain-hits zombies or explodes like a grenade)


I don't expect anyone to convert it all (but that would be godly!), but just give me suggestions and help. Thank you, I appreciate any help!  :)
« Last Edit: September 11, 2019, 06:57:18 pm by Derf321 »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Could someone help me please convert this game?
« Reply #1 on: December 04, 2011, 03:49:20 pm »
Simply converting this game into Axe without any knowledge of how it was done isn't going to teach you much about the language.  I recommend you learn a bit more about the Axe language so you can convert it yourself.  Axe is different than TiBasic in several ways, and there is no catch-all convert this command into this command method for converting between languages.  Some programs simply *cannot* be converted from TiBasic to Axe of vice versa.

Offline Derf321

  • LV3 Member (Next: 100)
  • ***
  • Posts: 59
  • Rating: +0/-0
    • View Profile
Re: Could someone help me please convert this game?
« Reply #2 on: December 04, 2011, 03:54:00 pm »
Where would you reccomend I start if I know BASIC fairly well? Do you think this program can be converted piece by piece?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Could someone help me please convert this game?
« Reply #3 on: December 04, 2011, 04:03:19 pm »
I would recommend looking through all of the Axe documentation, maybe reading through a couple tutorials on this site if you still need any help, and then perhaps make a small game (really small, like dodge the falling rocks, or fast tunnel) just to play around with it a bit.  As for converting it piece by piece, in your first post you said you wanted arrays of bullets, in which case converting your original program (which does not have multiple bullets correct?) is going to be more complicated than that.

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Could someone help me please convert this game?
« Reply #4 on: December 04, 2011, 07:03:02 pm »
It may be very difficult to do a straight up conversion. It may be better to learn the basics of axe, and then rewrite the game. This is the perfect place to learn if you want to learn axe though.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Could someone help me please convert this game?
« Reply #5 on: December 04, 2011, 08:02:48 pm »
Axe isn't like completely starting over.
You should learn it!

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Could someone help me please convert this game?
« Reply #6 on: October 19, 2013, 01:24:36 pm »
Axe is AMAZING, I definitely recommend that you commit to learning it. It's really similar to BASIC anyways so you shouldn't have a hard time converting your game either. But look at the command list and stuff to get a feel for it http://jacob.heliohost.org/calc/axe/1.1.1/Commands.htm.
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

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: Could someone help me please convert this game?
« Reply #7 on: October 19, 2013, 02:55:36 pm »
please look at the last post-date before replying, that is a almost 2-year necro O.O So yeah, with necros only post if you seriousley contribute to the discussion

just saying so that you'll know in the future ;)
« Last Edit: October 19, 2013, 03:09:33 pm by Sorunome »

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

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: Could someone help me please convert this game?
« Reply #8 on: October 20, 2013, 03:27:37 am »
Actually, thanks for bumping this ClrDraw, I'm going to be porting it to the +C ;)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Could someone help me please convert this game?
« Reply #9 on: October 20, 2013, 03:38:00 am »
Actually, thanks for bumping this ClrDraw, I'm going to be porting it to the +C ;)
What are you going to be porting to the +C ? The zombie game or Axe ?
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 AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: Could someone help me please convert this game?
« Reply #10 on: October 20, 2013, 03:48:26 am »
The zombie game! I'm not familiar enough with Axe to be porting it and it would probably be a huge undertaking. The Nazi Zombie game is simple and early enough in development to latch on to. I like the concept and I think I can take it pretty far. I'll release a mockup and demo soon. And I like the TinyCraft game you're working on!
« Last Edit: October 20, 2013, 03:49:15 am by AssemblyBandit »