Omnimaga

Calculator Community => Casio Calculators => Topic started by: Eiyeron on March 23, 2014, 12:52:48 pm

Title: [C w/ Mode 7] Unknown project
Post by: Eiyeron on March 23, 2014, 12:52:48 pm
Hi. Here is something I did sometimes and that I optimized like crazy today, after having a drunk genius moment. (Actually runs smoother on calc. I need a fps count, but I estimate the framerate is over 30fps.)

I have some things planned with that.


Controls
- Replay keys : Move/Turn the camera
- Shift/Alpha : Move Up/Down the camera
- Exit : Exit


Changelog
- Proof_of_concept 3 :  Here is a live demo of the progress I and Siapran did. He helped me optimizing the tilemap reading routine to speed up almost as before.
Title: Re: [C] Unknown project
Post by: Matrefeytontias on March 23, 2014, 12:54:12 pm
That's epic, it's going so fast ! :D

I don't have a Casio calc, but I hope this will get to something nice ;D
Title: Re: [C] Unknown project
Post by: Streetwalrus on March 23, 2014, 05:31:56 pm
^ That. Literally. :D
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on March 24, 2014, 12:44:42 am
Wow that looks fast! Also since that calc is 58 MHz or so, this gives you much more freedom when this will be optimized, so you could experiment with small pre-rendered sprite scaling such as trees or pipes like in Mario Kart. :D
Title: Re: [C] Unknown project
Post by: Sorunome on March 24, 2014, 01:52:51 am
Yup, that is looking awesomeley fast!
I hope this'll go somewhere :)
Title: Re: [C] Unknown project
Post by: Eiyeron on March 24, 2014, 06:15:48 am
Wow that looks fast! Also since that calc is 58 MHz or so, this gives you much more freedom when this will be optimized, so you could experiment with small pre-rendered sprite scaling such as trees or pipes like in Mario Kart. :D
No, it's 22 MHz, we can get to "~55" only by overclocking! :p, but yeah, I'll test adding sprites to see if that doesn't slow down the game.
Title: Re: [C] Unknown project
Post by: Streetwalrus on March 24, 2014, 12:50:41 pm
If it's an sh4 then it's a similar CPU to the Dreamcast's. Ten times slower. :P
Also,
/me lost x.x
Title: Re: [C] Unknown project
Post by: TIfanx1999 on March 24, 2014, 12:54:30 pm
Looks awesome! What Casio calc is it for?
Title: Re: [C] Unknown project
Post by: Eiyeron on March 24, 2014, 02:13:15 pm
What Casio calc is it for?
Sorry, but I didn't understand well your question. I'll take as "What Casio calc model is it?"
So, it's a FX-9750GII modded to a 9860 (it's the second to last line of monochrome calcs, the last with a SH3).

I'd like to improve the speed by making LUT everywhere, but I don't see a noticable change. (The cosine/sine are already LUTed, they belong to Kristaba's Fixed Point Library)
Title: Re: [C] Unknown project
Post by: TIfanx1999 on March 24, 2014, 02:15:52 pm
Yea that was the question. I wanted to know which Casio calc. model the program was written for. :)
Title: Re: [C] Unknown project
Post by: Eiyeron on March 24, 2014, 02:17:56 pm
Basically, except the fact i should update my libs for cross-compiling with SH4 calcs (which I don't have any), the program should run on every monochrome model that support addins.

And don't even ask me a Prizm port (for the moment). THere is already a Mode 7 prototype on it.
Title: Re: [C] Unknown project
Post by: TIfanx1999 on March 24, 2014, 02:19:48 pm
I have a 9860G Slim model, so I guess it would run on that. :)
Title: Re: [C] Unknown project
Post by: Eiyeron on March 24, 2014, 02:21:30 pm
I forgot the Slims. Well, almost no one have ay of these in France, so I won't be sure if that'll work. I'll give some demos once I know how to deal with SH4 and once my libs will be updated.

Siapran wants to work on it too.
Title: Re: [C] Unknown project
Post by: TIfanx1999 on March 24, 2014, 02:44:58 pm
Sounds great! ;D
Title: Re: [C] Unknown project
Post by: Eiyeron on March 25, 2014, 08:12:20 pm
(http://t0.gstatic.com/images?q=tbn:ANd9GcQDDp-swoAtdE4BdYK5uhBucVauOBYhc_f3J6hI74vHOzk4dBU3ba_jPzi8)
After an almost insomniac serch, tweak and hack, I finally found (or like copy pasta, the base was crappy and too bad to be employed in a game) a way to support correctly old Mode7 and objects projections (for the moment, I only project black squares...)


EDIT : a float option would be very great for images!
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on March 26, 2014, 02:41:23 am
Wow that looks fast! Also since that calc is 58 MHz or so, this gives you much more freedom when this will be optimized, so you could experiment with small pre-rendered sprite scaling such as trees or pipes like in Mario Kart. :D
No, it's 22 MHz, we can get to "~55" only by overclocking! :p, but yeah, I'll test adding sprites to see if that doesn't slow down the game.
Oh I thought it was the SH4 model and I thought that SH4's all ran at 58 by default like the PRIZM. Didn't the SH3 models run at 29 MHz, though, not 22? ???
Title: Re: [C] Unknown project
Post by: Eiyeron on March 26, 2014, 04:01:43 am
Yeah, sorry, it's 29 MHz. I don't remember the exact frequency. But I know that's the Prizm is clocked to 58.
Title: Re: [C] Unknown project
Post by: Eiyeron on March 28, 2014, 04:10:05 pm
Yay, update, and what an update (http://www.planet-casio.com/files/forums/Soon-104748.G1A)!
(http://www.planet-casio.com/files/forums/Capture-12763.gif)
Title: Re: [C] Unknown project
Post by: Matrefeytontias on March 28, 2014, 06:19:15 pm
Nice :D I understand you halved the resolution, right ? (you use 2*2 pixels)
Title: Re: [C] Unknown project
Post by: TIfanx1999 on March 28, 2014, 06:39:21 pm
Hey, that looks pretty awesome Eiyeron! :D
Title: Re: [C] Unknown project
Post by: Eiyeron on March 29, 2014, 04:37:53 am
Nice :D I understand you halved the resolution, right ? (you use 2*2 pixels)

Haha, I have to say no: it runs at 128*32 perfectly! I have just scaled up the screen is! :p
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on March 29, 2014, 12:06:20 pm
Edit nvm I just realized the lower res was because mode 7 isn't fullscreen so my question about half-res mode doesn't apply (I can't see the screenie from this wifi hotspot). :P
Title: Re: [C] Unknown project
Post by: Eiyeron on March 29, 2014, 02:33:54 pm
I changed a little bit the routine to use the whole screen and render modes.
THe current calculation calcs the distance. If the distance < 0, we're drawing a "ceiling", so what's new : You can choose to draw ceiling (z-inversed mode 7), floor (normal one), or both at the same time. I fixed too the horizon. The horizon parameter is the horizon's offset in the screen. At -32, it draws the horizon at the screen's middle (the both plans will converge to the horizon if you understand).


I'm designing a start of a tileset for testing tilemapping. I attached too a preview of the both plan mode. Obviously is slower at a ratio of 0.5. and the whole routine is slightly sowed down because the distance check.


EDIT : well, the project is getting quite clearer.
Title: Re: [C] Unknown project
Post by: Eiyeron on April 02, 2014, 05:20:33 am
Update : Go see the first post, I linked to a demo addin. Go try test that!
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on April 05, 2014, 02:49:43 am
Awesome! As for the ceiling, to make things more realistic, if, for example, someone uses a sky background with clouds, will it be possible to make the sky scroll slower than the floor?
Title: Re: [C] Unknown project
Post by: Eiyeron on April 05, 2014, 06:50:15 am
It'll need a second render, for the sky. It's a unintended effect from the routine, but I'll do something to improve it.
Title: Re: [C] Unknown project
Post by: Eiyeron on August 14, 2014, 09:13:00 am
Nom.
Title: Re: [C] Unknown project
Post by: Matrefeytontias on August 14, 2014, 11:15:43 am
Wow, great progress O.O can't wait to see the final result :)
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on August 14, 2014, 01:00:00 pm
I love those graphics. Will there be a background in future versions? You could make it 96x64 with an HUD on the side so that you have more room for a background by zooming the whole thing out. F-Zero or Mario Kart would definitively be great with such engine. :)
Title: Re: [C] Unknown project
Post by: Eiyeron on August 14, 2014, 07:35:27 pm
Siapran is working on the graphics, don't worry about them. They are coming later! ^^
Title: Re: [C] Unknown project
Post by: DJ Omnimaga on August 14, 2014, 11:55:59 pm
By the way, you should maybe change this topic title to [C] Unknown Mode-7 project to attract more attention, since some people tend to not visit topics if the title isn't very clear (especially on mobile) plus it almost seems guaranteed that whatever will come out of this will be mode-7. :P
Title: Re: [C] Unknown project
Post by: Hayleia on August 15, 2014, 02:35:30 am
I agree with the title change. I never browsed that topic because of the unattractive title and now I see what I missed O.O
Great project :D
Title: Re: [C w/ Mode 7] Unknown project
Post by: Eiyeron on October 01, 2014, 02:39:23 pm
Sadly, it's in hiatus for the Planète-Casio 10 years contest as we can't use a already announced game. We'll be back more or less after the contest is over.

At least, the Mode 7 engine is open source, as I wanted. That's rare to see things I acutally finish :-°...
Title: Re: [C w/ Mode 7] Unknown project
Post by: DJ Omnimaga on October 01, 2014, 03:41:51 pm
When does the contest end? Also to progress, do you absolutely need Siarpan to be online at the same time as you? Something I noticed is that you are never on when he is, almost like if you were both the same person posting under two different nicks :P (even though that's not the case) but I once remember one of you saying that it was on hiatus because you needed to contact the other project co-author first or something similar.
Title: Re: [C w/ Mode 7] Unknown project
Post by: Eiyeron on October 01, 2014, 03:43:32 pm
I'm sometimes on when he is there. For that project I'll need to do lots of research about AI and graphs (for AI navigation/ track generation), that's why progress are minor on this game, even if I'm active on it.
Title: Re: [C w/ Mode 7] Unknown project
Post by: TIfanx1999 on October 01, 2014, 07:13:40 pm
I somehow missed that last screen shot. That looks wonderful! :D
Title: Re: [C w/ Mode 7] Unknown project
Post by: DJ Omnimaga on October 01, 2014, 09:52:47 pm
I'm sometimes on when he is there. For that project I'll need to do lots of research about AI and graphs (for AI navigation/ track generation), that's why progress are minor on this game, even if I'm active on it.
In the worst case scenario, if you decide to do an F-Zero game you could just go the cheap route like on the SNES and make the AI cheat so that it's always behind you :P
Title: Re: [C w/ Mode 7] Unknown project
Post by: Eiyeron on October 02, 2014, 02:46:02 am
Nah it's not fun, with a bit of steering based path following, a little Ai to decide what path to follow and some hard work, that should be possible, we have more pure processing power (except the fact that the CPU does the graphics too :/)
Title: Re: [C w/ Mode 7] Unknown project
Post by: DJ Omnimaga on October 02, 2014, 11:29:20 am
Indeed, it's more of an idea I had if you ever run into extreme speed issues. You could always make the game so that the HUD uses the side of the screen and the mode 7 area only 96x48 with a scrolling backdrop if that was the case, though.

What would be kinda funny, though, is if the AI was actually slower than the graphical rendering :P
Title: Re: [C w/ Mode 7] Unknown project
Post by: Eiyeron on October 02, 2014, 12:28:45 pm
Yeah, I should have said that I worry about the remaining power for all the game mechanics once I apply the Mode7. That's quite the heavy thing you know.
Title: Re: [C w/ Mode 7] Unknown project
Post by: DJ Omnimaga on October 02, 2014, 01:05:49 pm
One main issue would probably be to code the pathfinding algorithm, although ZippyDee posted a tutorial once somewhere on the forums so that could help. That's unless of course each track got a pre-made pattern that every opponent car follows, but even then you need to code collision and make the cars go back on their path after colliding.
Title: Re: [C w/ Mode 7] Unknown project
Post by: Eiyeron on October 02, 2014, 03:27:50 pm
The hardest part will be collisions. Having to deal with tracks having two different slopes will be quite hard but concerning the direction, we think that we'll use a graph system more or less independant of the track (something like the waypoints), that'll be quite flexible to support items or shortcuts.