Making games in C. graphics.library?
To my own shame I'm very new to the Amiga :crying, so please forgive me if this maybe has an obvious answer.
I've seen from Compute's "Mapping the Amiga" and Sybex's "Amiga Programmer's Handbook" that the graphics.library provides functions for sprites, bobs, vsprites, etc. Is this the way to go for making games in C for the Amiga? Or are there other more recommendable options? SDL for example comes to my mind. Thanks a lot in advance. |
If you goto aminet.net and download RKMCompanion.lha on fredfish disk 344 for Kickstart 1.3 machines and Fredfish disks 741, 742 for kickstart 2+. They have C code for using the primitives functions (Sprites).
What Amiga are you programming for? |
C is okay (get a good cross compiler like gcc or vbcc).
But don't try to create games with SDL. It will be slow as hell even on a 68060 because of damn c2p conversion. Use graphics library routines or direct hardware banging instead. I'm currently creating a C++ game using SDL interface but amiga hardware underneath (porting a SDL game I made 9 years ago). That could be a good compromise (the game isn't working yet but it's taking shape) |
Quote:
Mine is is the original Amiga hardware but I don't have the inclination to code everything in assembly, so I code against the hardware in C, replacing only the bits that matter with hand written assembly routines. In my opinion the operating system friendly side of Amiga game programming was never developed as much as it could be - there were excellent games and excellent applications, but they rarely met. |
I coded many games in C using the graphics library Sprites and BOBs. Almost all my Amiga games are running from Workbench and multitasking. With screenmode requester at the beginning, so even graphics cards users can play them. Most games on Amiga closed the Workbench and took complete control over the system for fluent animations and gameplay. If you have task in the background it is very hard to achieve smooth movements and gameplay. Any process can slow down the system and it gets noticeable. For example floppy insert/remove, hard disk loading, even screen savers and Internet. For machines with 68000 CPU having Workbench in the background means almost always slowdowns.
|
Thanks everybody for the great answers. Awesome forum!
I have an A1200 with 4MB Fast RAM. Right now I'm programming with SAS/C. It's a bit slow compiling, so probably I'll have to move to a cross-compiler as suggested by jotd. Only trouble is the room where I have the Amiga is kind of a retro room. No modern computers. I even listen music with a Technics tape deck :-D I have good experience with assembler in 8-bits (Z80 and 6510), so probably I'll end doing as deimos mentioned and having some pieces in ASM (once I learn a bit of M68k). I've downloaded the RKMCompanion that redblade mentioned. I already had the PDFs, so it will be a great companion indeed. Great tip, drHirudo. I'll check how to do it once I get further, if I see my game slowing down. |
Quote:
|
Quote:
Quote:
I have found that some RKMCompanion examples are not very good, they run slow on my A500 and with flickering graphics. There are some examples more optimized, look on aminet, or github, there are some interesting examples: http://aminet.net/package/dev/src/ScrollingTrick https://github.com/astrofra/amiga-experiments https://github.com/alpine9000/EWGM This reading about graphics.library is also interesting: https://wiki.amigaos.net/wiki/Classi...ffered_Display |
Quote:
|
check this site also
http://www.pjhutchison.org/tutorial/amiga_c.html |
|
|
Quote:
I don't remember if it runs at 50 fps, anyway ScrollingTrick uses hardware directly for blitting, so it might not be the best example using graphics.library. There really aren't many examples in C, at least using system functions. The RKM examples use the ScrollVPort, RethinkDisplay functions, which are not very fast. ScrollVPort makes my code 25% slower even if there are not changes on the viewport. |
@balrogsoft what is your youtube channel?
|
Quote:
My channel? I only have some old "Bit a bit" TV computer shows from spanish television. https://www.youtube.com/channel/UCYo...ayNoOcFNTyZ6aA |
Quote:
|
Quote:
|
All times are GMT +2. The time now is 03:49. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.