Jump to content
IGNORED

Hello, (Graphical) World!


Recommended Posts

Recently, I started a development project on the Atari Falcon. Getting up and running was a serious challenge. Among the more difficult aspects of this challenge was figuring out how initialize the Falcon graphics hardware and push pixels onto the screen. Now that I have gotten over that hurdle, I'd like to offer my fellow beginners some guidance.

 

Attached is a Pure C project and source file that do pretty much exactly as I described above. They set the screen up for 320x240 true color mode and cycle through the colors, painting the entire screen at each iteration. This code was compiled on Aranym and run tested on both Hatari and a real Falcon. The compiled PRG is included as well.

 

COLRCYCL.zip

Edited by pixelmischief
Link to comment
Share on other sites

  • 4 weeks later...

Awesome stuff! Will have to get this onto my Falcon this week. I started coding on the machine myself last year in assembly and hit the same issues WRT to setting up the video modes etc. I hit up Laurent (Thados) and he told me he'd used the Dead Hacker's Society demo framework to sort things out for his games so I've started down that route. Will be interesting to play with the C code though. I'm trying to make a columns clone at the moment but have a bug that crashes the machine. It's getting a bit tedious because I know what code is causing the crash but can't see anything wrong with it, and so far haven't had luck getting debuggers working (though trying with Hatari ATM).

Link to comment
Share on other sites

  • 2 weeks later...

Dead Hackers' stuff and Reservoir Gods' GODLIB are both positively brilliant. And there's the problem. For a beginner, they are simply too brilliant. Learning to use those libraries as a beginner is like learning to fly the space shuttle when what you really wanted to understand was rocket propulsion. The former would be just as difficult as the latter, without actually accomplishing the objective. It sounds to me like your journey is at an advanced enough stage to benefit from library support. I look forward to being there myself. =)

Edited by pixelmischief
Link to comment
Share on other sites

  • 4 weeks later...

Couple things I thought about while looking at your code. Of course, it's a simple demo and an opportunity to learn so let's take it for what it is but a couple things came to mind.

  1. I think it's good practice to free up your malloc'ed memory when finished with it. Like after the VsetScreen()
  2. I think it's also a good idea to ensure malloc isn't null.

#2 isn't really an issue since you probably have tons of RAM but since there is a chance that someone has limited RAM and has replaced the stock desktop, I know I ran out of RAM pretty quickly with my limited 4 megs. I always try to make my programs fail gracefully. Of course, my C is pretty rusty so I might be overly concerned.

Link to comment
Share on other sites

OK. You have laid down the challenge and that challenge is, get off my butt and do what you're doing. You're a great motivator. :-D I will start to work on my game and let's see what we can accomplish on our own.

 

I am thrilled to hear it. When Albert agreed to create this programming-specific subsection, I had high hopes for encouraging activity here. Glad to see some traction. My own project has been stalled recently, but I think it is now YOU who have inspired ME. Let's keep in touch on it.

Link to comment
Share on other sites

  • 1 month later...

Long time ago I start to make Wet game for Atari: Http://wet.atari.org

 

I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot :)

Link to comment
Share on other sites

Long time ago I start to make Wet game for Atari: Http://wet.atari.org

 

I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot :)

I wasn't expecting such a mature game :)

Link to comment
Share on other sites

  • 3 months later...

Long time ago I start to make Wet game for Atari: Http://wet.atari.org

 

I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot :)

 

Reasonably, if you're doing a game where screen refresh rate is an issue, you probably don't wanna be doing it with GFA Basic. But even in C, you're probably not going to use VDI for drawing anything. You're going to want to manipulate the screen buffer directly, using the 68000 and blitter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...