Storing images externally
Storing images externally
Storing images externally
Storing images externally
Storing images externally
Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally
Storing images externally Storing images externally
Storing images externally
Go Back  Xtreme Visual Basic Talk > > > Storing images externally


Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2010, 09:09 AM
Teup Teup is offline
Newcomer
 
Join Date: Jun 2003
Posts: 4
Question Storing images externally


Hi all,

I'm trying to find a way to store the graphics for my game outside of the .exe file. I've been doing a bit of research before posting this, of course, and I learned that Access databases might not be such a good idea as they can only handle the bitmap format, which would result in a huge data file. I've been trying to put the graphics in an ActiveX control. This works, I can make the ActiveX control display a picture, but I haven't been able to make it return a picture value which I could then use throughout my game. To demonstrate, this would be ideal:
Code:
MyActiveXDatabase1.DatabasePicture = 3
MyGameInterfaceObject1.Picture = MyActiveXDatabase1.Picture
That second part of it I haven't gotten right yet, but there are also some other disadvantages to consider such as having to register the .OCX file with the user's system, which may be a bit overkill for a picture database (or not? don't know really).

An easy way is, of course, loading the pictures from individual files into Pictureboxes. But I'd rather have the data encrypted and stored in just one file, if possible.

Long story short, I want my game to retrieve its graphics from an external file. How do I go about this?
Reply With Quote
  #2  
Old 07-03-2010, 11:19 PM
vb5prgrmrStoring images externally vb5prgrmr is offline
Senior Contributor

* Expert *
 
Join Date: Mar 2009
Posts: 1,087
Default

FYI: Access can store more than just BMP's...

You could use a zip file. Just package up a directory full of graphics...



Good Luck
__________________
Just because I'm an expert does not mean I know it all and just because I know it all does not mean I'm an expert
Reply With Quote
  #3  
Old 07-08-2010, 07:42 PM
Oblivion165 Oblivion165 is offline
Regular
 
Join Date: May 2004
Posts: 66
Default

Are you using Pictureboxes to store your graphics files?

What are you using to draw objects?
Reply With Quote
  #4  
Old 07-09-2010, 06:15 AM
Teup Teup is offline
Newcomer
 
Join Date: Jun 2003
Posts: 4
Default

Thanks for your replies!

Quote:
Originally Posted by vb5prgrmr View Post
FYI: Access can store more than just BMP's...

You could use a zip file. Just package up a directory full of graphics...



Good Luck
I guess that's a good idea. I assume there's no way to read inside zip files? I guess I'll just make it unzip, read the data and delete it on load. However, I found out a good part of the graphics wasn't jpg to begin with, so I've already reduced the progam's size a good deal Storing graphics externally would still be nice, though, but if that in any way increases the risk the game won't run properly on my users' computers then I rather keep it like this.

Quote:
Originally Posted by Oblivion165 View Post
Are you using Pictureboxes to store your graphics files?

What are you using to draw objects?
I don't use anything, just mainly Images. It's a "text based" strategy game, that is, it doesn't have any animations. (nor would I be any good at programming that :P)
Reply With Quote
  #5  
Old 07-09-2010, 06:43 AM
vb5prgrmrStoring images externally vb5prgrmr is offline
Senior Contributor

* Expert *
 
Join Date: Mar 2009
Posts: 1,087
Default

You would guess wrong about being able to read the contents of a zip file but you do have the idea on how to use it for your program...



Good Luck
__________________
Just because I'm an expert does not mean I know it all and just because I know it all does not mean I'm an expert
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Storing images externally
Storing images externally
Storing images externally Storing images externally
Storing images externally
Storing images externally
Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally Storing images externally
Storing images externally
Storing images externally
 
Storing images externally
Storing images externally
 
-->