A base editor

A forum for the discussion and development of programs to assist working on or playing with the Vegastrike engine and data sets.
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

pheonixstorm wrote:Ah the joys of programming... For basemaker I am thinking if I would be better off taking out opengl and trying to copy it over to a directx app :roll:
Well, As my first round is in Visual Basic, (still figuring out what all needs to happen), an openGL directX thing might help. I assume it would be a control that would let me display the models and such? But don't make any unnecessary headaches for yourself. Static images should work OK for now.

Biggest problem is I'm basically writing a program to write a program... Be slick when I get it all figured out, but it's fun getting there. That's one of the reasons I loose interest in my programing projects: jump all of the hurdles, and it's not fun anymore.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

well basemaker was written a long while ago to use opengl to display the base image and I guess handle everything you are trying to do. Unfortunately it doesn't work. It compiles, run, then closes right after it tries to call up opengl.

For yours, have you tried using DarkBasic? I have seen several games that have been built using darkbasic, one of which I think was a 3D space sim. Something to read up on anyway :)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

I've come across it a time or two, seems to me it costs though. Does look like it would work nice though. Biggest benefit I see for that would be the 3d bases, not my present focus, the logistics of those are not sorted out though. Now, a new cockpit editor.... --slaps self-- one project at a time.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

yeah, the last cockpit editor was done in C# but it only worked with the 2D style huds used mostly by the privateer mods.

One rule to follow though, if you start to get burned out on one project tinker with another until that "Ah ha!" momment.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

Updated status: Had successful test build.
All GUI.PY features are presently DOA and on hold, pending further research/examples
NewScreenShotBM.JPG
Rooms: Working
Backgrounds: Not reading jpgs
Naming rooms: Working
Room Links: Working, but missplaced
Computers: Working, but missplaced
Place Ship: Unsure of vector info Q1
Place Launch: Pending
Place Fixer: Need to experiment
Load Music: Included, but Untested Q2
Import Base: Major experimentation to load existing bases Q3
Compile to Base: Working

Q1: are Q and R vectors math terms or internal labels? Anyone know how to convert XYZ rotations to Q and R vectors?
Q2: will single mp3's work, or do even they need to be in a m3u list?
Q3: Thoughts on decoding existing art? I know, gui.py klauss :) Just can't get it to work right now.

Left to my own devices, I'd get everything working before posting. Who thinks this is ready for upload to test on a wider scale? (Win only right now, I don't have the whole visual studio, so the QT port won't work. That is the goal however.)

**edit: I was so jazzed about a sucessfull compile of base info to .py that I forgot it's still missplacing the links.
You do not have the required permissions to view the files attached to this post.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

Its worth the upload. Give a good perspective on how the code flow is going and may find something you overlooked.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: A base editor

Post by klauss »

travists wrote:Updated status: Had successful test build.
All GUI.PY features are presently DOA and on hold, pending further research/examples
What exactly do you need?

You should have enough documentation within GUI.py itself, if documentation there isn't enough, let me know what isn't clear and I'll fill in the gaps.

Also, remember my earlier proposition: if you output an XML with the elements, I'll make an xgui.py function that loads it, then it's all about loading/saving XMLs.
travists wrote:Q1: are Q and R vectors math terms or internal labels? Anyone know how to convert XYZ rotations to Q and R vectors?
Orthonormal basis are usually specified in triplets: P, Q, R. When you know the base is orthonormal, you can omit one (say P) and the others imply it (ie: the engine can compute it). Usually Q is right, R is up. So all you have to do is send in Q the direction you want your model's "right" side to point to, and P the direction you want your model's "up" side to point to. It's too simple to be true right?

(PS: VS is renown not to follow standards and conventions, so it might depart a bit from the description given above - but the idea is the same)
travists wrote:Q2: will single mp3's work, or do even they need to be in a m3u list?
I think mp3's should work, but I'm not entirely sure.
Check main_menu.py, I seem to recall there's a credits room that plays a custom track.
travists wrote:Q3: Thoughts on decoding existing art? I know, gui.py klauss :) Just can't get it to work right now.
Forget about existing art. Existing art should be re-coded to use gui.py and/or xgui.py, to make it editable with your editor. Otherwise it will be an unforgiving and endless job: existing base scripts are ad-hoc, hand-coded and completely unfriendly to an automated tool.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

OK, I'll upload when I can. As for GUI.py, Can't seem to get the room to initializes right, not sure of the links, and last to data sets in the comments in guy.py make no sense krgn or something like that. (not at my home computer right now) A working two room base, with background, room to room link and a computer to follow the code through, would help. also static and variable indicators in the code, so I know what is literal and what changes based on the picture, location, etc. Mostly with only the main_menu to work from for what the final code needs to be, I'm not sure how the script needs to flow. Next few days, I can post my (partially) working out put I've made, along with the prog, and source. Then you can see the pattern I'm using to make the bases.
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

Got to it sooner than I thought.
Here is a sample output:

Code: Select all

#Initial Imports
import Base
import dynamic_mission
import VS
import fixers
import GUI

#rooms setup
room0 = Base.Room ('R1')
Base.Texture (room0, 'background', 'bases\T3\The Eliments.jpg', 0, 0)
room1 = Base.Room ('NextRoom')
Base.Texture (room1, 'background', 'bases\T3\DemoBackground.jpg', 0, 0)
#Set Hotspots
Base.Link (room0, 'my_Link_id',  .48,  .38,  .9,  .866666666666667, 'Next', room1)
Base.LaunchPython (room0, 'my_Launch_id', 'bases/launch_music.py', -.335, -.26,  .75,  .666666666666667, 'Up up and away')
Base.Comp (room0, 'my_Comp_id',  .65, -.62,  .875,  .833333333333333, 'De comp', 'ShipDealer Info Upgrade Cargo Missions News  ')
Base.Link (room1, 'my_Link_id', -.56, -.573333333333333,  .75,  .666666666666667, 'killa', room0)
Current status:
Rooms: Working
Backgrounds: Not reading jpgs
Naming rooms: Working
Room Links: Working, but missplaced
Computers: Working, but missplaced
Place Ship: Unsure of vector info
Place Launch: Working, but missplaced
Place Fixer: Need to experiment
Load Music: Included, but Untested
Import Base: Major experimentation to load existing bases
Compile to Base: Working

It's one of those stupid one-click deployment things, but here is the program. Won't let me post the code... If it works on more systems than mine, it may be time, Pheonixstorm.
Pre-alpha2.zip
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

I checked it out and it looks pretty good so far. It does crash however when I try moving back to a room I already worked on. Also, it would be nice to resize the app and have the controls resize accordingly, at least the image anyway.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

I'll see if I can duplicate your crash, so I can fix it. I haven't had much luck when I've tried to re-size everything in the past, but I agree; Resizing the app and having at least the picture re size is a must at the end. Good to know it's working in general.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

I may have confused the poor thing. Not really knowing what images it was looking for.. that and how many directories it had to go through to get anywhere...

As for resizing.. I know in QT if you group items and set expanding, fixed, etc on each object on the form it will expand with the form page. Not sure how it works in VS as I haven't really made any apps with it yet though I have played with the form layouts a bit.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

OK, I've posted to svn my current editor, and the source, have not worked with it much. Job, my monthly animations I do, actualy playing the game.... not to mention housework. It all takes it's share. Anyway It's not a dead project just sleeping. Pheonixstorm has been kind enough to set me up with a folder folder for svn at: https://ppueditor.svn.sourceforge.net/s ... asecrafter

I will be removing the prior download soon to free up some space.
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

Tore into it again, briefly. Implemented fixers, but needs some work before updating.


Current status:
Rooms: Working
Backgrounds: VS not reading jpgs
Naming rooms: Working
Room Links: Working, but misplaced
Computers: Working, but misplaced
Place Ship: Unsure of vector info, cannot proceed at this time
Place Launch: Working, but misplaced
Place Fixer: Working, but misplaced
Load Music: Included, but Untested
Import Base: Major experimentation needed to load existing bases
Compile to Base: Working
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

On a bit of a programming kick again, so progress is coming quicker than I thought.

Fixers seem to be working better, and I have managed to partially fix the misplacing of hotspots. Not quite ready to post an update. Anyone think I should (or should not) include the bar and guild prebuilt rooms?


Current status:
Rooms: Working
Backgrounds: VS not reading jpgs
Naming rooms: Working
Room Links: Working, posistion is close
Computers: Working, posistion is close
Place Ship: Unsure of vector info, cannot proceed at this time
Place Launch: Working, posistion is close
Place Fixer: Working, posistion is close
Load Music: Included, but Untested
Import Base: Major experimentation needed to load existing bases
Compile to Base: Working
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: A base editor

Post by charlieg »

Nice work!
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: A base editor

Post by klauss »

Yep, include everything needed to make a base, so people don't have to edit the script manually.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

Where can I find a guild call? Bar is not too hard to find, but picking out the info for the guilds.makeguild(info) stuff out of the guild.py code is not working well right now. Nor is the Windows "search for word or phrase in file".
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: A base editor

Post by klauss »

Might be only used in privateer perhaps?

I don't remember ever seeing guilds in UTCS.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

Some of the wiki documentation talks about guilds.. but I think that is only for factions. Adding guilds into VS (like those in privateer) would make VS more interesting I think. Your thoughts klauss?

As far as searching for stuff in the python.. don't use any of the windows features. Download notepad++ and use its search features. Find, find in files etc. They may work out MUCH better for you than whatever windows can offer.

So far as I can tell, VS has no guild code.. only privateer. There is no guild.py in the vs svn while the privateer svn has merchants_guild.py, guilds.py, and mercenary_guild.py

I would say for now have the code look for guilds.py and if it doesn't find it ignore it. In Qt you could do the button and call somebutton->settext()->hide(); so that it will be on the form, but hidden away. can you do something like

Code: Select all

if (!guilds) {
    button->hide();
} else {
button->show();
were you set guilds as the path to guilds.py?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: A base editor

Post by klauss »

pheonixstorm wrote:Some of the wiki documentation talks about guilds.. but I think that is only for factions. Adding guilds into VS (like those in privateer) would make VS more interesting I think. Your thoughts klauss?
Sure, but it would require a bit of care.

For instance, in privateer you had the merchant and mercenary guilds only, but in VS there are a lot of factions, so some thought should be involved into making "guilds" easily extendable to more and more factions. In privateer, each guild is a script on its own and a lot of work.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: A base editor

Post by Deus Siddis »

klauss wrote: For instance, in privateer you had the merchant and mercenary guilds only, but in VS there are a lot of factions, so some thought should be involved into making "guilds" easily extendable to more and more factions. In privateer, each guild is a script on its own and a lot of work.
Another reason in favor of reducing the number of factions altogether.

Because maybe more interesting player-to-faction interaction is better than having a bigger total of more poorly developed factions.
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

I just checked, even deleted it and updated to be sure. Guilds.py does exist for Windows. (..\data\bases\guilds.py) Implementing guilds in VS could be quite interesting. At present only merchant mercenary and a general guild exist in the code, this would need to be expanded. Not only would many of the factions have a guild, but I see the potential for an explorer’s guild and a Confed freelance pilot’s guild. One thing that always bothered me about Privateer’s mercenary’s guild was its uniformity despite posting bounties on mercs and getting the mercs (of which you are one) mad at you. A set up like this should lead to a fracturing of the guild into various clans. Does VS support sub-factions? The mercenary’s guild would be composed of these clans, with internal squabbles, but have common enemies. The “Star Dogs” might post a general bounty on all members of the “Fighting Cats”. Things could erupt into full clan wars alongside the greater conflict with the Area. Is there only one merchant guild, ore are there competing corporations? Guild membership would have benefits beyond just another place to get missions. Access to guild specific ships (like the ones mentioned in the descriptions of the merchant ships), and cheap in-guild wingmen would be two. The latter does not seem supported in the present code. It may be tricky, but if someone is willing to tackle it, I think it would be well worth it.

Anyway, I about have the calls for the bar.createbar figured out. The various computers, fixers, launch hotspot, ship display, rooms, music, background images, eventually the prebuilt bars and maybe guilds: is there anything I’m missing to make a base?
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: A base editor

Post by pheonixstorm »

I wouldn't go to far with guilds. The problem with the current guilds setup in privateer is the fact that attacking another guild member should NOT get a negative reaction fro the guild but rather a positive. So, its more of a coding issue than a guild faction one. I think in the code there is a way to set the new faction level but I don't remember where. And while having different factions within a guild it would add more complexity to the current factions.xml that we really don't need until we have a much more stable product. Its a good idea to tinker with later after say build .8 or a full 1.0 just not now.. maybe list it as a possible future feature (do we have such a list? updated?)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: A base editor

Post by travists »

Got it. I'll include what the standing guilds if I can, but won't spend too much time on it. Using the prebuilt bars seems kinda in the same boat to me. Nice to have, but superfluous.
Post Reply