AuthorTopic: Graphics for a C64 game  (Read 18826 times)

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #10 on: September 24, 2010, 04:32:39 pm
Last time I touch the clouds today (and hopefully forever, otherwise I'll end up overdoing it):




I am wondering, how much processing power would it cost to open the upper border, make it skycolour and they the sun and some clouds as sprites up there?

Do you mean something like this?



It surely would be nice, but not an option because, at each rasterline, it would be necessary to change the border color where the sky begins and then where it ends, which means either wasting lots of CPU cycles or writing complex code to do something (little) else while the sky gets drawn on the monitor. But the real showstopper here is the fact that I'm using BASIC, so I can't even synchronize properly.
Nice idea, though :y:


Quote
To give the whole thing more space to breathe. That way you could perhaps even make the clouds move.

Now that would really attract the eye. But, that aside, a lot of memory for the sprites and some CPU power would be needed, and I need both for a few gameplay things that still need to be added ;) (Scrolling is no go as well, because there just ain't enough CPU power.)
« Last Edit: September 24, 2010, 04:40:03 pm by saimo »

Offline ptoing

  • 0101
  • ****
  • Posts: 3063
  • Karma: +0/-0
  • variegated quadrangle arranger
    • the_ptoing
    • http://pixeljoint.com/p/2191.htm
    • View Profile
    • Perpetually inactive website

Re: Sky for C64 game

Reply #11 on: September 24, 2010, 06:44:49 pm
I see.

Why the hell are you doing this in BASIC?  ???
There are no ugly colours, only ugly combinations of colours.

Offline PypeBros

  • 0100
  • ***
  • Posts: 1220
  • Karma: +2/-0
  • Pixel Padawan
    • PypeBros
    • View Profile
    • Bilou Homebrew's Blog.

Re: Sky for C64 game

Reply #12 on: September 24, 2010, 07:11:27 pm
IIrc, you could quite easily have your raster effect coded in 6502 assembly and keep the rest of the game logic in BASIC. That will be a mere matter of POKEing some opcodes at some location (both an interrupt handler and a handler installer), then SYS at that location and voilą : the IRQ handler is installed and will run in background while the BASIC interpreter happily runs the game in the foreground.

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #13 on: September 24, 2010, 07:35:48 pm
Why the hell are you doing this in BASIC?  ???

Long story made (really) short...
The more time passes by, the more I wish I had a simple machine to play around with, hitting directly its hardware. The C64 is a machine I love and, unfortunately, know too little about, so, at some point, I decided to have some fun fiddling with it. I had even a clear idea in mind: I wanted coloured HIRES sprites. I knew BASIC would be enough for that, so I chose it to get immediately started. I ended up doing much more: I created a custom framework that allows pushing BASIC to wild limits (thanks also to the BOSS-BASIC compiler) and that provides a large and comfortable library of functions of all kinds. Then, during one of those nights of brainstorming (which actually started with the focus on that other game I told you about privately a while ago), I had the crazy idea the game is based on and so I started working on it knowing it would be feasible. Eventually, the fun became a (pleasant) challenge: to create a colorful, 100% HIRES game using just BASIC.
« Last Edit: September 24, 2010, 07:40:53 pm by saimo »

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #14 on: September 24, 2010, 07:39:06 pm
IIrc, you could quite easily have your raster effect coded in 6502 assembly and keep the rest of the game logic in BASIC. That will be a mere matter of POKEing some opcodes at some location (both an interrupt handler and a handler installer), then SYS at that location and voilą : the IRQ handler is installed and will run in background while the BASIC interpreter happily runs the game in the foreground.

Yes, sure*, but my objective is writing everything in BASIC :)

*EDIT 2: actually, even in assembly, things wouldn't be that straightforward: while it is easy to synchronize vertically, it isn't horizontally).

EDIT: I must admit that the code is already polluted, though: the music has been created with GoatTracker and thus the replay routine is in machine language - believe it or not, although I had no choice, this brought a tear to my eye when I added music :crazy:
« Last Edit: September 26, 2010, 09:53:43 am by saimo »

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #15 on: September 26, 2010, 09:51:36 am
Update: I made a few minor changes to the clouds (accentuated a few curls) and implemented the code - actual screenshot:



(The jerks are due to the time that passes between the instructions poke53272,gp : poke53265,91, where the first changes the video memory location and the second the video mode. I've already managed to hide them by making them occur during the horizontal blanking, but the solution isn't 100% stable, so there's still work to do. EDIT: fixed, now.)

I've also been thinking about highlights...

The first solution that came to mind was to turn the dents into bumps and thus use the 3 background colors for both them and the highlights; yet, this idea didn't convince me at all.

The second solution was to just turn the dents by 180° so that they'd show the bright side, which could be painted in the highlight colors: however, a quick mockup (which I trashed, sorry) didn't manage to convince me.

The third solution came from an old idea that actually got implemented in the first stages of development:



It surely makes things more interesting, but for some reason the slanted top side doesn't really seem suitable to me (and it also costs the loss of gray as shadow color). What do you say?

EDIT: alternative (and better) highlights:



#1 requires only 1 character, the others need 3 characters and more processing time (but those are hardly problems). I can't really decide, probably the best - as it often happens - is in the middle ::)

Also, I've been considering (not for the first time) to remove the outlines, but they are too important both for the cartoonish feel and the clear separation of the platforms.
A final thing to note is that I have now 13 characters free (courtesy of the bitmap top): maybe they could be used to improve the platforms (f.ex., they could be used to add dents also to the slanted sides)...

EDIT 2:

Just tried a different approach:



The problem is that I can't figure out how to enrich the platforms with the 4 colors used for highlights and outlines (white, the two lighter grays and black) ???

EDIT 3:

Some more ideas:



Only the first looks acceptable to me, but I don't know if I'll go for it as the highlights make the platforms seem too smooth (and there's also the loss of gray for dents that bothers me). Ah, please ignore the bottom-right one: it isn't tecnically possible (that's what happens when one doesn't sleep enough) :yell:
« Last Edit: September 27, 2010, 10:41:34 am by saimo »

Offline STE 86

  • 0001
  • *
  • Posts: 51
  • Karma: +0/-0
    • View Profile

Re: Sky for C64 game

Reply #16 on: September 27, 2010, 10:42:06 am
if you want inspiration for clouds on the c64 got to CSDB and have a look at the entries for Jim Sachs and Wayne Schmidt.

if you want cutesy game clouds then have a look at games like Nobby the Aardvark and Mayhem in Monsterland on Lemon64.

Steve

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #17 on: September 27, 2010, 10:50:52 am
Thanks for the pointers, STE 86.
Yes, I was after cutesy clouds. Those appearing in the games you mentioned would be suitable, but now I'm quite happy with the last ones I posted - they're less plain and still cartoonish enough. Do you think they're not good, perhaps?
At the moment I'm trying to find a way to make platforms more interesting, but all the solutions I came up with don't really satisfy me :-\

Offline saimo

  • 0010
  • *
  • Posts: 164
  • Karma: +1/-0
    • R37R34M
    • View Profile
    • RETREAM

Re: Sky for C64 game

Reply #18 on: September 27, 2010, 05:07:09 pm
I tried hard to find a way to add highlights, to make the platforms prettier and, at the same time, not to lose on the color side. I even tried weird things like this:



but, eventually, I settled with the simple highlighting solution indicated in a previous post (actual screenshot):



While at it, I retouched again a couple of clouds slightly.

What do you say? Time to move on?

Offline ptoing

  • 0101
  • ****
  • Posts: 3063
  • Karma: +0/-0
  • variegated quadrangle arranger
    • the_ptoing
    • http://pixeljoint.com/p/2191.htm
    • View Profile
    • Perpetually inactive website

Re: Sky for C64 game

Reply #19 on: September 27, 2010, 05:09:13 pm
Looks good enough.

One nitpick: I would not have the biggest dents anywhere at the corners where they touch the outlines ond the dark side on the right - looks odd.
There are no ugly colours, only ugly combinations of colours.