Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Work In Progress / FPSC Mod... Save & Load levels and other useful stuff

Author
Message
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 04:52 Edited at: 27th Aug 2006 05:14
UPDATE 26/08/2006
Download here


original thread: http://forum.thegamecreators.com/?m=forum_view&t=87442&b=21

I decided to make it public beta. There are no help files except for a readme.txt, so you gotta play with it a lot, or ask here.

Most of you will be interested in the Save & Load Level stuff, which is basically what some people keep calling a Save/Load Game feature, although, technically it is not (neither this one, nor the third party applications)
Although you can save the level anywhere in the script, a loaded level will always start at the PlayerStart marker, and all enemies are alive as if nothing has happened. The difference to third party applications is, that the weapons you collected in previous levels are still there (if you want them to).

Readme.txt:



EDIT: one thing you might find useful is an undocumented action:

DEBUGVAR

this pops up a message box and displays the values of the four global variables.


HOW TO INSTALL:
Rename the orignal FPSC-Game.exe in your FPSC folder to something else (eg: FPSC-Game_original.exe). Copy this FPSC-Game.exe in your FPSC folder. Done.

In case you get an "array index out of bounds" error or something similar:
- Go to this folder:FPS CreatorFileslanguagebankenglishtextfiles
- Open the file fpsc-050.ini
- Change the value to 650 or higher
- Save fpsc-050.ini


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 04:53
the obligatory screenshot

two ss-officers shooting each other.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
George 7004
18
Years of Service
User Offline
Joined: 24th Feb 2006
Location: California
Posted: 25th Aug 2006 06:09 Edited at: 25th Aug 2006 06:10
Wow!! IVE BEEN WAITING FOR THIS!!! nice work man....


Now my Operation:Eagle Strike battlefield level will work! HEHEHEHE

http://www.mmorpg-net.org

Your Source for Awesome MMORPG/MMOFPS Games
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 25th Aug 2006 08:01
Thanks for the uber modification.
Call me an idiot but could you explain exactly how to implement the save/load level function?
Does it work when you press a certain key or is there a save game banner you click on when you pause the game?
If it keeps track of weapons and ammo does it also keep track of items (like keys) that you have picked up in previous levels?
Do you need to set this up as a script for a trigger zone?
Any help would be appreciated.
A suggestion that I have is that as long as you are modifying the source code if there is a way you could make more keys accessible to the designer to keymap to that would be cool.

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 13:40 Edited at: 25th Aug 2006 13:46
Quote: "Call me an idiot but could you explain exactly how to implement the save/load level function?
Does it work when you press a certain key or is there a save game banner you click on when you pause the game?"

It's a script action, so you could do it either way. For example in your level fpi:
:keypressed=24:storelevel=savegame.sav
24 is the scancode for the key "O" so whenever the player presses that key it'll be saved. But you could also do it in your game menu, or in a zone, or automatically at the beginning of the level.

Quote: "If it keeps track of weapons and ammo does it also keep track of items (like keys) that you have picked up in previous levels?"

I haven't tried it. It stores everything that the FPSC stores between levels. So if the original FPSC allows you to carry items across levels...


Quote: "A suggestion that I have is that as long as you are modifying the source code if there is a way you could make more keys accessible to the designer to keymap to that would be cool."

Could you elaborate on that?


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 25th Aug 2006 14:12
Thanks for the info.
What I meant about thekeys is this...
FPSC has only so many keys that can be keymapped...
up,down,left,right,strafe left,strafe right,jump,duck/crouch,reload,use,fire and the number keys to switch between weapons.
It owuld be uselful if you could keymap other keys like four other keys you could assign to vhicle control,a key to access your inventory if you modified your game to have one,a key to use health,a key for a jet pack,etc.
If you could use more keys on the keyboard you can do more with your game.

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 14:21
Oh, I see.
You could do it with scripts with the new "KEYPRESSED=X" condition.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 25th Aug 2006 14:50 Edited at: 25th Aug 2006 14:58
@empty

Can you post a list with all the scancodes for the keys so we know what to write? And i also want to ask if settargetname=x is the name of the model or the IFUSED name.

My site is now updated with info and a teaser about my game The Peacemakers. My blog is now ready and i have written my first contribution!

Check it out now!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 15:00
a Scancode map...


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
Samuli
18
Years of Service
User Offline
Joined: 12th Feb 2006
Location: Finnland
Posted: 25th Aug 2006 15:17
Cool! Atlast we can make long games! Downloaded and testing.
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 25th Aug 2006 15:20
Ive posted in the other thread asking about the save and load.
Samuli
18
Years of Service
User Offline
Joined: 12th Feb 2006
Location: Finnland
Posted: 25th Aug 2006 19:00
When I'm trybg to test, FPSC crashes and saies that I need Direct X 9.0c. Wierd thing is that it saies that I don't have it even I have.
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 25th Aug 2006 20:42
*Ahum*

Quote: "And i also want to ask if settargetname=x is the name of the model or the IFUSED name."


My site is now updated with info and a teaser about my game The Peacemakers. My blog is now ready and i have written my first contribution!

Check it out now!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 21:05
@Samuli
Quote: "When I'm trybg to test, FPSC crashes and saies that I need Direct X 9.0c. Wierd thing is that it saies that I don't have it even I have."

It's compiled with DBpro 6.2 so make sure you use the latest release of DirectX 9.0c (April 2006)


@brummel
Sorry, it's the entity name.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
Samuli
18
Years of Service
User Offline
Joined: 12th Feb 2006
Location: Finnland
Posted: 25th Aug 2006 21:34
I'm sure that I have Direct X 9.0C: World of Warcraft reques it and it works fine.
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 25th Aug 2006 21:39 Edited at: 25th Aug 2006 21:39
Okay, but how does the ally/enemy react if there are two enemies with the same name? Will it choose one of them randomly?

My site is now updated with info and a teaser about my game The Peacemakers. My blog is now ready and i have written my first contribution!

Check it out now!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 25th Aug 2006 21:52
Quote: "I'm sure that I have Direct X 9.0C: World of Warcraft reques it and it works fine."

Yes, but there are several releases of DX 9.0c. The latest one was released April 2006


Quote: "Okay, but how does the ally/enemy react if there are two enemies with the same name? Will it choose one of them randomly?"

It'll choose the first one it comes across (which is most likely the one placed first on the map).


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 25th Aug 2006 22:19
Ah, excellent.

My site is now updated with info and a teaser about my game The Peacemakers. My blog is now ready and i have written my first contribution!

Check it out now!
Johny English
17
Years of Service
User Offline
Joined: 16th Jul 2006
Location: Czech Republic
Posted: 25th Aug 2006 23:35
I dont understandt how use this script.
I make How to install, but what is readme how I use the scripts?

SIXOFT - This is not just a game, this is a SIXOFT game.
Lizblizz
18
Years of Service
User Offline
Joined: 13th Dec 2005
Location:
Posted: 26th Aug 2006 00:08
Sorry im a little confused so is this a save/load feature or allie feature?

s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 26th Aug 2006 00:12 Edited at: 26th Aug 2006 00:13
Been testing out the new game.exe and good work on that but there is a slight problem.

when doing test rooms things are ok so i thought i try it on my game and the fps has gone down to like 9fps.

Changed to normal game.exe and the fps is back up to 30fps.



Screenshot :

Attachments

Login to view attachments
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 26th Aug 2006 00:14 Edited at: 26th Aug 2006 00:18
New version uploaded (use link in first post).
New Readme.txt:




Quote: "I dont understandt how use this script.
I make How to install, but what is readme how I use the scripts?"

It enhances the scipting language of the FPSC with the conditions and actions described in the readme.


Quote: "Sorry im a little confused so is this a save/load feature or allie feature?"

Neither and both . The script enhancements allow you to save and load levels, as well as to set a certain target to an entity (that's not enough for a fully fletched ally system, though).


Quote: "Been testing out the new game.exe and good work on that but there is a slight problem.
when doing test rooms things are ok so i thought i try it on my game and the fps has gone down to like 9fps.
Changed to normal game.exe and the fps is back up to 30fps."

That's odd. But it's entirely possible that an unmodified compilation with DBPro 6.2 results in the same behaviour. Cause unless you use the new script conditions or actions, there shouldn't be any difference.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 26th Aug 2006 04:29 Edited at: 26th Aug 2006 14:37
Another version.

This one should resolve the FPS drop (seems to be the ODE plugin, the original game.exe uses a different one).


And a step by step guide of how to implement save/load:
1) Build your game

2) Create a image "contgame.tga" that says "Continue Game" or something like that, similar in style to the "New Game" and "Exit Game" that are shown in the game's start menu

3) Copy that image to the folder [yourgame]/Files/languagebank/english/gamecore/backdrops/basic

4) Go to the folder [yourgame]/Files/languagebank/english/gamebank/[yourgame]

5) open the file "titlepage.fpi" with a text editor. By default it'll look like this:

This file defines how the title menu looks like. Right after the line:
:state=0:hudreset,hudx=50,hudy=10,hudimage=languagebankenglishgamecorebackdropsbasicgamemenu.tga,hudmake=display
we add this line:
:state=0,fileexist=level.sav:hudreset,hudx=50,hudy=40,hudimage=languagebankenglishgamecorebackdropsbasiccontgame.tga,hudtype=2,hudmake=button
this checks if a level.sav file exists and if so adds a menu button (continue game).
Now change the line:
:state=2,hudselectionmade=2:loadgame,destroy
to:
:state=2,hudselectionmade=2:loadlevel=level.sav,destroy
So when the user clicks our new button the level will be loaded.
The complete file should look like this

Save this file

6) in the same folder open the file setuplevel.fpi. It'll look like this:

This script is responsible for the global level settings. Now if the level starts and is higher than 1 we want our game to save the level, so that the player can start from this level.
After the line
; Setup Level Stats
we insert
:state=0:setvar1=level
:state=0,var1greater=1:storelevel=level.sav
sow we have

Save this file.


Now (provided you use this mod) the player can always start from the last level he/she entered before he/she died or quit.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 26th Aug 2006 04:47 Edited at: 26th Aug 2006 22:27
exelent!

its awsome someone finally did this. the FPSC source was a mess, and i couldent sort thru it, for that i applaud you!

i have a feature request though,

could you make a wireframe on option? it would help a lot with segment speed debugging.

thanks.


http://www.seqoiagames.com/seqoiacorp/
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 26th Aug 2006 04:55
Isn't that already possible while testing the level (either "[" or "]")?


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 26th Aug 2006 05:02
empty, how well do the allies work? do they actually do damage to other character? Do they follow the player or just attack other enemies.
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 26th Aug 2006 05:11
Quote: "empty, how well do the allies work? do they actually do damage to other character?"

Yes.

Quote: "Do they follow the player or just attack other enemies."

There's a new script action "SETTARGETNAME" which sets a new target by its name. You can make them follow or player or let them attack another enemy if you give them its name. Like I said it's far from a fully fletched ally system.
The whole engine is heavily based on the player and player actions. While it is possible to modify the source code so that you have ally/enemy groups, it'd take a lot of time (that I don't have ).


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
jconxtc
17
Years of Service
User Offline
Joined: 17th Jul 2006
Location: ur mom
Posted: 26th Aug 2006 05:12
honestly man, you my hero, thank you for your great contabution

Carrara 5 pro and Hexagon, the 3dsmax killers.
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 26th Aug 2006 09:18
Quote: "Isn't that already possible while testing the level (either "[" or "]")? "


yes but an AI script action for this would be exelent, because you could use it outside of test game.


http://www.seqoiagames.com/seqoiacorp/
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 26th Aug 2006 15:41 Edited at: 26th Aug 2006 15:47
Ok, new version (with a set wireframe action) uploaded. It has a little more detailed documentation as pdf file.


This will be the last update for a while. Now let's wait and see what the soon to be released official FPSC update will offer.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
SilverMasters
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location: india
Posted: 26th Aug 2006 17:32
tel me dis , dat the above post dat empry gave is a save/ load script ? if it is den where is the allies script? by the way we can say u made a patch for fpsc..! thankx
SilverMasters
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location: india
Posted: 26th Aug 2006 17:57
can anyone make a zip file and where properly saying which files have to put where? and what happens if we do it? we can save ? but hjow to put all these files and what happens next? send a screenshot where there is a option called save game . we need a video toutorils..! plz thankx
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 26th Aug 2006 21:52
Yeah, it would be better for the code to check if you have entered a check point, then to save the player location from there.
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 26th Aug 2006 22:04
thanks empty,

the wireframe option works like a charm. I havent tried the ret of the commands, but i will be doing that shortly.


http://www.seqoiagames.com/seqoiacorp/
s4real
VIP Member
17
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 26th Aug 2006 23:00
Yeah i agree with Tyler Gs is there any chance of putting up some scripts so we can see it working.

Your update has sorted out the slow down good work.

Many thanx
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 26th Aug 2006 23:33
woah!!!!!

its like, my finger magically stickied this....


http://www.seqoiagames.com/seqoiacorp/
bdgbdg
17
Years of Service
User Offline
Joined: 30th Jul 2006
Location:
Posted: 27th Aug 2006 00:38
Great work!!!

Project FPS - started development.
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 27th Aug 2006 01:24
Empty,
I love you, not in a gay way
Are we allowed to sell games made with this update???

Tom

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 01:32 Edited at: 27th Aug 2006 01:37
Thanks all for the comments.

Quote: "Hey empty, this is just a question, is it possible for you to edit the save/load so it starts at the last player checkpoint marker activated instead of the player start marker each time?"

The problem with that is that you need to save the current state of all entities and the state of the engine and so on, practically like with a free saving option. For this you need to know what variables/arrays to save, and for loading get around some other issues to get back to the saved state.

Quote: "Is it possible for an example Ally script, because I have been experimenting and can't get the character to shoot the enemy"

You can't do real allies, but I'll post an example tomorrow.

Quote: "Another thing empty, would it be possible to make conditions like this:
targetcanbeseen
targetalive
targetdead
targetingunsights
targetdistancewithin
targetcannotbeseen
With those, I could make a full line of scripts and a full ally system for the community.
Sorry for all requests, but I was thinking that the above conditions would be pretty easy to do"


Targetalive is in as targetactive

Like I said it's possible to implement something like this, provided you have enough time... time that I don't have. I only did this because a friend asked me if I could modify it so she can have global variables and most of all entity timers. I implemented the rest on my way. Actually I spent more hours on this than I had planned.

But here's a deal: Let's wait what the new official TGC update will offer, and in case there are still requests, I'll take a look at the whole thing again. Cause I don't want to spend days on something that will come soon anyway... unless you guys pay me on an hourly basis.

Also: currently there's a bug with the physics system that I'll try to fix during the next days.

And lastly: Perhaps I can solve the mystery of the SETTARGET action a bit. Whenever you check for events involving the player or entity, like PLRCANBESEEN, PLRINGUNSIGHT, SHOOTDAMAGE, the engine stores the source (in most cases the player) as a possible target. When you call SETTARGET after that, it'll make the possible target to the actual target. So rather than having conditions like TARGETCANBESEEN, TARGETDISTWITHIN it'd make more sense to have something like ENEMYCANBESEEN and so on. That again generates some new problems, mainly regarding the speed. But I agree: in order to make a useful ally script, conditions and actions like the ones mentioned above are necessary. Again let's wait for the official update.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 01:33
Quote: "Are we allowed to sell games made with this update???"

AFAIK yes.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 27th Aug 2006 01:37
AFAIK yes??? What do you mean AFAIK?

Tom

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 01:43
Well, as far as I know. Unless TGC has a different license for modified game engines (it's their product and source code after all), you are allowed to with it whatever the original license allows.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 27th Aug 2006 01:44
The original license allows that games can be sold. It also states that games made with a modded version can be sold, but I was checking with you. Would someone give Rich an e-mail and ask, as I do not know his e-mail address >.<

Tom

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 01:53
Well then you can sell games using this mod.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 27th Aug 2006 01:55
Yayness?? ^^

Tom

empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 05:08
OK, I think the physics sound/break bug is fixed and hopefully I haven't broken anything else.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Attachments

Login to view attachments
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 27th Aug 2006 06:09
ive done a bit more testing, and save and load level commands work great as well.


http://www.seqoiagames.com/seqoiacorp/
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 27th Aug 2006 06:46
Does this edit the finished .exe or the editor? Because when I run the darkbasic in my FPS Creator folder, all I get is a test game of the last map I edited...

Tom

BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 27th Aug 2006 07:07
when you build a game, replace the EXE in the game with the new one. thats all it is.


http://www.seqoiagames.com/seqoiacorp/
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Aug 2006 14:05 Edited at: 27th Aug 2006 16:07
Read the manual!

- Go to the FPS Creator folder
- Rename the original FPSC-Game.exe to FPSC-Game_original.exe
- Copy this FPSC-Game.exe in you FPSC folder
- Done

Now launch the FPSCreator.exe as usual.


Play Nice! Play Basic! -- Styx PlugIn- Coming Soon!

Login to post a reply

Server time is: 2024-06-29 02:45:37
Your offset time is: 2024-06-29 02:45:37