Author Topic: [C /axe?] Hinawa Battle Engine  (Read 26836 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 #60 on: May 13, 2014, 05:12:45 pm »
Little update : I started managing character death. The engine detects when a character dies and a textbox blocks the game. For now it's more a flag based, but I'd like to use a stack to conserve death order. (but I'd lose at least one RAM byte.)

I should manage too turn skippimg the current character dies. I'll do it maybe after the turn is well defined (to manage too characte's death during an attack.)

Oh, and I should make string concatenation to a buffer routines. How did I forgot that?!


EDIT : bumpity bump to say I locked the poll. I'll release the source in the week-end. Beware of obscure code (specially in rolling meters updating). Someone for helping me with string concat?
« Last Edit: May 16, 2014, 03:06:06 am by Eiyeron »

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 #61 on: May 16, 2014, 05:50:11 pm »
Major update : go check the source at the Original Post. And by the way read the ReadMe.

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 #62 on: May 28, 2014, 03:51:26 pm »
I am a bit late, but I was astonished at that screenshot with the moving grayscale background like in Earthbound O.O

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 #63 on: May 28, 2014, 03:57:36 pm »
Don't be sorry for being late, my updates are always running more or less without big noise, so. But thanks for the praise. Keeping the non modal system is the hardest part of the engine.

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 #64 on: May 31, 2014, 12:12:01 pm »
Little news : I successfully refactored the text box routines to avoid some problems :
- I merged the previous two line buffers into one buffer. That improve character management as we don't need null terminal character anymore
- Thus the character and word wrap are greatly improved as they are now simpler.
- I successfully squished more than 100 bytes for further improvements (more will be squished as I haven't do it at the moment.)
- Speed should be roughly the same, faster or slower, I don't know.

I'm still struggling at how will I implement special behavior for special character, like "insert character 1's name here".

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 #65 on: June 07, 2014, 04:49:55 am »
Good news everyone! I had like two dead hours and spent them into doing what I planned. Now alternate buffers can be accessed to add non constant data to the text box.

"What that means?"

Let's take the only option I implemented yet : Add these character in a string (not surrounded by ") [01010X].

[01]=>Control character
[01]=>Display character's name
[0X]=>Uses xth character's name (where X is between 0-3)

Aaaand it works! For instance I use it in the death announcement. That's better to read " LUCAS collapsed." than "1 DEATH", right? Now I need to check if things like word wrap aren't broken with this addition.

Fun bug : "..." (Three dots, not the character …) is not working. I force a line break. I have to inspect that.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #66 on: June 07, 2014, 04:57:09 am »
Sounds very cool ! :D

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 #67 on: June 07, 2014, 11:21:05 am »
Just fixed the bug. It wasn't related to the dots but to the pointer save when switching to alternate buffer. I wrongly offseted the pointer and thus the word length calculation was biased and returned around midline. Now it's fully functional.
« Last Edit: June 07, 2014, 02:58:13 pm by Eiyeron »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #68 on: June 07, 2014, 02:53:43 pm »
Massive pic ! \o/
Looks nice tho. ;)

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 #69 on: June 07, 2014, 02:57:02 pm »
Looks like my phone took its first nice shot. :p Do you want I resize the photo?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #70 on: June 07, 2014, 03:07:26 pm »
Lol, it's hard to take good pics with the N4, but when you do, they're epic.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: [Axe] Hinawa Battle Engine
« Reply #71 on: June 10, 2014, 09:51:44 am »
Looking good! ;D

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 #72 on: June 10, 2014, 04:08:32 pm »
Looks nice. Regarding the checkerboard in the pic, is it due to the camera or did you decide to not use Graylib?

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 #73 on: June 11, 2014, 01:51:01 am »
Using graylib makes the game more slower than ever, it doesn't let me enough cycles to run a full screen update in time. I'd like to, but as I redraw the whole screen each frame, that's just imposibubble.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
[C / Axe?] Hinawa Battle Engine
« Reply #74 on: November 26, 2014, 04:49:35 pm »
Hello everyone. I won't introduce again this project I have. Yes? You still want? Okay.
My projects are most of the time remakes or reproducing mechanisms of games I loved. I started programming (on calcs and on Casio) by trying to port Pokémon Gen I battle engine To Casio AFX2.0/Graph100+. I got through some projects in the same branch, but another one (almost finished) stood up : Bust-a-Move. All of them are past. Now, I'd like to program something. A project way more complicated but that could open (at least to me) to new games. I'd like to reproduce for starters the battle engine of Mother 3 and Earthbound.

This battle engine is a semi turn based classic RPG battle engine. You ahve your party, the enemy's. each one decide its actions for the turn and the turn is going on its way. THat could be just a simple project, but here's the tweak in three(four if you count & as one) words : Modularity & Open Source.

Modularity

Modularity means that the engine should be an independant part of bigger projects. Only some functions will be needed to set up the engine and run it. I'm still planning a lot of the structure and having many design difficulties (shmibs will talk of exeprience after reading the first version's C code...) but I want it to be most clear possible to be hackable by everyone who has some good C/Axe programming skills.

Modularity means too OCP (Open/Closes Principe). I' like it to support a event system and scripted IA which could add a deeper experience to the battles. I'd like at least to be able to reproduce all the quirky events of said games (like self-exploding trees at their death, the textbox in [REDACTED]'s battle, etc...) but that's not really a critical feature.

In the end, modularity means grouping the code in modules to be able to swap them. The most important instances of this meaning here are graphism and I/O (and audio? I dreamt of a thing months ago, but that's still a dream T_T). Graphism and I/O code should be engine independant. I'd like to run the engine on computer as well as calculators. For that, lots of think are being spent on how to  split the graphic data from the engine's. that's not an easy task, i.e. Casio FX-9860 are using 2-bits sprites where Black are 1 and 0 White. If someone were to use directly these functions in, lets' say SDL, that won't certainly work unless big ugly hacks are done. So graphism should too be a independant part to be free of using whatever is needed by the target. Same for file I/O or input management. That also brings a problem : where to put the UI? Graphism module? Input Module? Battle Engine?

Open Source.

Before talking about open source, there should at least be source code. The project started on calc with Axe Parser as I only had that at my hand. The code became quickly as unreadable as ancient dwarf arcanes. Forget about reading it, it has little sens to begin with. I ported the knowledge I had on HBE to C and tried to make a clean basis with Casio Fx-9860 in mind. Second failure, I got cold scoled by Shmibs and I realized that if there were more sense to my eyes, it wouldn't be the same for the others.

So now, I'm clampled to wonder and ponder. Ponder the open source from beginning, wonder how the source code should be structured. Ponder the feasability of the project, wonder if I should ask for help as I already tried in vain. I don't want it to be just lost time into a unborn project. I'd like to have better feedback from anyone with enough experience to tell me how parts of the project could be done without being taken as an inexperimented programmer. I'd like to see who are interested into this heavy project and how much they are. I'd like in the end to see one of my game project plan to be achieved with this engine and maybe other people using it.

So at this moment, I store a repository in a private GitLab repo. If anyone wants to mess with the few headers I have at the moment, feel free to poke me and I'll make the repo public or allow you to mess around.


So yeah, so much for a simple calculator project. Something that everyone could do, but I want to do it in a way that lot of peoples would be able to help or improve. That's the real meaning behind this project. (That and the fact I'm more and more thinking about a real calc -or not- game behind that.) Thanks for reading it.