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.

Messages - Mr. Potatobadger

Pages: [1]
General Jo Engine Help / Re: Graphics and memory managment
« on: November 17, 2017, 04:29:25 am »
I'm a bit late to the punch here, but I highly recommend using palettes graphics. It's limited to 256 colors I'm pretty sure, but that's realistically more than enough, and it saves a ton of memory. However, at the moment, there's not really a good way to convert images into the format without writing a simple script

I plan on making a fully fledged tool eventually than can convert images into the paletted format, and also help you manage the palette registers.

What do you mean by SDK? Jo itself? The compiler? If so, then yes, I gave it a fresh install of Jo.

Restarting my PC is the first thing I did

No luck :(

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  :'(

Share your code / Re: Set the frame of a sprite animation!
« on: August 20, 2017, 12:44:29 am »

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!

Here's an example of it in action:

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);

Still having issues after updating makefile. Burnt games made using Jo Engine still work using the swap trick, but I absolutely hate doing the swap trick. Pseudo Saturn is what I prefer to use. When I use Pseudo Saturn's debugger, I get a screen that says, "CPU Adress Error", with a list of all of the Saturn's registers, followed by hex.

Any ideas?

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.


I've figured out my issue.

...Kind of.

I'm not really sure what my issue was with that project in particular, but I cloned the backup folder and ported all of my code to the new project. Now it works just fine! I'm pretty sure missing the other file in the makefile was the problem, but I'm still not too sure why it wouldn't work after that.

Regardless, I've got it working now!

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:

 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


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:

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

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!

This is what I get:

My makefile is as follows:

Code: [Select]
SRCS=main.c ring.c
include ../Compiler/COMMON/jo_engine_makefile

When I remove ring.c, it compiles just fine.

Where do I find the error log?

I completely forgot about the makefile! Including my other file in the makefile is definitely a step in the right direction, haha. However, it still does not compile.

This is my makefile:

Code: [Select]
SRCS=main.c ring.c
include ../Compiler/COMMON/jo_engine_makefile

This is ring.h:

Code: [Select]
#ifndef __RING_H__
# define __RING_H__

#define RING_WIDTH (16)
#define RING_HEIGHT (16)

extern ring_t ring;

typedef struct
int ring_anim_id;
} ring_t;

void ring_display(void);
void ring_load(void);

#endif /* !__RING_H__! */


And this is my ring.c:

Code: [Select]
#include <jo/jo.h>
#include "ring.h"

ring_t ring;

static const jo_tile ringframes[] =

inline void ring_display()
jo_sprite_draw3D2(jo_get_anim_sprite(ring.ring_anim_id), 0, 0, 450);

 void ring_load()
int sprite_id;

sprite_id = jo_sprite_add_bin_tileset("RING", "RING.BIN", JO_COLOR_Green, ringframes, JO_TILE_COUNT(ringframes));
ring.ring_anim_id = jo_create_sprite_anim(sprite_id, JO_TILE_COUNT(ringframes), 2);

I feel like it should work, I'm hoping I'm just missing something obvious, or that I forgot a step.

I don't reference ring.c or ring.h in any way in main.c, and it still will not compile :(

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

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.

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


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