This site is no longer active and is available for archival purposes only. Registration and login is disabled.

'Mario' source code


'Mario' source code

Postby Dave Johnston » Jun 21, 2003 @ 10:18am

By request, I've uploaded the very messy source code to my 'Mario' game to:
http://www.omnytex.com/pf/fileexchange/fileexchange.asp

I have to admit I just zipped up the files and am crossing my fingers, hoping it'll all work! 8O

Here is the included readme.txt file:

'Mario' source code
"""""""""""""""""""

*** REQUIRES POCKETFROGPLUS ***

This is the source code to a 'Mario'-style game that I wrote in late 2002. It features platforms, animated sprites, parallax scrolling background and sound to name a few things, along with some basic collision detection. Look in the code hard enough and you'll find it can also handle sloping platforms! (well, just)

The source isn't well documented, and isn't particularly nice either. Those with Half-Life coding experience will notice the inspiration of naming (BaseEntity, BasePlatform etc...) and interfaces/methods. I adopted it for this since, well, I like it :)

Speaking of uhh, 'inspiration' - some code has been directly 'inspired' (read: copied). There are a couple of SetThink SetTouch lines which come straight from Half-Life, and there is also a 'trace' method for spotting intersections which came from some webpage I forgot to note down. Credit to whoever it was...

Other things to note:
- the game is mostly all done floating-point, but still gets half-decent FPS!
- there is some fixed-point code, but it isn't used (as far as I remember) - nor is it very tested
- the mario sprite is (C) Nintendo
- code is messy and largely uncommented
- all other graphics are original
- lots of things may be broken or not work... remember this is an alpha that I abandoned due to lack of time

That is all for now! I hope someone makes some use of this mess of pointers and classes...

- Dave Johnston
- dave at johnsto d0t co d0t uk
- http://www.johnsto.co.uk/pocketpc/
User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Datalore » Jun 21, 2003 @ 8:11pm

Thanks for releasing the source Dave. Do I have your permission to upload the binary on file-exchange so people can test it out without compiling? It took me about a half-hour to compile, as I've never used PocketFrog or WCE3.0 or anything. Your original readme will be included. The binary I would be uploading is just a straight compile of your source, with only a few minor modifications made to make it compile.

Modifications made:
In game.rc it pointed to image7.bin and image8.bin. Those files didn't exist, so I just guessed as to what they should be.
<<One of them points to the clouds and if it isn't the right bitmap, the whole game is screwed up. The other one points to the sky bitmap, which I cannot find, but does not affect gameplay. (Theres only a pink sky)>>

I get 19-21 FPS on my Axim X5 400.

P.S.- What was with the Phootball thing? :D
Last edited by Datalore on Jun 21, 2003 @ 9:16pm, edited 2 times in total.
User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Dave Johnston » Jun 21, 2003 @ 8:51pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Dave Johnston » Jun 21, 2003 @ 9:57pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Datalore » Jun 22, 2003 @ 12:14am

I have no idea how to turn on these optimizations you speak of. Here's an unoptimized version that I was able to keep pretty small by cutting out unused images. So far this Mario game looks pretty cool.
It had an identity crisis though, as it looks like it could have been either Phat Soccer, Phat Football, or Sonic the Hedgehog instead.

I fixed the pink screen issue. I don't know if I'm getting 20 FPS because of some Dell Axim issue or because I don't have a clue on how to optimize. Can somebody with an Ipaq/other PDA test this? Just report your FPS. Thanks.

File is at
User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Dave Johnston » Jun 22, 2003 @ 12:17am

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Dave Johnston » Jun 22, 2003 @ 12:18am

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Datalore » Jun 22, 2003 @ 12:21am

User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Thomas » Jun 22, 2003 @ 1:31am

Thomas
pm Member
 
Posts: 28
Joined: Mar 12, 2003 @ 1:30pm
Location: Australia


Postby Datalore » Jun 22, 2003 @ 2:07am

User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Thomas » Jun 22, 2003 @ 2:26am

Thomas
pm Member
 
Posts: 28
Joined: Mar 12, 2003 @ 1:30pm
Location: Australia


Postby Dave Johnston » Jun 22, 2003 @ 1:06pm

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Postby Datalore » Jun 22, 2003 @ 4:54pm

User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Datalore » Jun 22, 2003 @ 10:55pm

I'm going nuts. First of all, I can't figure out how to redefine the levels. Second, I don't know how to simply put an object on the field. I'm getting this:
Image
Any ideas, Dave?
User avatar
Datalore
pm Member
 
Posts: 158
Joined: May 11, 2003 @ 1:58am


Postby Dave Johnston » Jun 23, 2003 @ 7:45am

User avatar
Dave Johnston
pm Insider
 
Posts: 356
Joined: Mar 31, 2002 @ 6:14pm
Location: UK


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

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