Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

how to make your own extension

Injury

Awesome Bro

I'm going to be working with C++ and whatnot, and I work with VB already. I've saved some text files and whatnot, I just want to know what I can do to make my own extension, and my own program to interpret it. I'm ultimately going to try and write something that save 2d arrays and then I can have it display textured blocks of .png graphics and whatnot, just thinking about it.


Thanks!
 
I mean there's not really anything special about extensions... you can name a file whatever you want. You can rename a .mp3 file to .xyz and as long as the player doesn't check the file extension first (but since you're creating your own program to handle the extension, you can control how it checks).
 

Injury

Awesome Bro

makes sense! thanks!

I just got my C++ books today, I'll give them a look over and see if I can hack it this year! woooooot

I'm actually excited for school!

thanks again!

ps- does that sound like a good idea anyways? using arrays to map out textured areas? idk, just trying my hand at something new!
 

Injury

Awesome Bro

I'm probably going to use it for a small RPG maker styled program, just for fun. You click the box, it changes textures based on what number it's on already.
 
in C# you can make a binary writer to write stuff to a file and as filename you can write whatever you want w/o extension
 

Injury

Awesome Bro

hrm, I've been playiing cs2d and I've been getting the idea to develop a top down fps engine script for rmvx, or just make my own in C++ or w/e....Thanks for all your replies!
 
Ceroscuro":2jqx4tht said:
"Top down FPS" sounds like a contradiction of terms to me...

Trust me, it apparently is a small genre of game. Although the name is a contradiction, they didn't want to call it something like a TDS instead. They are somewhat similar to bomberman meets zelda.
 
i can give you a tutorial about making your own .something files in Visual Studio...but this will only work if you have visual studio...
i will show you how to do it in 7 easy steps.

If you don't have visual studio then this won't help you.

Requirements
Visual Studio

1)Open up your solution in Visual studio.

2)Add a Setup Project to your solution by file , add project,New project, Setup & Deployment projects,Setup project

3)Right-click on your setup project in the "Solution Explorer" window,Select view,then select file types.

you'll see the "file types" window displayed in Visual studio.At the top of the window will be "File types on target machine"

4)Right-click on "File types on target machine".the menu will pop up with Add "file type" Click on this.

you'll see "New document Type#1" added,and "&open"underneath it.

5)The "new document type#1" can be anything you want - change it to something descriptive.although the user never sees this,never use something common- be as unique as possible,Because you can overlay current file associations without even realizing it.For example,you might think"pngfile" might be a useful name- but using that will now send all"*.png" files to your application,instead of to an image viewer.A good practice maybe "YourCompantName.Filetype",where your company name is your name of your company's name, and "Filetype" is a descriptive text of your file.

6)In the "properties" window for your new type,you will need to change a few properties.:

Command:Change to the application that you want to run.If you click on the "..." and you will proberly want to locate and use the "primary Output..." File
Description: This is the description of the file type(if it doesn't describe it's self"
Extensions:This your list of extensions for you chosen Program.Separate each one with a ","
Icon:This will associate the icon with your file type,This shows up in the window explorer.

7)Nearly done...
Now we move to that "&open ".This is an action that is available if your right-click on the file.The default action("&Open" is currently set as the default) is what happens when you double click on the file.Right click on your "New document type#1" to add actions,but for the moment,lets define our "&open" action

Click on "&Open".You will see in the properties window "Name","Arguments","Verbs". Verb is hidden from the user,but is the key that is stored in the registry.Leave it same as the name,But without the "&".The default for"Arguments" is "%1",Which means to pass the full path and filename to your application.You can add other stuff here as well,if you need to pass flags to your application to do special stuff.All this infomaton is getting passed to your application on the command line,so you'll need to be familiar with the "Environment.CommandLine" object.
If you need to set a different action as your default,just right click on the action and "set as default"


ok hope that helps you
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top