It is currently Wed Oct 22, 2014 5:10 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: GUI design
PostPosted: Wed Jul 08, 2009 6:22 am 
Offline

Joined: Tue Jul 07, 2009 4:05 am
Posts: 4
I'm looking for tips on where to start construction of a graphic user interface for C64. I am experienced in Cad/Cam and I have lots of software like LOGO, light pen, Geos, whatnot... Is there anyone or any place that can point me in the right direction before I start wasting my time? I would like to eventually design something like a gauge cluster/control panel type interface. (Set background with analog gauge needles and such) I just have no idea where to start with graphics on this level.

Thanks much, happy to be new to this community!

-EP


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Wed Jul 08, 2009 10:22 am 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 845
Welcome to the forum! I think you need to give us some more information on this project. What's the big picture? A game? A utility? How will you interact with the GUI? What platform are you using for development: PC or C64? Regardless, I would recomend you to take a good look at Timathes 3.0. It's a very powerful C64 painting program for PC that handles various graphic modes and even sprite animation. Check out this link http://noname.c64.org/csdb/release/?id=75871 . Oh and it requires Microsoft .NET 2.0.


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Thu Jul 09, 2009 3:03 am 
Offline

Joined: Tue Jul 07, 2009 4:05 am
Posts: 4
Well, as with any programming project, I want to start small. I want to graphically display data I get from the user port and joy ports. I have no problem interfacing the ports. I just want to produce quality graphical data screens on the C64 that are real time representations of the data coming in. A single gauge needle or graphical bar alone in the middle of the screen showing a reading value would be a landmark for me.

Lets say for example I wanted to monitor a small engine RPM and temperature. It would be my ultimate goal to display that information on screen as a gauge or hi res (pixels) linear graph, without depending on the stock easy block character format that I could produce in CBM Basic V2 with the screen clearing and refreshing slow enough to give me a siezure. : )

I need to get away from basic it seems. :) A great example is the game Apollo 18 for C64. Many instruments and controls in a GUI that react in real time. Thats where I want to get down the road. Anyone can tell me to get into machine code or whatnot, but I still have no certainty as to where to proceed once someone tells me to look at machine code.

This is the direction I'm looking for! Thanks for your quick reply RaveGuru. I appreciate the tool tip!


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Sat Jul 11, 2009 2:10 pm 
Offline

Joined: Sat Oct 14, 2006 9:30 am
Posts: 140
If you need a general introduction to graphics programming, try some of the old books published on the subject:

http://www.bombjack.org/commodore/books ... _AND_SOUND

You might want to take a look at CC65 for your programming needs. It's a lot faster than BASIC, while not quite as complex as assembly programming. If your needs are modest you can use the built in TGI driver to draw the graphics.


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Sun Jul 12, 2009 9:34 am 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 845
What you need to do, is to learn the VIC chip if you want to produce high quality graphics in realtime. There are some really good papers out there on the net. Unfortunately I dont have any links here but Google is your friend! Of course this requires you to master bit level programming but since you already figured out how to access the ports, that should be no problem. I guess you're already familiar with ASM or at least C. However, I suggest you try to find some easy to use graphic tool. I'm not familiar with the TGI driver for CC65 but it might be worth checking it out first as VIC programming takes some time to learn. If you're thinking about producing analogue realtime gauges from scratch in ASM or even C, you're in for quite a challange ;)


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Fri Aug 28, 2009 4:53 am 
Offline

Joined: Tue Jul 07, 2009 4:05 am
Posts: 4
Well, it looks like I'm going to be stuck with machine language subs to get the resolution I need for monitoring incoming data and producing any sort of graphic animation required to produce decent gauges. I kinda knew this coming in, but I didn't realize basic was so slow! I was born in '77 so that does explain my enthusiastic view of basic (Qbasic? :)

I've learned a ton so far. I'm just getting to the point where I can get something simple done.

My initial idea for an analog gauge will be something like a bitmap background from a screen dump, then an series of sprites that represent a needle on the gauge. Planning ahead, I might just make a large dot sweep around the radius of the gauge. That would end up being alot more 0's in the sprite data : )

Still trudging ahead, re-inventing the exact wheel that many got paid salary to do back in the mid 80's... lol

Good times!
-EP


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Fri Aug 28, 2009 11:26 am 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 845
You'd probably need a matrix of at least 4 sprites for one needle, depending on the resolution of the gauge. Remember that you can only have 8 sprites on screen unless you do sprite multiplexing, but that requires quite a bit of experience. Also, the number of sprite images is limited. A fixed point line drawing algorithm would probably be easier to work with in the long run. Especially if you want to add more gauges. A much easier way would be to only use "led" style gauges. You could even do this using standard character graphics using the quarter char blocks. It would definitly be fast with ML!


Top
 Profile  
 
 Post subject: Re: GUI design
PostPosted: Sat Sep 05, 2009 3:14 am 
Offline

Joined: Tue Jul 07, 2009 4:05 am
Posts: 4
I wonder what was involved in the game "test drive", or "flight simulator" for the gauges. I agree with you RaveGuru, about sprites being less than an ideal solution for an analog gauge.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group