Author Topic: [C /axe?] Hinawa Battle Engine  (Read 26878 times)

0 Members and 1 Guest are viewing this topic.

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] Hinawa Battle Engine
« Reply #45 on: May 10, 2014, 06:54:05 am »
You want good news, here is some good news: I found a way to implement text routines in the engine! It blocks the battle state unless the text has finished appearing. I need now to remember how I'll implement multiple line text, multiple part text and figure what my code does in some places. For now, a stupid string appears "before" the enemy attacks, but it attacks just before the text. I guess that code chunk with random is the placeholder for damaging the players.

You want bad news? No? Here are we bad news: I reached 6200 bytes.
Edit: multiple lines and screens are correctly managed and the text update is pause at each line end! You can read the text at the rythm you want! -(//)-(//)
« Last Edit: May 10, 2014, 07:26:38 am by Eiyeron »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #46 on: May 10, 2014, 07:27:04 am »
I am just popping in to tell why I voted for "yes" in your poll. You say that you reached 6200 bytes. and if you want to save space, obviously optimization is the way to go. But optimization is not (only) something that you do at the end, there are some things that should be automatisms, and (I don't know if you know them but if you don't) if you want to learn some, you might want to provide the source so people can help ;)

Also, not about optimizations but there are also some ways of coding that help you code faster. For example, if you only use variables with names that don't mean anything, after a week of break the only thing you can do is start over because you don't understand anything to your code anymore :P
So once again, if you don't know them and want to learn, people can help :)
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 Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Axe] Hinawa Battle Engine
« Reply #47 on: May 10, 2014, 07:28:41 am »
At least I let some explanation behind the variable definitions!,:p But in contex, I can remember what a variable does here and there. That's just creepy to read cryptic code and  remember its usage.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #48 on: May 10, 2014, 07:30:13 am »
Yeah, don't worry, I was not saying "give the source code or die" because I almost never provide the source code myself :P
This was just a "why it can be a good idea", and I can understand arguments against :)
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 Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Axe] Hinawa Battle Engine
« Reply #49 on: May 10, 2014, 07:32:39 am »
Actually I'm OK with releasing source code. If well explained that becomes a neat learning document. I've learned to program reading PierrotLL (Gravity Duck guy)'s code.

I just want it to be clear and documented before releasing, and hoping someone can understand what's and how it's going on.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe] Hinawa Battle Engine
« Reply #50 on: May 10, 2014, 11:03:55 am »
Thankfully in hybrid BASIC we have 1540 KB of executable code space compared to 40 KB in Axe *runs*

Anyway glad this is still coming along.

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] Hinawa Battle Engine
« Reply #51 on: May 10, 2014, 11:52:27 am »
SCREENSHOOOOOTS! FInally!
« Last Edit: May 10, 2014, 12:02:22 pm by Eiyeron »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Axe] Hinawa Battle Engine
« Reply #52 on: May 10, 2014, 02:37:39 pm »
That's epic :D nice work on these !

Offline TheCoder1998

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 434
  • Rating: +20/-2
  • my art is written in code, not in graphite
    • View Profile
    • My website :D
Re: [Axe] Hinawa Battle Engine
« Reply #53 on: May 10, 2014, 03:45:00 pm »
that's looking pretty awesome :D
my ticalc acc:

http://www.ticalc.org/archives/files/authors/113/11365.html

Spoiler For The Best Song Ever:


follow me on tumblr :)
www.rickdepizza.tumblr.com

check out my anilist :D
http://anilist.co/animelist/29701/Rickdepizza

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #54 on: May 10, 2014, 05:38:20 pm »
Woa, nice, updates ! :D

Also, not about optimizations but there are also some ways of coding that help you code faster. For example, if you only use variables with names that don't mean anything, after a week of break the only thing you can do is start over because you don't understand anything to your code anymore :P
I abuse r1-r6 in Illusiat. <_< But just by looking at the source you can tell what does what since it's commented/labeled well enough and I use A-theta for global variables.

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] Hinawa Battle Engine
« Reply #55 on: May 10, 2014, 06:07:35 pm »
Yeha, me too, I'm ab(using) the registers, I just should sometimes look out which are used in a routine to avoid mees when call subroutines inside subroutines! :p

Aaanyway, I have to admit that a lot of place are quite well optimized. It can be maybe more optimized but the biggest byte eater is all the visuals, sprites and misc. Removing the background( routine and sprites) made me spare temporary ~500 bytes. In the end, I want all the data to be separated from the engine, and call the engine from a hypothetical game, to load it only when it's needed.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #56 on: May 10, 2014, 06:15:07 pm »
Well r1-r6 are not registers, they're variables just like A-theta. :P Just that they are commonly used as routine arguments and local variables.

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #57 on: May 10, 2014, 09:11:52 pm »
Thankfully in hybrid BASIC we have 1540 KB of executable code space compared to 40 KB in Axe *runs*

Anyway glad this is still coming along.

Well, you can run a compiled assembly program in an axe program if you know how, increasing the amount of executable code you can have. There's also crabcake :P
I am Bach.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #58 on: May 11, 2014, 03:38:18 am »
DJ included the use of Fullrene + PageSwap in the 40kB.

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] Hinawa Battle Engine
« Reply #59 on: May 11, 2014, 09:02:17 am »
So, at the moment I separated the turn definition (determine the turn's order, not working atm) and the damage application (not woorking too, its just a random damage to a random player.) I could manage a lot better the turn workflow (just a Z-Test atm) add an attack announcement and even a little animation (just a placeholder to see if the engine is not in a glitched state).

So there is a lot of progress since I started programming again here. I plan to release more screens, but there aren't a real graphical change.