Post

 Resources 

Console

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

 All Forums
 VBGamer
 VBGamer
 A 3D RPG/Adventure Cooperation

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
Vampire Posted - Jul 20 2004 : 06:05:04 AM
There are so many VB programmers who's active on this great site and even more people see their activity. So I thought that if we (all?) would cooperate (and we all do it right), then we could do something really remarcable. I'm thinking of a 3D nonlinear RPG/Adventure game taking place in a fantasy world.
I think, if we'd put our ideas and knowledge together, it would be ready in no-time and it would be fun playing it.
I have lots of ideas for the storyline and some for the world's and characters' design. I'm ready to put them in this project and I'm sure, everyone has something that would help this game to take life.
So, what is YOUR oppinion?
15   L A T E S T    R E P L I E S    (Newest First)
VBBR Posted - Oct 25 2004 : 3:04:45 PM
Hey Eric, you've got 486 posts... wanna upgrade to Pentium now?
Eric Coleman Posted - Oct 25 2004 : 2:37:16 PM
Since this is a fairly old post, I suggest you email the guy that started it (on page 1) and see if he's still interested :-)
Hacker9988 Posted - Oct 25 2004 : 1:39:42 PM
Well, I think we could do it. I like Vampires Idea. Let's get working on the RPG. Me and some of my friends were wanting to make one and i even got them to write out a pretty cool story line. We (me and my friends) all have good knowledge of folklore and i think we could all work together to make a pretty awesome game (not to mention some money $$$¢¢¢). I'll be on AIM most of the time, but mainly around 1:37 CST (b/c i'm in computer class that time). I can work on it here or at home. Just e-mail me here. Thanx!!

Vampire Posted - Jul 30 2004 : 04:01:59 AM
Well, I guess, I had an impossible idea... It doesn't seem to work this "cooperation"... Anyway. If someone still wants to do this, just mail me!
VBBR Posted - Jul 25 2004 : 12:52:30 PM
OK, OK, 1,000,000 iterations now. (note that now each test runs just 1 time as opposed to 5)

With Dim:
% faster | -47,1 | -42,9  | -40,8  | -43,1  | -38,6  
   Test1 |0,61747|0,617301|0,629835|0,628216|0,638489  
   Test2 |1,16737|1,081612|1,064591|1,104773|1,03939  

Without Dim:
% faster |  44,4  |   27   |   76   |  48,9  | 50,2  
   Test1 |1,528633|1,558092|1,88045 |1,559742|1,566843  
   Test2 |1,058943|1,226932|1,068605|1,047792|1,043385  
Eric Coleman Posted - Jul 24 2004 : 5:28:41 PM
100,000 iterations does not give a good enough representation of the speed. Simply look at the differences in results, "61 | 44,8 | 44 | 35,2 |106,3", that's just too much of a discrepency. The margin of error is larger than the value being measured. A value of 10 +/- 10 isn't as precise as a value of 100 +/- 10.
VBBR Posted - Jul 24 2004 : 2:22:29 PM
Now that you say it, I noticed...

There seemed to be something wrong. I re-ran the two test and those are the results...

With "Dim"
% faster | -52,3   |-42,3   |-43,3   |-45,9   |-42,2  
  Test1  | 0,337046|0,331936|0,334958|0,341163|0,431935  
  Test2  | 0,706068|0,574953|0,59076 |0,630985|0,746955  


Without "Dim"
% faster | 49,3    |45,8    |53,5    |46      |99,4  
  Test1  | 0,857457|0,89679 |0,88588 |1,012913|1,215434  
  Test2  | 0,574427|0,615014|0,577294|0,693654|0,609483  

Anyway it seems that the "Dim" makes a HUGE difference on speed. (more than doubled here)

edit: Oh here it is... hehe it looks like in the first test I used 1,000,000 for the loop, but 100,000 in the second. Anyway 1,000,000 was taking too much time so I guess 100,000 is good enough. Also each 100,000 loop is being executed 5 times (and this is repeated 5 times thus making the 5 values, kinda confusing but there is a 5 for the VB iterations, a 100,000 for the script iterations and another 5 for the number of times the test, including 5 iterations, is run).
Eric Coleman Posted - Jul 24 2004 : 1:37:46 PM
your second test seems to be way off for some reason. Your time values are much too small if the only change you made was to remove the "Dim" statement in the VBscript version. That shouldn't have affected the Python test at all.
VBBR Posted - Jul 24 2004 : 12:09:51 PM
Well, these are some results I got using Almar's template. (Test1 is VBScript and Test2 is Python)
% faster  |   -29,4|  -39,9 |  -39,4 |  -39,9 |-38,7  
   Test1  |3,844907|3,265745|3,266323|3,230364|3,29376  
   Test2  |5,448391|5,438165|5,38696 |5,370542|5,376462  

From this, it seems that VBS is around 40% faster. Maybe because it was originally meant to be used with WSH.
Now the code I used... (with 5 iterations)
Public Sub TestOne() 'VBS  
    Dim TestCode As String
    TestCode = "Dim A, B, C, D, E, F, G, N" & vbCrLf & _  
        "B = 2" & vbCrLf & _  
        "C = 3" & vbCrLf & _  
        "D = -4" & vbCrLf & _  
        "E = 5" & vbCrLf & _  
        "F = -1" & vbCrLf & _  
        "G = 2" & vbCrLf & _  
        "For N = 1 To 1000000" & vbCrLf & _  
        "    A = B * C + D * E + F * G" & vbCrLf & _  
        "Next"  
  
    ScriptVBS.ExecuteStatement TestCode  
End Sub
  
Public Sub TestTwo() 'Python  
    Dim TestCode As String
    TestCode = "b = 2" & vbCrLf & _  
        "c = 3" & vbCrLf & _  
        "d = -4" & vbCrLf & _  
        "e = 5" & vbCrLf & _  
        "f = -1" & vbCrLf & _  
        "g = 2" & vbCrLf & _  
        "for n in range(1, 1000000):" & vbCrLf & _  
        "    a = b * c + d * e + f * g"  
  
    ScriptPy.ExecuteStatement TestCode  
End Sub

ScriptVBS and ScriptPy are MS Scripting Controls.

New: Now curiously those are the results if I don't declare the variables in VBS. I decided to test that since as far as I know Python doesn't allow variable declarations.
%faster |    61   |  44,8  |   44   |  35,2  |106,3  
  Test1 | 0,853772|0,77584 |0,807183|0,869534|1,113404  
  Test2 | 0,530268|0,535775|0,56048 |0,642921|0,539781  

It seems Python is faster in this case then! I will look in the Python docs for explicit variable declarations.

New code:
Public Sub TestOne() 'VBS  
    Dim TestCode As String
    TestCode = "B = 2" & vbCrLf & _  
        "C = 3" & vbCrLf & _  
        "D = -4" & vbCrLf & _  
        "E = 5" & vbCrLf & _  
        "F = -1" & vbCrLf & _  
        "G = 2" & vbCrLf & _  
        "For N = 1 to 100000" & vbCrLf & _  
        "    A = B * C + D * E + F * G" & vbCrLf & _  
        "Next"  
  
    ScriptVBS.ExecuteStatement TestCode  
End Sub
  
Public Sub TestTwo() 'Python  
    Dim TestCode As String
    TestCode = "b = 2" & vbCrLf & _  
        "c = 3" & vbCrLf & _  
        "d = -4" & vbCrLf & _  
        "e = 5" & vbCrLf & _  
        "f = -1" & vbCrLf & _  
        "g = 2" & vbCrLf & _  
        "for n in range(1, 100000):" & vbCrLf & _  
        "    a = b * c + d * e + f * g"  
  
    ScriptPy.ExecuteStatement TestCode  
End Sub
VBBR Posted - Jul 24 2004 : 11:47:25 AM
That, in Python, would be... (I think)

b = 2  
c = 3  
d = -4  
e = 5  
f = -1  
g = 2  
  
for n in range(1,1000000):  
    a = b * c + d * e + f * g  

This may be wrong, as I'm just starting to learn Python, but I think it's right. I could test the speeds using Almar's benchmark model. Could someone translate that to JScript?
Eric Coleman Posted - Jul 24 2004 : 10:46:02 AM
I would be interested in speed comparisons between a vbscript, jscript, and Python scripts. Something simple but that is also a large loop.

Dim A, B, C, D, E, F, G, N
B = 2
C = 3
D = -4
E = 5
F = -1
G = 2
For N = 1 to 1000000
A = B * C + D * E + F * G
Next
VBBR Posted - Jul 24 2004 : 08:45:10 AM
Thanks, managed to set up Python successfully in a simple VB app. I also reccomend it to anyone that is wanting to use a scripting language; it is a lot better than VBScript in my opinion.
Dan Posted - Jul 23 2004 : 4:05:51 PM
You first need to download the win32 python extensions from here>>
http://starship.python.net/crew/mhammond/win32/Downloads.html

Then Read here for setting it up to work with WSH >>
http://www.python.org/windows/win32com/ActiveXScripting.html

I havn't done it myself, so don't know any more info other than what I found out in a few momments of searching
VBBR Posted - Jul 23 2004 : 08:56:05 AM
Wow, I didn't knew it supported Python. Do you know if it supports Lua too?

edit: uh... I've downloaded Python, but couldn't find anything related to WSH. Also tried running a pythin script with it and it said that no compatible module was found or something like it.
Dan Posted - Jul 23 2004 : 07:49:15 AM
OT:
quote:

It may be possible that one of the pre-existing scripting libraries work with VB - I haven't done much research into it yet, cause other things are eating in to my schedule. But definately sort out how scripting is going to work before even thinking about anything else.



The msscript.ocx control (Windows Scripting Host (WSH)...)
works pretty good, allowing a familiar language to be used. With it you can script using any language that has hooks into the host. Vbscript, Jscript, REXX, Perl, Python, and others. WSH supports Vbscript and Jscript out of the box, and both the Python and ActivePerl distributions provide support for WSH.

Further reading about Windows Scripting can be found here >>
http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169


An Article on the MSDN explains how to add scripting support to your app can be found here >>
http://msdn.microsoft.com/msdnmag/issues/0600/visualprog/default.aspx

VBGamer © Go To Top Of Page
This page was generated in 0.25 seconds. Snitz Forums 2000

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