Author Topic: My CPCRetroDev 2017 entry  (Read 3601 times)

0 Members and 1 Guest are viewing this topic.

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #25 on: 04:34, 23 August 17 »
Hi everyone.

I now have an animating block in my engine, to represent the player character at this early stage of development.
It is of course a placeholder, and bears no resemblance to how the character will actually look.
 ;D

The character is currently 8 tiles wide, and 12 tiles tall, but this may change as I stumble my way through pixel art!
By comparison, Savage's main sprite is 7 tiles wide, by 8 tiles tall.
But of course I don't have even 1% of Nick Bruty's pixel skills, so my game won't look anywhere near as attractive.

At this stage, animation and the player's facing-direction are represented by the position of the red bar in the block.
The animation frame index is preserved when the player changes direction.

I've also managed to reduce the screen tearing.
The main focus was to reduce tearing of the player character, as that is what the player will be focused on.
This was done by adjusting the order in which tile cells are drawn to the screen.
Screen tearing won't ever be totally eliminated in this engine, but I'm pretty happy with the way things are now.

If you'd like to see how it looks, click the following link:
https://dl.dropbox.com/s/iepkmdeyjpa1nk7/cpc1.gif

And now, finally, I can start building the first level!
« Last Edit: 04:46, 23 August 17 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: fr
  • Liked: 277
Re: My CPCRetroDev 2017 entry
« Reply #26 on: 10:55, 23 August 17 »
Honestly, your game engine seems really promising.  :)

Offline ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.751
  • Country: gb
    • index.php?action=treasury
    • Mundo CPC
  • Liked: 977
Re: My CPCRetroDev 2017 entry
« Reply #27 on: 12:42, 23 August 17 »
It looks really great!!  :) :)

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #28 on: 16:00, 23 August 17 »
Thanks folks.
 :)

If my game turns out anything like what I'm imagining, I'll be very pleased.
The problem is that I don't yet know if I can actually create what I'm imagining!

The CPC can certainly do it, but I don't know if I can do it.
 :-[
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: fr
  • Liked: 277
Re: My CPCRetroDev 2017 entry
« Reply #29 on: 16:43, 23 August 17 »
Thanks folks.
 :)

If my game turns out anything like what I'm imagining, I'll be very pleased.
The problem is that I don't yet know if I can actually create what I'm imagining!

The CPC can certainly do it, but I don't know if I can do it.
 :-[

I understand, making a game engine and making a whole game are really two different things.
 

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #30 on: 08:57, 31 August 17 »
Hi folks.

I've managed to make my tile engine a little faster, thanks to some sneaky stack abuse.
*Really* happy with how it is running now, even when there are large objects scrolling around.

However, I've been stuck on getting graphics into my program.  :(

I had some great suggestions from a few generous folks about how I could do it, but the tools that were suggested create a tile array containing pointers to the tile data, rather than indexes describing which tile data array to refer to (if that makes sense!).

The reason I need tile indexes rather than pointers is because I am comparing 8-bit values, to determine which tiles change each screen refresh. Having pointers would cause me to change a bunch of code to use 16-bit values, which would slow things down, and also mess up my fast loops by taking registers away.

So, I've been trying to figure out how to convert a windows BMP to amstrad pixels.
After much banging-my-head-against-a-brick-wall, I think I've finally figured it out.

It actually seems really simple. I've never understood the relationship between INKs and the screen, but I think I get it now.
Well, at least I hope I'm right, otherwise the tool I'm writing (in Blitz Basic!) will be a waste of time!

[EDIT] YES IT WORKS!  ;D
The correct byte values are being returned by my conversion program.
Now I'll make this program create the tile and object data, based on an image (much like a sprite sheet).
« Last Edit: 10:36, 31 August 17 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #31 on: 18:46, 05 September 17 »
Aaaaand finally the graphics conversion program is done!
It was pretty difficult to put in all the things I need, and I tripped over lots of mistakes, but here we are at last!

I'm still using placeholder graphics, but here is an idea of what my project looks like with actual graphics in it.
(Note that this is indeed full-screen mode 0 - I'm just using big chunky pixels).

https://dl.dropbox.com/s/q6ped7boenqo4ze/cpc2.gif
« Last Edit: 18:48, 05 September 17 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: fr
  • Liked: 277
Re: My CPCRetroDev 2017 entry
« Reply #32 on: 20:12, 05 September 17 »
Really good ! Always real speed ?

I'm really worried when i compare your game engine with mine  ;)

« Last Edit: 22:12, 05 September 17 by Arnaud »

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #33 on: 01:34, 06 September 17 »
Really good ! Always real speed ?

I'm really worried when i compare your game engine with mine  ;)

Yes, that's the real speed.

You don't need to worry - I don't have an actual game yet, just an engine.
 :P
« Last Edit: 04:18, 06 September 17 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 407
  • Country: fr
  • Liked: 277
Re: My CPCRetroDev 2017 entry
« Reply #34 on: 20:36, 06 September 17 »
You don't need to worry - I don't have an actual game yet, just an engine.
 :P

I hope to see your finished game to be in competition with my game at cpcretrodev  :)
« Last Edit: 23:37, 06 September 17 by Arnaud »

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #35 on: 17:47, 08 September 17 »
Well, the last 2 nights of development were an absolute nightmare!
I actually thought my project was in jeopardy!

I ended up needing to implement multiple tilesets.
I thought it would be easy, perhaps just needing some offsets or something simple like that.
How wrong I was!

It turned into a total disaster, completely breaking my display routines and causing terrible graphics corruption.
It took *hours* to figure it out; it was so frustrating.

But, finally, it is in.
The feeling of success when it worked was tremendous!

There is a slight speed hit, unfortunately, but I'm working on improving that.
It still runs at a great speed regardless.

One advantage of the slightly slower speed is that screen tearing is less obvious, as objects stay in one spot a tiny bit longer (during scrolling) than before.
 :P
« Last Edit: 17:48, 08 September 17 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #36 on: 16:21, 13 September 17 »
Hi folks.

After a couple of frustrating nights of not-much-progress, I've managed to get collision detection working with platforms.
Jumping isn't in yet, but I'll be starting that next.
However, gravity has been implemented.

My game is now checking for collisions to the left/right of the player, and under the player.
Also, when the player walks toward a platform that is exactly one tile higher than the current position, the player will automatically step up onto it and keep walking.

https://dl.dropbox.com/s/xrg0krzwf7pz3nl/cpc3.gif

Offline Skunkfish

  • Supporter
  • 464 Plus
  • *
  • Posts: 397
  • Country: gb
  • Editor of Colour Personal Computing
    • Colour Personal Computing - The CPC Fanzine
  • Liked: 285
Re: My CPCRetroDev 2017 entry
« Reply #37 on: 15:42, 01 February 18 »
Is this game still being worked on?

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.207
  • Country: au
    • index.php?action=treasury
  • Liked: 871
Re: My CPCRetroDev 2017 entry
« Reply #38 on: 13:26, 02 February 18 »
Unfortunately the project is on ice for now. Maybe I'll pick it up one day if I find enough spare time.
« Last Edit: 14:05, 02 February 18 by ervin »
My (cancelled) entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.cpc-power.com/index.php?page=detail&num=12494