PDA

View Full Version : Prometheus - A first working demo



code_glitch
04-10-2010, 06:01 PM
Just whipped this up with prometheus 0.1.x libs in around an hour to try it out for myself. Paul, i'm sorry about using your sprites from the probe (tm i think) but I just had a random idea and this option required the least amount of work. (30sec on pdn based on the banner)... It's named probewars after the graphics used.

I have uploaded as zipped attachments (its small). Of course, if you feel this is infringing your rights, do tell and I will remove the files and replace them...

The story line is you press space to fire, and you have to remove all anti-matter evil probes (white).
Arrow keys to move. The source is very sloppy, but I just wanted to do a quick demo that I may refine and release with the 1.0.0 prometheus lib later this week.

cheers,
code_glitch.

Ps. in the source folder there is the source for probewars and both core and vid units of prometheus. feel free to edit whatever little there is there.

Andru
04-10-2010, 07:34 PM
It works(on Phenom X4 960@4Ghz, Radeon HD 5850), but this is not so unexpected with using SDL :)

paul_nicholls
04-10-2010, 07:46 PM
Hi code_glitch,
I don't mind you using the graphics as you are only using one sprite from the game...just don't use any more so it looks more like The Probe :)

PS. it runs on my Vista Home Premium system (32-bit):

AMD Sempron(tm) SI-42 2.10 GHz
2GB Ram

cheers,
Paul

de_jean_7777
04-10-2010, 08:25 PM
Works on a Windows XP Pro SP3, Pentium Dual Core E2200, Intel 82945G (i945G).

Stoney
04-10-2010, 08:53 PM
I got it working on my MacBook Pro (Core 2 Duo 2.53 GHz, NVidia GeForce 9400) on Mac OS X with a small change: I needed to change the directory separator when loading images from \ to / .

code_glitch
04-10-2010, 09:23 PM
cheers to everyone for trying this out. As for mac/linux (yes i know osme use *nix and whatever, please don't chew me out) users, I forgot to mention that the \ in the paths is only for windows. You will need to change them to a /
Also, I apologise for the rubbish graphics, it was a 10minute botch job on paint.net...
Furthermore, since you have the library and source, feel free to edit code and resources. Its only a trial, I will make a different final so if there is code there you want for your own work, feel free to call it your own as its simple (as long as you don't take it all and call it your own.) As for the resources, ask paul nicholls since he has the rights to them as part of the probe.

cheers,
code_glitch

ps. working on ttf at the moment. Will post as update to this with score a little later with upgraded graphics also. Maybe we have a game in the making here?? ^^ ProbeWars... Blow up the people with inverted colour values that move around in the most random manner I could think of on 10sec notice. (see the code, its VERY rudimentary, but hey, it worked first time with no bugs...)

sorry bout the long post.

EDIT:
WOW! Just noticed, that the actual PWars game is under 250 lines (just 245) with breaks and all. Which compared to my previous programs (even of this little complexity) is excellent... Don't know about you guys but I might just make a third PRO version of Prometheus for those of us who are just too lazy to faff about with sdl and opengl... Or want measly programs.

paul_nicholls
04-10-2010, 09:27 PM
ProbeWars... Blow up the people with inverted colour values that move around in the most random manner I could think of on 10sec notice

LOL! very funny description :)

It's funny, but I only just noticed your signature - that was funny too :)

cheers,
Paul

code_glitch
04-10-2010, 09:39 PM
Lol. cheers. The signature, that was slightly intentional. The above line was dead serious though, I have a deficiency: it called un-imaginativeness and its a real problem for me. Thus I use things that exit to help me make things that don't...

I really should go to sleep now, because I doubt this is making much sense any more. And I have to get up at 5AM tomorrow to finish a project and revise for a GCSE controlled assessment... If I had the source to the world, I think I might change that procedure a bit.

Anyway
cheers,
code_glitch.

paul_nicholls
04-10-2010, 09:41 PM
No worries :)

Go get some sleep :)

cheers,
Paul

WILL
05-10-2010, 12:55 PM
So does Prometheus support Mac too? :)

code_glitch
05-10-2010, 02:25 PM
So does Prometheus support Mac too? :)

Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

cheers,
code_glitch

dazappa
05-10-2010, 06:42 PM
Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

cheers,
code_glitch
I would suggest just changing all "\" to "/" then. Windows doesn't care what type of slashes you use; you can even have a path like this: c:\myJuNk/currentprojects\coolstuff/unfinished_game

de_jean_7777
05-10-2010, 07:08 PM
Or you could use the DirectorySeparator constant.
e.g.


LoadImage('resources'+DirectorySeparator+'visual'+ DirectorySeparator+'Ring.png');Sure, the constants identifier is a bit long, but it makes paths portable accross any platform.

code_glitch
05-10-2010, 08:22 PM
Now that you mention it, I believe that dazappa made a very valid point that would work across OSes by default... Time for an updated version 1.0 perhaps?

WILL
06-10-2010, 12:41 PM
Or you could use the DirectorySeparator constant.
e.g.


LoadImage('resources'+DirectorySeparator+'visual'+ DirectorySeparator+'Ring.png');Sure, the constants identifier is a bit long, but it makes paths portable accross any platform.
this can sort of be compensated by just making your own local variable...

var
dslash : String = DirectorySeparator;

I'm sure you can't assign values from variables inside a const statement. And if this form of assignment doesn't work, which I think I remember it can, only if it's a global variable not a local variable inside a function of procedure.

de_jean_7777
06-10-2010, 01:37 PM
var
dslash : String = DirectorySeparator;I'm sure you can't assign values from variables inside a const statement.
You cannot, but this works as DirectorySeparator is an untyped constant. dsslash should also be kept an untyped constant, as it never changes throughout the program.

jdarling
06-10-2010, 04:11 PM
Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

cheers,
code_glitch

Actually, FPC/Lazarus takes care of proper slash direction for you. In all my projects I use / and let the compiler handle the rest. I found this out on accident when I was working on JumpStart and wanted it to work in MAC, Linux, and Windows.

- Jeremy