Join us on Discord!
You can help CodeWalrus stay online by donating here.

Axe Soccer

Started by SiphonicSugar, September 24, 2015, 09:28:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SiphonicSugar

For once, after not doing something, I decided that I was going to make a game.  For some odd reason, I've always wanted to play a soccer game, so I started on it.  I plan on making it a 2 on 2 soccer game, so probably not professional soccer...

So here is all I have right now, but I was wondering if I should add animation to the actual player itself.  (Right now, it is kind of boring...)
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Snektron

Is this going to be one of those platformer type soccer games? because thats really cool :)
And yeah, you should add player animation :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


SiphonicSugar

#2
Eh, I'm not really sure yet.  :-\

Because I could not figure out a way to have 4 players on a 2D screen, I decided that I would completely change how the game looked.  I changed the view to an above view.  The first time, it worked... But after the third or fourth time, the program slowed down a lot, and when I got to the edge of the field, some of the lines started to disappear.  Also, I noticed that there are random copies of the playing field out of the map...
:.SOCCER
:
:[7884848484780000]->Pic1
:
:48->X
:32->Y
:
:Repeat getKey(15)
:ClrDraw
:Pt-On(46,30,Pic1
:Rect(X+100,Y-40,1,80
:Rect(X-100,Y-40,1,80
:Rect(X-100,Y-40,200,1
:Rect(X-100,Y+40,200,1
:If getKey(1)
:Y-1->Y
:End
:If getKey(2)
:X+1->X
:End
:If getKey(3)
:X-1->X
:End
:If getKey(4)
:Y+1->Y
:End
:DispGraph
:End

  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

c4ooo

#3
Quote from: SiphonicSugar on September 24, 2015, 09:31:12 PM
Eh, I'm not really sure yet.  :-\

Because I could not figure out a way to have 4 players on a 2D screen, I decided that I would completely change how the game looked.  I changed the view to an above view.  The first time, it worked... But after the third or fourth time, the program slowed down a lot, and when I got to the edge of the field, some of the lines started to disappear.  Also, I noticed that there are random copies of the playing field out of the map...
:.SOCCER
:
:[7884848484780000]->Pic1
:
:48->X
:32->Y
:
:Repeat getKey(15)
:ClrDraw
:Pt-On(46,30,Pic1
:Rect(X+100,Y-40,1,80
:Rect(X-100,Y-40,1,80
:Rect(X-100,Y-40,200,1
:Rect(X-100,Y+40,200,1
:If getKey(1)
:Y-1->Y
:End
:If getKey(2)
:X+1->X
:End
:If getKey(3)
:X-1->X
:End
:If getKey(4)
:Y+1->Y
:End
:DispGraph
:End

First of, use Line() for drawing lines. Second of, those getkeys() could be optimized.
:.SOCCER
:
:[7884848484780000]->Pic1
:
:48->X
:32->Y
:
:Repeat getKey(15)
:ClrDraw
:Pt-On(46,30,Pic1
:
:VLine(X+100,Y-40,80
:VLine(X-100,Y-40,80
:HLine(Y-40,X-100,200
:HLine(Y+40,X-100,200
:
:X+getKey(3)-getKey(2)->X
:Y+getKey(1)-getKey(4)->Y
:
:DispGraph
:End

The weird "copies" occur because when you pass 256, the 8 bit number overflows back to zero, so you basicly end up at the beginning of the map, and vice versa, if x goes below zero it overflows to 255.

SiphonicSugar

Oh, okay.

Somebody said that you should use Rect( to draw things...
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Unicorn

Looking VERY cool! Maybe you could use pixeltest to check for boundries? I'm not sure about the lines, though.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

c4ooo

Quote from: Unicorn on September 25, 2015, 02:45:01 AM
Looking VERY cool! Maybe you could use pixeltest to check for boundries? I'm not sure about the lines, though.
The most efecient solutionn i know of would be to surround the ketKey()-s inside a min() and max() statement. Maybe you could ask Runer112 or Hooloovoo about a better one ;)

:max(min(X+getKey(3)-getKey(2)->X,80),0)^^r
:max(min(Y+getKey(1)-getKey(4)->Y,200),0)^^r

(Note that the max statement ends with an radical 'r' above it.)

ben_g

Quote from: c4ooo on September 25, 2015, 10:49:04 AM

:max(min(X+getKey(3)-getKey(2)->X,80),0)^^r
:max(min(Y+getKey(1)-getKey(4)->Y,200),0)^^r

I may be wrong, but shouldn't the ->X and the ->Y be at the end of the lines instead of inside the min() and max()?

c4ooo

Quote from: ben_g on September 25, 2015, 12:33:35 PM
Quote from: c4ooo on September 25, 2015, 10:49:04 AM

:max(min(X+getKey(3)-getKey(2)->X,80),0)^^r
:max(min(Y+getKey(1)-getKey(4)->Y,200),0)^^r

I may be wrong, but shouldn't the ->X and the ->Y be at the end of the lines instead of inside the min() and max()?
O lol your right  :-[
I forgot to move it :P

SiphonicSugar

But how would I make it so the X value is not allowed to go over 112 and it is not allowed to go under 0?  Same for Y: not allowed to go over 59 and not allowed to go under 6.

Also, the VLine and HLine thing did not really work... The map did not look anything like how it should have.  I changed it back to Rect (hopefully temporarily) because I wanted to change the size of the map.
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Dream of Omnimaga

I can't help due to not doing Axe, but I prefer the game being top-down view like in the 2nd screenshot, since it could allow you to make something closer to popular sports games at some point. For example it could be 2 vs 2 with the goalie controled by some basic AI.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

SiphonicSugar

Yeah, I noticed that a wouldn't be able to add more than two players on the first way, so I decided to make it an above view.

I have most of the actual soccer ball part planned out... I think.  So that is good news! :w00t:
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Dream of Omnimaga

Have you gotten any luck with collision detection?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Quote from: SiphonicSugar on September 25, 2015, 09:24:45 PM
But how would I make it so the X value is not allowed to go over 112 and it is not allowed to go under 0?  Same for Y: not allowed to go over 59 and not allowed to go under 6.

Also, the VLine and HLine thing did not really work... The map did not look anything like how it should have.  I changed it back to Rect (hopefully temporarily) because I wanted to change the size of the map.
But isnt your x range 0-80 and your y range 0-200? To do what you want you will have to change the getKey() statements. The bigger, inner number is the max and the zero on e outside is the min.

How did the HVLines look? Can you provide a better description?

SiphonicSugar

I decided to change the size of the field, but I will get to that later.

Here is what it looks like with the VLine and HLine...
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

Powered by EzPortal