Author Topic: Aleph One  (Read 18999 times)

gewinkler

  • Guest
Aleph One
« on: March 24, 2010, 08:16:14 pm »
HI,

I would like to see "Aleph One" ported. A Doom like game engine for the Marathon trilogy.

SourceCode here:
http://source.bungie.org/index.php/Main_Page

It has a software render mode (despite the openGl). Would be great if the Dingoo could run this!

greetings
gewinkler

nigel

  • Guest
Re: Aleph One
« Reply #1 on: April 16, 2010, 02:14:15 pm »
+1

Would be awesome to play Marathon running on the Dingoo. Not to mention the enormous number of maps, campaigns and total conversions made for this game in the past.

I hope it's possible. These games were made for 640x480 screens. A1 should be able to scale to 320x240 with a built-in scaler though. I've searched a bit and it appears someone ported this to the Wiz. Unfortunately no source is included with that port.
« Last Edit: April 16, 2010, 02:17:46 pm by nigel »

kswildside

  • Guest
Re: Aleph One
« Reply #2 on: April 16, 2010, 03:16:17 pm »
Any contact information on who the dev was if contact him for the source code

martin_lovick

  • Guest
Re: Aleph One
« Reply #3 on: April 18, 2010, 07:27:43 pm »
as far as I know, the engine for marathon has been open sourced at http://sourceforge.net/projects/marathon and there already appears to be a linux port for SDL

Yongary

  • Guest
Re: Aleph One
« Reply #4 on: May 05, 2010, 11:40:17 pm »
I'd love to see this; my parents were Mac users back in the day and I played a lot of Marathon. Besides, it's pretty much the only classic FPS that hasn't been ported to Dingux  ;)

CongoZombie

  • * Former Staff
  • Posts: 47
Re: Aleph One
« Reply #5 on: May 26, 2010, 05:44:09 pm »
I tried to port Aleph One a while ago, but I couldn't seem to get the build options right, since by default it has a load of crap enabled that would require me to compile a load of extra libs in. I didn't like marathon enough to carry on trying. If someone can get the wiz build, I'll give it another go.

nigel

  • Guest
Re: Aleph One
« Reply #6 on: May 27, 2010, 07:16:13 pm »
Same here. There's some sample build scripts without LUA and OGL, but they're outdated.

I've contacted the developer (Pickle). He's willing to share the source, but since I don't know a single line of C I haven't asked for it. It would be unfair to let him go through the trouble of cleaning/packing it and not doing anything with it, wouldn't it? I have notified him of this thread though.

Just send a PM to Pickle on this board, he's still active and will likely reply quickly: http://www.gp32x.com/board/index.php?/topic/50923-alephone-marathon/


nigel

  • Guest
Re: Aleph One
« Reply #7 on: May 31, 2010, 06:23:03 pm »
Sorry to doublepost, completely missed a PM there (mail notification moved to spam).

Here's the source, uploaded by Pickle on the 18th of may already:
http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,46,402

nigel

  • Guest
Re: Aleph One
« Reply #8 on: October 16, 2010, 04:22:45 am »
No one? Pity. Hadn't visited for so long that I hoped to find something here.

Well, surprise :). Pickle's source only needed small modifications to compile for Dingux. So small that even I could do it.

Get AlephOne for the Dingoo here: http://www.mediafire.com/file/tfk6t5qvfqdm71t/alephone-dingoo-v0.7z
Get the hacked source here:  http://www.mediafire.com/file/e95owt3ti41o7cj/AlephOne-src-dingoo.7z
(yes I made it a bit into a mess)

Notes:
Quote
Release notes alephone-dingoo-v0 20101016:
------------------------------------------
- Based on Pickle's hard work, it basically compiled on Dingoo without trouble.
- Source changes: Needed an 'add #include <stdexcept>' in 'network_metaserver.h'
  and forced -march=mips32 to keep LUA happy. Also needs libboost in Dingux toolchain. -O3 flags
  halve the binary size and *triple* speed. Sometimes things work like they do in the movies...
- Commented out Pickle's Wiz key mapping (not needed on Dingoo, gp2x.h, screen.cpp and others).
  Found and changed menu keymapping from PC to Dingoo to eliminate the need for a mouse
  driver/workaround (shell.cpp).
- New menu dialog theme that's better readable (prefs, load, quit game, etc) and fits on the
  Dingoo's small screen (mostly). Looks like crap, but trust me, the original is worse when
  halved from 640x480 to 320x240. Remember: the whole game is still rendered at 640x480 and then
  scaled to fit the screen on your Dingoo.
- Shiny icons :). Made these 7 years ago @ 128x128. They finally have a use.
- A readme that's bigger than Pickle's while having done only a fraction of the work he did.

AlephOne runs fast enough on the Dingoo. I thought it would never do that until I added -O3 to the compiler flags. The game would run at 6-10fps without, but apparently bash shells work just like they do in hollywood movies. -O3 gives 30fps (max, cap) in corridors, with drops to 20 (but no sound stutter) when it gets crowded in the open, @ 400Mhz.
One big issue still remains, and that's that the terminals are still unreadable due to the 640x480 to 320x240 scaling. I do not know what to do about this; I doubt a simple font change is going to work there. The terminals are pretty much required for the story and in a lesser way for level directions (think system shock) so that's a real pity.

Since I can't code this 'project' is already abandoned and looking for a real coder. Feel free to pick it up. If you want, I can just zip up the whole cygwin dingux toolchain dir I have here with the source in it. Saves you some trouble setting up boost.
Yes, I have to thank SCiENcE for this great unpack & go cygwin toolchain :). Beats running some unix in a VM once you get the Windows shell window to behave a bit.

And of course, I know this could've gone into "Releases" as well, but I'm not sure if it's good enough to count as one. I only tested it on SCiENcE's kernel, normal non-pawed A320 with localpack 0.35 and it might prove to be buggy or simply not working. And I know I can't do much more than this on top of that, so see it as some kind of proof-of-concept for now. I'll leave it up to you wether to call this a real release or not.

dingooboy

  • Guest
Re: Aleph One
« Reply #9 on: October 16, 2010, 07:24:52 am »
could you please post the exact steps to run this game? I tried to run it after downloading the game from the link in the readme but it just returns back to gmenu.

pcercuei

  • Posts: 1676
    • My devblog
Re: Aleph One
« Reply #10 on: October 16, 2010, 07:45:13 am »
Compile with:
-mips32 -O3 -fstrength-reduce -fthread-jumps -fexpensive-optimizations -fomit-frame-pointer -frename-registers -pipe -G 0 -ffast-math -msoft-float

if you want to optimize even more ;)

Also, I can provide you a faster scaler than Pickle's one. It should bring some more fps.

Regarding libboost: Could you please integrate it on the package? Just put the .so along with the binary, add the line
Code: [Select]
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
to your .dge scripts.

Finally, your binary is not stripped. Which means that there still are some things on the binary that can be removed. Just do
Code: [Select]
mipsel-linux-uclibc-objcopy -S alephone
on a command line to strip the binary. The size will decrease from 6MB to 5MB.
« Last Edit: October 16, 2010, 09:19:23 am by Ayla »

zear

  • * Moderator
  • Posts: 2381
Re: Aleph One
« Reply #11 on: October 16, 2010, 09:13:37 am »

If you want, I can just zip up the whole cygwin dingux toolchain dir I have here with the source in it. Saves you some trouble setting up boost.
Yeah, would be nice if you could share your boost libs, or just link the binary statically against it (Don't link statically due to OpenDingux migration to ALSA).
I'm not going to compile libboost just to play this game, as from my experience libboost is a bitch to port.
« Last Edit: October 16, 2010, 09:22:06 am by zear »

Coccijoe

  • Posts: 366
    • Underground Portables
Re: Aleph One
« Reply #12 on: October 16, 2010, 12:01:29 pm »
could you please post the exact steps to run this game? I tried to run it after downloading the game from the link in the readme but it just returns back to gmenu.
you have to install file from originals game to make it run.(put it on data folder)


it his very playable, thanks

I don't understand how to use new maps, if somebody can explain me?

nigel

  • Guest
Re: Aleph One
« Reply #13 on: October 16, 2010, 12:16:38 pm »
I'll try to make a new binary with your tips. Thanks guys! As for boost, I didn't make a .so file either, runs on a completely stock Dingux/rootfs/localpack. boost is only used in LUA as far as I can tell, not sure if the official datafiles use that. Perhaps it's compiled in already, the Mac OS X and Windows binaries of that game don't have it as a dll, dylib or .so either. I'll try to check that.

As for the detailed steps to get it to run:
1: Copy the whole dir to the dingoo, I put mine in local/ports/alephone
2. Download one or more scenarios from http://source.bungie.org/index.php?title=Get_Marathon and unzip.
3. Put resulting directory in alephone/data, so you end up with alephone/data/Marathon 2 for example
4. Add the .dge file that matches the scenario you put in data to gmenu2 or launch it. The .dge files are just .sh script that point AlephOne to the data so you don't have to have 3 AlephOnes for all the Marathon games. You can add new ones to play RED and custom scenarios.

I've tested Marathon 2 thoroughly on my Dingoo, only test-ran the other scenarios.

Anyway, I'll try to make a new binary. I'll format the card on mine to test cleanly again too, though I doubt those testbuilds left a needed config somewhere or so that this one requires but you'll never know. Once that all works, faster scaling would be quite awesome, but I'll try to get this done first, otherwise I'll go insane with all the new stuff. This is definitely something else than php/bash scripting ;).

EDIT: Woo, someone else got it to work! That's at least something.

dingooboy

  • Guest
Re: Aleph One
« Reply #14 on: October 17, 2010, 09:50:00 am »
Thanks for the full steps. Its working great now  ;D. Just a question, how do i save the game?

nigel

  • Guest
Re: Aleph One
« Reply #15 on: October 17, 2010, 12:53:27 pm »
You can only save the game at a 'pattern buffer', which is a special terminal.

http://marathon.bungie.org/story/terms/m2/M2.01.1.1.2.gif <-- the bottom image in that shows a pattern buffer for Marathon 2. Each level has several of these. They look different in each world, but they all bring up the save dialog. To save on the dingoo, press 'start' when having the dialog open.

When loading a game, alephone gives you the option to load it as single or multiplayer. Needless to say you should just press 'start' to choose the default singleplayer option.


On another note, I've tried a lot on the source stuff. The extra optimization flags didn't increase nor decrease speed, just grew the binary by 12KB. I've managed to rip out LUA by removing the calls from 30+ files and adapting the makefile. This saves 2 MB on the binary making it only 3MB in total (3,6 without the strip command), but again, no speed change so I'm just going to leave it in.

However, I've also found the place where the terminals/story are outputted to screen! I've duplicated pickle's scaler function and made a dummy function that just creates a new SDL_Surface instead of scaling the old one to the new one, resulting in a nice black screen only when 'using terminals', screen immediately returns to normal when exiting them. This is excellent, since it means you can insert heavier, bilinear screen scaling code there and actually make readable terminals!

I've googled the internet but to no avail, and I really have no C++ knowledge so I can't code this up myself, but I do know exactly where to insert it if anyone knows how to do this. Once I'm back on the machine that has the source I'll give the line number.

I've also removed the 'joystick 0 not found' startup error, this was a bit of gp2x only code thaI missed.

dingooboy

  • Guest
Re: Aleph One
« Reply #16 on: October 17, 2010, 02:02:40 pm »
thanks, i can save the game now. But the save option appeared only when i pressed the "x" button at the save point so we need to press "x" at those points to save the game. Really a nice game, just the texts are too little to read.

campusten

  • Guest
Re: Aleph One
« Reply #17 on: October 20, 2010, 05:48:51 pm »
Yeah, it looks great and is almost perfect.  If the text issue is cleared up, it'd be perfectly playable.

nigel

  • Guest
Re: Aleph One
« Reply #18 on: October 23, 2010, 07:26:17 pm »
Release notes alephone-dingoo-v1 20101023:
------------------------------------------
- New box scaler. Menu and HUD are looking much nicer now, terminals are (barely) readable. It is 25% slower.
- Used tips of the other Dingoo devs to thin out the binary. Build is now fully optimized as well.
- Removed some leftover GP2X code.
- Cleaned up some more unnecessary data files.

Get it here:
http://www.mediafire.com/?o41lpfg8u436650



For kicks, go to preferences -> graphics -> rendering options and change 'detail' to 'high'. This will enable full 640x480 rendering which, together with the box-downscaling produces a very nice FSAA effect comparable to 4x multisampling. Framerate will drop to 'barely playable' (10-15 range) but it's quite cool to see.

I think it is polished enough now for a release. Shall I post it in the 'releases' forum?



----------

Never expected I'd get into the whole C++ thing. I've managed to pick up a few things here and there to get some basic C knowledge. Thanks to some great examples found online I've managed to replace the old scaler with a much nicer box scaler. Fast too, fast enough that I've applied it to the entire game. The small slowdown doesn't weight up against having a nice, readable HUD.

The source is still a bit of a mess (think 20 commented out 'scaler' functions stuck somewhere where they really do not belong), so I've not included it just yet. I also still need to credit whatever online resources I learnt/took from.
If you want the scaler code that's active now, however, just ask and I'll post it here. As it is now it only works for SDL_Surfaces @ 640x480x16bit, but it can be adapted to work on other bit depths or graphic objects as well since it's accessing the raw pixel data directly anyway.
http://www.compuphase.com/graphic/scale.htm <-- that's the method which is used (Scale 1/2?, box filtered). I've just made a few adaptions and changed the bitwise AND mask.

clach04

  • Posts: 256
Re: Aleph One
« Reply #19 on: October 23, 2010, 09:04:26 pm »
If you want the scaler code that's active now, however, just ask and I'll post it here. As it is now it only works for SDL_Surfaces @ 640x480x16bit, but it can be adapted to work on other bit depths or graphic objects as well since it's accessing the raw pixel data directly anyway.
http://www.compuphase.com/graphic/scale.htm <-- that's the method which is used (Scale 1/2?, box filtered). I've just made a few adaptions and changed the bitwise AND mask.

Harteex was thinking about adding 640x480x16bit http://boards.dingoonity.org/dingoo-development/native-now-has-sdl/ into the SDL lib (for native). If you already have most of the code that sounds like a great contribution for both the native and dingux SDL implementation.


 

Post a new topic
Post a new topic