Follow the development of Rick Ardurous

(Alban Nanty) #21

Hello,

The episode 14 is out: stream replay

In this episode I improve the dynamite logic, and implement the Bullet item, and give the ability to fire to our main character.

See you.

1 Like
(Alban Nanty) #22

Hello,

The episode 15 is out: stream replay

In this episode I refactored the update of the items, in order to implement the static collision of the bullet. I also added sparks FX when the bullet hit the wall.

See you.

1 Like
(Alban Nanty) #23

Hello,

The episode 16 is out: stream replay

In this episode I debugged and improved the bullet, and create the Arrow item. I also implemented the animation for the main character to fire and place a dynamite. Finally I’ve created the Arrow launcher for the Statue to launch its arrow

See you.

1 Like
(Alban Nanty) #24

Hello,

The episode 17 is out: stream replay

In this episode I started to implement the crawling animation for the main character.

See you.

2 Likes
(Alban Nanty) #25

Hello,

The episode 18 is out: stream replay

In this episode I’ve debugged and improved the crawling animation for the main character.

See you.

1 Like
(Alban Nanty) #26

Hello,

The episode 19 is out: stream replay

In this episode I explained how I finalized the crawl state, I’ve integrated the jump animation, and I’ve implemented the death state and animation for the main character.

See you.

2 Likes
(Alban Nanty) #27

Hello,

The episodes 20 stream replay and 21 stream replay are out.

In those episodes I worked on the platforms and ladders and implemented the climb ladder state for the main character.

See you.

2 Likes
(Simon) #28

They game is really coming along … do you have a finish date in mind?

(Alban Nanty) #29

Hi Simon,

No, not really. I guess I still have a lot to do :slight_smile:

1 Like
(Alban Nanty) #30

Hello,

The episode 22 is out: stream replay

In this episode I have fixed some bugs on the main character behavior, and I started to implement the support of drawing the main character in different screens.

See you.

4 Likes
(Alban Nanty) #31

Hello,

The episode 23 is out: stream replay

In this episode I continue to implement the support of drawing the main character in different screens.

See you.

1 Like
(Alban Nanty) #32

Hello,

The episode 24 is out: stream replay

In this episode I finished to implement the support of drawing the main character in different screens, and we have also fixed the drawing of all the items in different screens.

See you.

3 Likes
(Alban Nanty) #33

Hello,

The episode 25 is out: stream replay

In this episode I started to implement the AI for the walking enemies.

See you.

2 Likes
(Alban Nanty) #34

Hello,

The episode 26 is out: stream replay

In this episode I continue to implement the logic of the Enemy, integrating its walking animation, adding a state machine for walk, half turn, and fall, and implementing the logic for the enemy to do a half turn.

See you.

3 Likes
(Scott R) #35

I just realised it’s been a year already, how time flies. The game is really starting to take shape now. I’m looking forward to see how it progresses further.

2 Likes
(Alban Nanty) #36

Yes, time flies!! I made a long pause for a while, but these days, I tend to be more regular for the streaming periods. I hope I can keep on that steady progress.

2 Likes
(Pharap) #37

Personally I’m just waiting for the game itself (and the source code of course).
I’m one of those people who’s not very good at sitting around watching videos (especially hour-long ones).

2 Likes
(Alban Nanty) #38

Sure, I’ve no problem with that, actually, I’m happy to know that you find interest in the game itself.

The source code is already available, but of course, I update it after every stream, so you may want to wait for the final version of the code, if your goal is to modify it to create a similar game.

(Pharap) #39

I don’t have a bitbucket account so I’d have a hard time contributing unless I sent you and modifications directly.
I don’t really like bitbucket’s UI,
it was a bit of a struggle to actually find the source code from that link.

https://bitbucket.org/banban/rickardurous/src?at=default

Even then I can’t see a “download all source code” button anywhere.

I probably wouldn’t be doing that, but I would like to have a look to see if I could find some ways to save memory and/or spot potential issues.

My thoughts:

  • Your code could probably benefit from using some C++11 features like constepxr.
  • The signedness of char is actually implementation defined, so if anyone had any plans to port this then that could be an issue.
  • I think switching to Sprites rather than arduboy.drawBitmap might save you some memory, but I see you’re using a custom drawing function so that might not be possible.
  • Not using virtual would probably save quite a big chunk of memory, but you’re relying quite heavily on virtual functions so that would be a lot of effort to change.

It makes a nice change to see well-commented code, a lot of people just don’t bother.

(Alban Nanty) #40

Hello Pharap,

Here is a link to the download page (so you don’t need to create an account to have a snapshot of the repo): https://bitbucket.org/banban/rickardurous/downloads/

To answer your thoughts:

  • constexp seems indeed very interresting on such a tiny platform. I’m not sure however that the Arduino compiler can support it. I will try it, if I see a contant expression somewhere. However I don’t feel that I have a lot of functions that could benefit from it.
  • Because I develop on a such tiny platform, I cannot make my code portable. This will become worse and worse, I will later introduce more optimizations that will be thightly be linked to the Arduboy platform, such as the screen resolution for example. For example if I would develop on a “normal” platform I won’t bother at all to pack some values, or I won’t try to group several flags in one, just to limit the values of an enum to 8. I’m aware that this makes the code less readable, and less robust to changes.
  • I personally think that Arduboy 2 is gigantic. Sure it proposes many cool services and API for developing games quickly, but it also use too much progmem for those who don’t need those services (By the way, it would be cool, if the developers of the Arduboy API add a bunch of #define to enable or disable some parts of the code that the developers don’t use, knowing that everything could be enable by default). I also personally think that not proposing to draw a sprite in mirror (both x and y) is a huge miss in the API. So I do believe that if I use Arduboy 2, I won’t be able to fit my game in memory.
  • Sure, using virtual add a virtual table in each class. But so far, I use only 1 virtual function (Update) in the base class, and one in the PickUpItem class (PickUp). I guess the address of those virtual function use an int, therefore if I have 100 items in the final game, I will loose 200 bytes, which I think is reasonable for having a manageable implementation. But anyway, I’m aware of the weigth of the virtual, and I may remove them if I need to find some progmem.
  • Thank you for commenting on my code, I always code with comment, this was they way I learnt how to code, and now I’m used to it.