Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » [RetroHack] Start of competition

This thread is locked; no one can reply to it. rss feed Print
[RetroHack] Start of competition
Thomas Harte
Member #33
April 2000
avatar

Sorry for starting a new thread — I thought that as I want to make sure everyone who might be interested would notice this it was not a suitable candidate for adding into the bottom of the old thread where it would be only a post edit.

So: the RetroHack competition starts now, with the release of version 1.0 of the RetroHack simulation library.

The rules aren't exactly worded yet, but here is the general timbre:

Submissions are to be made by midnight, GMT, on Sunday 18th of November. They can either be posted to a thread that will be deliberately created on Allegro.cc or emailed directly to me.

Your project, once unarchived (i.e. in a state from which the source code could be built and then executed, including all data files in whatever format the executable will expect them), must occupy no more than 512 kB of disk space. The size of the source code of any libraries that the project uses other than the RetroHack library and any libraries that you would reasonably expect to be supplied with a compiler will be included in this size count.

The entries will be bundled together and released as a source bundle and as executables for both OS X and Windows. Judging will be performed by a popular vote. Categories and marking criteria will be created, the number of which will depend on the interest the competition attracts. They will seek to reward both artistic and technical achievements.

Fixes may be made to the RetroHack library over the course of the competition. In that case each new release of the library will be given a new version number. Entries may use any of the released versions of the library, but a reason must be given if they are found not work with the version of the library that is current at the end of the competition. It is not the entrants responsibility to ensure that they keep up to date with any mid-competition library updates.

Anyway, here it is: http://members.allegro.cc/ThomasHarte/RetroHack/LibRetroHack.zip.
The documentation is here and the AY datasheet is here.

Jakub Wasilewski
Member #3,653
June 2003
avatar

Great. I'm a little exhausted after work (which involves a lot of tedious trial-and-error lately - writing extensions for Thunderbird is a P.I.T.A.), so I'll probably only give the library a cursory look.

Oh, by the way, there is a typo on p16 of the docs - it should say RT_VSYNC, not AY_VSYNC.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

StevenVI
Member #562
July 2000
avatar

Exciting. The retro feeling of Tetrominoes was fun. I especially liked the Neo Geo-esque beginning. If I make a game I may have to copy that into mine.

I just fear that a month is too long for me to stay interested.

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

Thomas Fjellstrom
Member #476
June 2000
avatar

you don't have to spend the entire month on it. Its more than a 3 day project with all the optimizing you may need to do, but hey, its not a 30 day project :P

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

StevenVI
Member #562
July 2000
avatar

Yeah.... I was reading the Wikipedia page for CGA to get some motivation, and it dawned on me that I would have to make a game that was actually FUN to play, having no graphics to rely on in place of entertainment value.

I think that coming up with a fun idea would take me the most time. I'm currently thinking.

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

Onewing
Member #6,152
August 2005
avatar

Looks fun, but I've been in speedhack-mode (10-12 hour days) all of October for work (milestone due by the end of this month) and I just won't have it in me.

Good luck everyone!

------------
Solo-Games.org | My Tech Blog: The Digital Helm

X-G
Member #856
December 2000
avatar

Are there any other rules, regarding, say... disk usage by the program or anything else that might be difficult to arrange on a "genuine" system?

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

gnolam
Member #2,030
March 2002
avatar

I love the idea. :)
But I won't participate. Promises should be kept.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

HardTranceFan
Member #7,317
June 2006
avatar

Wohoo :D. I'm looking forward to this.

And as Harry Carey says, now to come up with a fun idea over the next few weeks...

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

MiquelFire
Member #3,110
January 2003
avatar

I might make something, but we'll see. I may not have the time.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

lambik
Member #899
January 2001
avatar

I suspect there is an error in the keyboard table: there are two RIGHT SHIFTs (line 9, bit 6 and line 7, bit 2) I think one of these should be RIGHT CTRL, most likely the 9,6 combo.
Also there isn't a built-in character set as far as I can see so these will have to be done with sprites, am I right? If so, is there a limit to the number of sprites?

Jeff Bernard
Member #6,698
December 2005
avatar

Alright, I got a good keyboard handler... now I just need to figure out how these graphics work to start making a game.

And yes, line 9 bit 6 is Right Control.

--
I thought I was wrong once, but I was mistaken.

Simon Parzer
Member #3,330
March 2003
avatar

I just compiled the example programs with Linux and I have to say that the sound stutters. It ran okay with the Windows examples, though.

HardTranceFan
Member #7,317
June 2006
avatar

A question about the music format - how do I create a .PSG chip tune, or where can they for found? I've been searching the 'net most of the morning, but with no success.

n/m. I read the previous thread and think I've got my query answered.

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

Thomas Harte
Member #33
April 2000
avatar

Quote:

Oh, by the way, there is a typo on p16 of the docs - it should say RT_VSYNC, not AY_VSYNC.

Quote:

suspect there is an error in the keyboard table:...

Both fixed!

Quote:

I just compiled the example programs with Linux and I have to say that the sound stutters.

Any chance of trying the new retrohack.c file attached to this post? It substantially increases the frequency of the get_audio_stream_buffer checks. If it fixes the problem I'll make it version 1.1 of the library.

Simon Parzer
Member #3,330
March 2003
avatar

Quote:

Any chance of trying the new retrohack.c file attached to this post? It substantially increases the frequency of the get_audio_stream_buffer checks. If it fixes the problem I'll make it version 1.1 of the library.

No change. It especially stutters as soon as the CPU usage goes up. Sometimes I just have to move the mouse or click somewhere and it stutters really bad.
"Stutter" is maybe not the correct word. It's more that the current sound buffer hangs for half a second so it repeats itself.

I increased BUFFER_SIZE to 4096 and now it's a lot better.

Thomas Harte
Member #33
April 2000
avatar

Quote:

I increased BUFFER_SIZE to 4096 and now it's a lot better.

I'm going to try and put together a version with a dynamic buffer size, to fix this problem without introducing undue latency on the other platforms. I hope you'll be able to help test it?

In the mean time, RetroHack now has a hastily constructed webpage: http://members.allegro.cc/ThomasHarte/RetroHack.

EDIT: further to the Linux sound issue, I'd be grateful if you give the attached version of retrohack.c a go. It attempts to automatically pick the buffer size at runtime. On my machine it usually goes for 512 or 1024, which is good because I can hear the sound breaking up if I manually force lower numbers.

Simon Parzer
Member #3,330
March 2003
avatar

Quote:

EDIT: further to the Linux sound issue, I'd be grateful if you give the attached version of retrohack.c a go. It attempts to automatically pick the buffer size at runtime. On my machine it usually goes for 512 or 1024, which is good because I can hear the sound breaking up if I manually force lower numbers.

Works fine initially, but as soon as I put high load on the CPU (moving windows around, running some CPU intensive programs), the output gets broken permanently, it skips a lot and continues to do so even after the CPU is idle again.

Now, about another issue: Fullscreen. My video card supports it (320x240), but my monitor/graphics adapter kinda doesn't. Image doesn't fill the screen and aspect ratio is wrong. It can handle 640x480 fullscreen, though.
Also, some effects (scanlines, blur) would be nice, so it really looks like from an old monitor. Some emulators do this. :-X

Thomas Harte
Member #33
April 2000
avatar

Oh, I see what I did! It can't cope with buffer sizes over 4096, yet tries to select them anyway, and if it ends up with one then it sticks with it forever.

So, hopefully both those two things fixed, try the attached?

EDIT:

Quote:

Now, about another issue: Fullscreen. My video card supports it (320x240), but my monitor/graphics adapter kinda doesn't.

The full screen logic is "try for 320x240, if Allegro can't set that then use 640x480". So really this is an Allegro/X-Windows issue. But I'll think about it.

Quote:

Also, some effects (scanlines, blur) would be nice, so it really looks like from an old monitor. Some emulators do this.

I've never been a big fan of those effects (see also: the way I've never implemented them in any of my emulators, you'll probably also need to see ElectrEm to see one of my emulators, but the Linux port is long broken so you probably can't anyway), but I'll look into it. If I implement anything it'll be a classic computer to TV thing like the chrominance being slightly out of sync with the luminance. Which isn't that hard to achieve with the way I have the palette set up...

EDIT2: Oh, baring in mind those comments I think now is a good time to further discuss the rules re: new library releases mid-competition. The burden is primarily on me to (a) fix bugs; and (b) not break backwards compatibility. The "a reason must be given if they are found not work with the version of the library that is current at the end of the competition" is present so that if I have made some sort of idiotic mistake that means the entire point of the competition can be avoided (as per an early version of the code, which credited you with extra cycles if you blitted stuff mirrored across the y-axis) and an entrant deliberately exploits that to gain an unfair advantage then there is a mechanism for removing that advantage.

Simon Parzer
Member #3,330
March 2003
avatar

Quote:

I've never been a big fan of those effects

As long as they aren't overdone they look nice, I think.
Look at these two screenshots from OpenMSX. Left one without enhanchements, Right one with standard settings. Looks even better in fullscreen.

http://www.allegro.cc/files/attachment/593525http://www.allegro.cc/files/attachment/593526

HardTranceFan
Member #7,317
June 2006
avatar

Thomas, is the colour palette set? If so, what are the colours? Or can we use Allegro to change it?

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

Jeff Bernard
Member #6,698
December 2005
avatar

He posted the palette in the other thread. There are 256 different colors:

{"name":"265c57e56dbd2a086b195d8a5a9786fa.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/8\/c8625b7b33034646cfde9848f83ed9e5.png","w":382,"h":328,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/8\/c8625b7b33034646cfde9848f83ed9e5"}265c57e56dbd2a086b195d8a5a9786fa.png

--
I thought I was wrong once, but I was mistaken.

HardTranceFan
Member #7,317
June 2006
avatar

Heh, I missed that one :). Cheers.

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

Jeff Bernard
Member #6,698
December 2005
avatar

Grrr... this palette is so limiting... I can't find any good reds to even recreate Mario.

593527

--
I thought I was wrong once, but I was mistaken.

Simon Parzer
Member #3,330
March 2003
avatar

Quote:

So, hopefully both those two things fixed, try the attached?

Ok, the sound works fine now. :)



Go to: