Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Mr. Potatobadger

Pages: [1]
1
I get this weird error when I try to build my Jo game now...

I'm not sure what to do, as none of the solutions I've found online have worked...



I'm stuck, man  :'(

2
Share your code / Set the frame of a sprite animation!
« on: August 14, 2017, 01:52:26 am »
Hey all!

I noticed that Jo Engine's sprite animator does not seem to have a function to set the frame of a sprite to whatever frame you like. I went ahead and added that feature, and figured I should share it, as it's fairly commonly needed, and very simple.

I will attach my sprite_animatior.h file for if you want to simply replace the file, but in case you've made additions like I have, here's a simple way to add it:

in "jo_engine_src\jo_engine\jo", you will see "sprite_animator.h". Open this up. I chose to put it under "jo_set_sprite_anim_frame_rate", as it seemed like the best spot.

Here is the code:

Code: [Select]
/** @brief Set animation frame
 *  @param anim_id Id returned by jo_create_sprite_anim()
 *  @param frame Frame of animation to be displayed, where 0 is the first frame.
 */
static __jo_force_inline int jo_set_sprite_anim_frame(int anim_id, unsigned char frame) { return __jo_sprite_anim_tab[anim_id].cur_frame = frame; }

I made sure to keep it consistent with the usual Jo formatting standards   ;D
This seems to be the simplest way to do it. If someone has a better way to do it, please let me know.

Hoping to see this addition in the next official release of Jo!

EDIT:
Here's an example of it in action:
https://i.gyazo.com/7b2a8c29fef8bb04703a09ad9b561edc.mp4

I've set sonic's jumping animation to frame 5 for the sake of example. The code looks like this:
Code: [Select]
jo_set_sprite_anim_frame(sonic.anim_jump_id, 5);

3
General Jo Engine Help / Flipping Sprites?
« on: February 15, 2017, 03:14:09 am »
Is there a way to flip sprites in Jo Engine without flipping every sprite on screen? I know SGL supports this natively.

4
General Jo Engine Help / Running Jo-Engine Applications on Actual Hardware
« on: December 30, 2016, 04:28:28 am »
Hello. Today, I got an Action Replay cart so I can play Saturn Backups as well as my homebrew games made in Jo-Engine on actual hardware, using Pseudo Saturn. I assumed it would work just fine to run applications made with jo engine, but it doesn't. Jo Engine games burned to a CD-R only work using the Swap Trick. Backups of my Sega Saturn games burned to CD-R's work fine with just the cartridge.

According to this video, it should work just fine:

https://www.youtube.com/watch?v=R5xiJGWEnpQ

 I used the same Pseudo Saturn version as in the video, yet after booting my Sega Saturn, I go to a blank screen.

I've tried burning the demo1 with the .iso file, the .cue file, and the .bin file, however none of them work. I've also tried the Saturn CD Patching tool (which has been mentioned on another thread on this site), which also did not help.

I'm really hoping someone knows how to run Jo-Engine games with Sega Saturn, it would be really awesome to see my progress on my actual Saturn hardware.

Cheers! :D

EDIT:

I noticed something. I'm not sure if I've made a mistake, or if I have an incorrect setting somewhere? But the demos for the Ship and for the Sonic Game are NOT the same as what I see on this page:

http://www.jo-engine.org/demo/

For example, this is all I see for this Shooter demo:

https://i.gyazo.com/a7ef523d5a99ec57e2f5da3914d8bc77.gif

And in the Sonic Demo, it's missing the waterfall, the running animation, the HUD, and it has a different tile layout. Do I somehow have an older version? Could this be the reason why my games will not run with Pseudo Saturn? I'm confused!

5
General Jo Engine Help / Using other .c files to run functions externally?
« on: December 23, 2016, 05:59:52 am »
Hello!

First off, I want say I'm extremely impressed! This engine is really awesome! I can tell I'll be able to do some really cool stuff with it. I started using it just the other day, and I've picked it up super easily. I've only been able to use it inbetween my job, so I haven't made as much progress as I would have liked.

https://www.youtube.com/watch?v=jzX0Ek00HsI

I've been teaching myself how to use the engine with the demonstrations you see in the video there.

Anyways.

My issue is that I can't seem to use call functions from other .c files inside main.c.

It works just fine in the included Sonic example. In the Sonic example, main.c calls "load_sonic()" from sonic.c, to load sonic's sprite for use. Then "display_sonic()" is called to show sonic's sprite based on the conditions at the time, using variables defined in sonic.h.

I attempted to load a sprite using the exact same method in my project. The problem is, when I call the function I want in main.c to load my sprite, the compiler won't even compile. The compiler closes the second it is opened when I have that function listed. It's very strange! There must be something I'm doing wrong, or something I'm missing.

I'm really hoping you can help me out, Johannes, and I'm confident you can!

Thanks in advance :)

Pages: [1]
SMF spam blocked by CleanTalk