JelliBoi - Game Jam 3


(David) #21

can you drop a hex file?


(Simon) #22

Can you get the hex files here > https://felipemanga.github.io/ProjectABE/

Click GameJam3 on the LHS.


(Pharap) #23

There’s a hex file on the release:

Most people who put the source on Github also put a .hex (and sometimes a .arduboy) with the releases.


(James) #24

Thanks! I prefer using hex files when I’m on the go…


#25

I’ve uploaded a minor update. I’ve fixed the beep being a buzz (needed beep.begin() :coffin: ) And added basic highscore capability. Right now it’ll just save your highest score and check if you beat it.

I tried to improve the collision with some help from @filmote, However the way I draw the swimming animations is a major hold up leaving me with a spaghetti nightmare. I feel like it would be faster to rewrite the whole game around the better collision method than try and jerry rig it so I don’t think that improvement will make it in unfortunately. Perhaps in jelliboi2 when i can realize the larger playing field I had originally wanted.

I’m still playing around with the name entering code so maybe the highscores will get a little expansion at some point.


(Pharap) #26

I was reading through the commits when I spotted this.
So I grabbed a copy to see if it would compile and sure enough it doesn’t:

exit status 1
stray ‘\’ in program


Some other advice:

.hex files

You can upload extra files into the releases.
I recommend attaching .hex files to the release instead of uploading them with the source.
It makes it quicker and easier for people who only use the .hex files.

collisions

As for the collision issue, you could store an array of Rect in progmem that specifies how far into the image the bounds are, index it with the frame number and then offset it with the creature’s position.

I can’t really demonstrate very well because what your code passes as the frame index seems to vary quite substantially, but essentially, something like this:

const Rect strobBounds[] PROGMEM =
{
	{ 0, 4, 6, 8 },
	{ 4, 0, 8, 6 },
	// etc
};

Rect pgm_read_rect(const Rect * progmem)
{
	Rect result;
	
	// 'Dangerous' pointer manipulation
	const char * data = reinterpret_cast<const char *>(progmem);
	char * resultData = reinterpret_cast<char *>(&result);
	for(size_t i = 0; i < sizeof(Rect); ++i)
		*resultData = pgm_read_byte(&data[i]);
	
	return rect;
}

Rect getStrobBounds(uint8_t i)
{
	return pgm_read_rect(&strobBounds[i]);
}

And then when you get a Rect from getStrobBounds you do rect.x += object.x and rect.y += object.y and then you can use the rectangle for collision checking.

Having a collision mask separate from the sprite is actually not uncommon in some games, and it’s one of the reasons why one of the mantras of programming is ‘separation of concerns’.


#27

Thanks for that catch, I must of bumped my keyboard after I did the compile. Having a mask might be a good compromise. There’s a couple of issues I found like the larger fish being two 16x16 tiles instead of a 32x32 tile.


(porter) #28

when ever i try to upload it it gives me the following error message:

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = “”; type =
Software Version = a.; Hardware Version = �.�
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn’t
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader


#29

I won’t be able to look until later
Are you trying to compile the source or use the hex


(porter) #30

I’m trying to use the source


#31

I can compile the source fine, If I had to guess it might be something with the IDE. Have you tried uploading anything else? have you tried using crait’s or Team args uploader with the hex?


(Pharap) #32

Which game did you have loaded before trying to load JelliBoi?
Have you tried holding up when you turn your Arduboy on to put it into ‘flashlight’ mode?


(porter) #33

did it in flashlight mode and it worked thx :slight_smile: