Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 The VB Adventure Maker
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 12 2004 :  11:58:48 AM  Show Profile  Reply with Quote
Now here's some news! Following is an screenshot of the current state of the editor. As you can see a texture sample is shown at the right by automatically applying the selected texture to a cube and a sphere so you can immediately see the result. The size labels aren't working as of yet



I've also created two nifty functions for Putting and Getting variable-sized strings to/from binary files. (the functions will Put/Get the string at/from the current position on the file)
Public Sub PutString(FileNumber As Integer, sString As String)  
    Put #FileNumber, , Len(sString) - 1  
    Put #FileNumber, , sString  
End Sub
  
Public Function GetString(FileNumber As Integer) As String
    Dim size As Integer
    Get #FileNumber, , size  
  
    Dim tmp() As Byte
    ReDim tmp(size)  
    Dim dummy As Integer
    Get #FileNumber, , dummy  
    Get #FileNumber, , tmp  
  
    GetString = StrConv(tmp, vbUnicode)  
End Function

The dummy variable is there to hold some stupid 2 bytes that VB puts in the file along with a string. Do not ask me the purpose of the -1 in the Put function because I just don't know. I only know that it works this way.


Whatever. Who knows...
Go to Top of Page

Sion
Warrior

Denmark
138 Posts

Posted - Jul 12 2004 :  1:14:08 PM  Show Profile  Visit Sion's Homepage  Click to see Sion's MSN Messenger address  Reply with Quote
The editor looks real nice! Well, although it's not possible to see that much of the editor - but it's nice to be able to see how the texture will look as material on geometri.
I realize that the editor is in an early state, but it would probably become convient with a minimize and maximize button :)

The binary read/write rutines look very handy (and extremely simple), but it seems that it requires the files to be open in order to use Get and Put...? Where have you read about this technique, because Get and Put are undocumented? I haven't heard about them before.

Visit my personal blog at www.AndersNissen.com!
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 12 2004 :  1:52:05 PM  Show Profile  Reply with Quote
Well, I just created these two functions from scratch. Dunno about the docs, because I simply don't have them (I learned VB mainly from a book, the web and the Object Browser). For the functions: They both assume you have a binary file opened with read(for Get) and/or write(Put) enabled. Something like:

Open "c:\test.dat" For Binary Access Read Write Lock Read Write As #1

then you pass "1" as the argument for filenumber. just close the file later on with Close #1.

About the editor, I just posted a picture of the texture panel, because it's the only currently at least half-coded and I would like to show the progress as soon as possible About the min/max buttons, I don't know if this would be a good idea because you need to resize everything, then re-initialize the display device, blah blah blah... I guess I may do this later.

Hum, maybe just a minimize button won't hurt... Anyway, as soon as it's ready I will probably post a pre-alpha version (or something) here so you all can see.

Whatever. Who knows...

Edited by - VBBR on Jul 12 2004 2:30:10 PM
Go to Top of Page

Sion
Warrior

Denmark
138 Posts

Posted - Jul 12 2004 :  2:28:34 PM  Show Profile  Visit Sion's Homepage  Click to see Sion's MSN Messenger address  Reply with Quote
With the DaBooda Turbo engine it is possible to change the size of the window where the game is initilized in without re-initializing it. Try looking at the code to see how he has achieved that.
PS. Don't know if it's a very good idea to have files opend for longer periods at a time. In any case, be sure to use the command "FreeFile" to get an unused filenumber.

Visit my personal blog at www.AndersNissen.com!
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 12 2004 :  2:35:18 PM  Show Profile  Reply with Quote
I know, and I don't keep the files opened. I only open/read/write/close them when you change the current active tab. This also makes it easier in the way that you can't have to click "save" all the time (and it's not lost if the power gets cut off). Oh, and I do use FreeFile.

I do can resize the window without re-creating the display device, but this makes the display all blurry. I will take a look at DBT, thanks.

Whatever. Who knows...
Go to Top of Page

Lachlan87
Moderator

USA
160 Posts

Posted - Jul 12 2004 :  5:16:47 PM  Show Profile  Reply with Quote
Can't you just reset the device? Presumably you already do that when the edior loses focus, so why not when you resize as well?

Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 12 2004 :  5:32:22 PM  Show Profile  Reply with Quote
I don't do anything when the editor loses focus, it seems to work just fine. And I can't reset the device because I'm not using DirectX directly (see, the thing is that I'm in fact using DX9 from VB6; the engine I use provides access to the internal DX objects, including the device, but as I'm using it on VB6 I don't have the possibility to access it. And as far as I know the engine doesn't have a reset device function. It does have a resize procedure, however this just stretches the display)

Oh yeah, I'm also planning on adding auto and manual rotate to the sample geometry, what do you think?

Whatever. Who knows...

Edited by - VBBR on Jul 12 2004 5:34:52 PM
Go to Top of Page

cjb0087
Knave

Australia
76 Posts

Posted - Jul 12 2004 :  7:38:09 PM  Show Profile  Visit cjb0087's Homepage  Reply with Quote
"An Error occured while trying to set up the game"

www.bugsplat.tk
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 12 2004 :  8:04:55 PM  Show Profile  Reply with Quote
Oh now that's hard to detect where the error occured.
- Did you install the R3D files?
- Do you have DirectX9 installed?
- What is your vidoe card configuration?
- What is your PC configuration?
- What is your OS?
- Any information you feel relevant...

Did anyone manage to run the game at all?

Whatever. Who knows...
Go to Top of Page

Sion
Warrior

Denmark
138 Posts

Posted - Jul 13 2004 :  10:23:44 AM  Show Profile  Visit Sion's Homepage  Click to see Sion's MSN Messenger address  Reply with Quote
I had no problems running the game. I even managed to find my way out of the maze :)
But it seems that the engine's clipping/culling/occlusion tests are not very good. When looking at the maze from outside the engine rendered ~48000 vertexes when only very few were needed. The walls of the maze blocked the view of all the walls inside the maze, but they still seemed to be rendered.

Visit my personal blog at www.AndersNissen.com!
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 13 2004 :  10:39:22 AM  Show Profile  Reply with Quote
Yeah I'm aware of all that. The mechanism I used for this "sample" (as it can't be called a game) is very innefficient because it renders even walls that are never visible (like every tile is made of a column mesh; but in a junction of two columns there are two quads that are in the middle and are never rendered).

Also there is a quad covering the top of every column (wall). I made this back when the view was top-down and left over as it would only give more work :)

But in the real thing the maps will be more efficient. Actually I do have a model that is just one side of a wall and one that is an outer corner, but try constructing something like this in notepad? In the time this was created all my files were just a map.txt file with X's and .'s. I COULD define different letters for the different walls but that would be a real pain; and a wrost pain to create the map with a lot of different symbols. (of course in the final version the editor will be ready and we'll be able to create maps seemlessy)

And from whhat I reckon this engine only uses frustrum culling. I will look further on this, maybe make a suggestion. Tahnks for the comments.

P.S. In fact it's easy to get out of the maze; just keep going in the same direction and eventually you will do it. The way I made the map it doesn't have any dead ends.

P.S no.2: Did you try creating a map? You can create any size up to 100x100 (and this is a lot, the default map is 50x50)

Whatever. Who knows...
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 18 2004 :  08:03:40 AM  Show Profile  Reply with Quote
Did anyone here play Broken Sword: The Sleeping Dragon? Because I just completed it yesterday and it gave me a completely different view of 3D adventure games. The system was very well-designed, I believe it works as follows:
- The visual map structure is made of arbitrary geometry; i.e. you don't create it from tiles, you just make it all in a 3D editor or whatever;
- The Map data (floors, walls, floor heights, slopes etc.) is separated into tiles in a normal 2D grid.
- Wall collisions are checked in arbitrary angles (with sliding); I believe this is easily done with plane-sphere or rotated-bounding-boxes collision checking.

Well, this basically screws up all the basis of my system :)
But I think it's worth changing fot the better, right? Do you think the above approach is a good one?

Whatever. Who knows...
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jul 18 2004 :  11:50:19 AM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
If you start to add more features that make this too complicated, then you probably will not finish the program. Keep it simple
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 18 2004 :  1:20:41 PM  Show Profile  Reply with Quote
You are definetly right. The small detail is that the system I just described is (I think) a lot simpler than the current. Creating maps in your favorite 3D modelling program is got to be more fun than trying to adjust tiles within a clumsy editor. Just defining where there is a wall is more simple too.

Also this is not an "add features" case. It is a "remodel the system" one. I was already thinking that the original approach wasn't going to succeed in some ways.

See, I think I'm going to toss the line collision-checking for now. For my current needs bounding boxes look just fine. And I do have sliding for them.

Whatever. Who knows...

Edited by - VBBR on Jul 18 2004 1:38:44 PM
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Jul 30 2004 :  5:05:23 PM  Show Profile  Reply with Quote
OK. I've come up with an interesting idea. Since the engine will be script-driven, I thought of, instead of creating a complex binary file format, define all the game settings also using scripts (kinda like what NSIS does). Here is an example. Let me say I used to use INI files to store the game data. So the game header (main game file) could be something like this:

[Game]
Name=Test Game
StartMap=1
StartX=2
StartY=6
StartRot=1

Now, using the new system, it would like something like that...

Game.SetName("Test Game")
Game.SetStart(1,2,6,1)

Or even without the "Game" keyword. See? It seems a lot simpler and more dynamic. One of the main advantages of this method is that is saves me a lot of coding and trouble since WSH and Python/VBS/JS(that's another idea, to allow any of these 3 languages to be used according to the user preference) do all the hard work of parsing the file; I just need to create a class and expose its methods.

What do you think of this method? And also about the "use the language of your choice" approach?

Whatever. Who knows...
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.17 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.