2015-08-29 04:13:47

Hi all,
the first programming language I ever messed with, was Visual Basic. Back in that time, though, I simply copied things from the internet which, as you all know, is not real programming. Recently, though, something sparked my interest in the language again. And I ask you, is it worth learning? Is vb a good language in terms of game developement, or does it absolutely suck? I'm not really in tune with what languages are and are not good, I've just been using and will likely continue using pure basic, but think that, if this is a good language, I'll give it a try. What are your thoughts?

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-08-29 05:07:52

Hi Severestormsteve.
Visual basic isn't perfect but it's pretty good. You have a lot more freedom then you do in other basic languages. I say since you already have programming experience try something like python, c#, java. One thing I would recommend is install a whole lot of interpreters on your computer so you can try a lot of languages so you can see what you like and what you don't.
Myself I would suggest python the indentation takes some getting used too but I have used it in the passed and it's very easy to learn especially if you have programming experience already.
Hth.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2015-08-29 05:57:52

Hi,
Visual Basic is a language that isn't exactly meant for making games. If your speaking about VB6, games have been made for that, but if your talking about VB.NET, don't even try making a game. You will find that it isn't worht the pain.
As for other languages, I'd recommend Ruby. Ruby is a very easy to learn language and is very easy to understand (although it has many different symbols like ., #, and :: for function separators, but those are the only three). It can get very confusing at first, but you will find that it becomes easy to understand after a while. It has OOP as well, allowing you to find out why lots of people love OOP. (you don't have to learn OOP immediately, but be warned! (hint): You'll find that everything is an object.)

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2015-08-29 07:55:27

Hi
I'm using python and bgt, but I think I'm not brave enough for start actual coding lol

2015-08-29 13:05:56

The only problem I'd have with learning python is that I've been told that there is only 1 library for python games, and that library has many bugs, but if that was wrong I'd be happy to learn that one. but thanks for the insite on vb.net and games. if I actually end up learning it it would likely just be for software.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-08-29 15:17:24

no python has several. pygame, the rather buggy one; pyglet; and a few others i'm forgetting. if you want to go more of the direct audiogame root, there is PyAudioGame and AudioGameEngine

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2015-08-29 19:07:08

Severestormsteve1, a lot depends on what version of Visual Basic you mean. Do you mean VB 6 and earlier, or do you mean Visual Basic .NET?

If you are talking about Visual Basic 6 and prior versions I'd say no. Although, it was used for games in the past  the language, tools, etc are extremely old and deprecated. SO I would not recommend using it for any new projects.

However, as for VB .NET it depends on the project, but I'd say it still has some use to developers. It is fairly easy to work with and while I might not suggest it for games it is fairly handy for creating other applications and stuff. I rather like VB .NET as a quick and dirty programming language. Although, you could certainly develop games in it if you wanted too.

As for Python there is certainly more than one library available for game development. Not sure where you got the idea there is only one library for game development, but it is not true. Off the top of my head there is PySDL, PySDL2, Pygame, Pyglet, etc. Those are just the more common ones. So if you ever decide to take up Python for game development there is a lot more out there than you seem to think.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2015-08-30 00:54:05

wow! I didn't really know that. And there's an audio game library for python itself? That's cool.
  But I was referring to vb.net... I was just curious because it seems as though Aprone uses that for his games but maybe I'm wrong about that. Also is vb.net the language built in to windows, used for creating those vbs files?

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-08-30 01:56:22

Hi Severestormsteve.
That is visual basic script not visual basic .net. Visual basic .net you download when you download a version of visual studio that you want. I don't know much about vb script but imagine it's something like applescript so I wouldn't think it would be good for audio games.
I don't know who you've been talking to but it's obviously somebody who knows nothing about python. I'm not going to list any libraries because tward pretty much got them all, at least all the python gaming libraries I know of.
Pygame is very buggy indeed but it's still easy to play and position sounds create menus stuff like that. I like pyglet I used to use that all the time when I did programming. It's great for creating menus and sub menus do timed events and a whole lot more. The only really disappointing thing is that the developer is abandoning pyglet so it probably won't be up to date for much longer.
Hth.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2015-08-30 05:03:16

Yeah Guitarman I did research on vbs and outright new it wouldn't be good for audio games, even before research was done. That language is speciffically meant for scripting tasks for your computer to perform, I.E. when you are away and unable to act with the GUI but things still need to be done. That one was out of the question from the beginning, I was just curious as to whether or not it was based off the same sintax as vb.net.
As for Python does anyone know of anywhere I could find audio game examples in that language? Perhaps I'll need to learn the language first, obviously big_smile, but it would be nice to know what an audio game looks like in Python before I go into it, ---- the only reason I even went! Into pure basic was because Danny gave me a copy, and had me writing code the first day, so I was able to decide then.
Also, with Python, is it possible to delete items from an array, as well as inserting them at the beginning or middle of the array? That's one thing pure basic doesn't have that I wish it did.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-08-30 06:12:46

Hi Severestormsteve.
Yes with python you can delete and add arrays at anytime. I don't know why purebasic won't let you do this.
After you mentioned it I looked into vbs it's very limited. Somebody was talking to me about autoit the other day and I realized autoit is just a puffed up version of vbs. Applescript and vbs are the same thing they just run on different systems.
For python game examples the only one I know of is usa blackjack. Basically it demonstrates how variables, random, and message boxes are used in python. I've never seen any other python audio game examples. In the pygame and pyglet documentation there's examples on how to do certain things but it mostly shows you how to deal with graphics. I'll look around for audio game python code but I'm not sure where to find some you might check stackoverflow they have people on there write about all kinds of stuff.
Hth.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2015-08-30 15:31:09

RSGames is written in python. but thats not a very good example of a good game. its very laggy. but that shouldn't turn you off from python. python shouldn't be that laggy and no one can figure out why their game lags so much. other games are soundRTS, i'm working on a monopoly game, and camlorn is working on several projects one of which is a shades of doom MMO. it is very possible to write audiogames in python. it can be tricky wading through all of the information for visuals but you get little bits of good info out of it here and there. but you'll have to learn the language first. i highly recommend that learn python the hard way tutorial i linked to in my first post. its how i learned and what i send to anyone who wants to learn how to code.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2015-08-30 16:45:16 (edited by dhruv 2015-08-30 16:45:51)

Hello,
Learn Python The Hard Way might not be right for you. It assumes that the reader is a beginner, not only to Python, but to programming as well. While this may be right for some, I think, as steve has programmed before, it's probably not entirely right for him. May I recommend learning python with Mark lutz in stead? if you like lengthy, in-depth books, you can't have anything better than learning python.
Then again, if you like a quick and dirty introduction,
this is good

This is not a signature.

2015-09-02 08:09:30 (edited by Alan 2015-09-02 08:21:15)

I there!

Well, I am curious and like to experiment, so, after reading this discusion, I wondered: why so many people recommens python and not visual basic?It's a language that depens on iddentation, and last night I had a nightmare about debugging 1000 lines trying to figure out how many spaces and tabs are on each line smile
So, let's give visual basic a try.

The results? In 15-20 minutes I finished a rendering window (without using windows forms), a  basic gameloop, whitch accepts keyboard input, so if you press M, it shows a message from a string variable, and if you press C, the game closes.

It took 15-20 minutes (with pauses to research how to declare variables and include refferences, etc), and there are no more than 20-30 lines.

Note: I used sfml (an external media library), and tried to minimize .net framework elements.

It's my first experience with visual basic, so, my opinion is that you can use it to make games easily (though intelli-sense works much better with c#). If you know a bit of basic, even the old one, go ahead, it's easy and your way will be much more easy with all that previous knowledge.

Some advantages:
Visual basic has a good readability, no {}, no semicolons, and statements use some english words instead.
Fast and easy integration with .net framework (now open source).
A free accessible ide (visual studio community 2013, or 2015, though it still have some accessibility bugs).
Fast and easy windows form designer, etc.

I can post the  code here if anyone is interested. If someone could repeat the experiment using python we could compare results.

Have a nice day!

2015-09-02 19:05:24

post code please. if it is possible, please create a basic menu, and a start game option that lets you walk around on a little map. I don't doubt you I'm just curious as well as to what it is capable of. Because of the form designer I was thinking of building a small autosaving notepad in it with some basic tools on it like s quad word, but having forms makes it easier than it is in pure basic.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-02 20:17:51

Hi there,

Sorry, Steve, but as I said, visual basic is totally new for me and I have no time to code examples (anyway, my examples will not be more useful, my visual basic knowledge is near to 0).

THis is what I tried yesterday:
1. CCreates and shows a window.
2. Subscribe two methods to their events, and each method is declared below.
3. WHen you press m: displays a message.
4. when you press c, the application closes.
Please, note that this code could be buggy and probably a real visual basic developer will never forget me for doing this... thing.

You need references to sfml library on your project in order to make it work:

Imports SFML.System
Imports SFML.Window

Module MainModule
    Dim MainWindow As New Window(SFML.Window.VideoMode.DesktopMode, "Hello, world")
    Sub Main()
        AddHandler MainWindow.KeyPressed, AddressOf OnKeyPressedEvent
        AddHandler MainWindow.Closed, AddressOf OnClosedEvent
        MainWindow.Display()
        While True
            MainWindow.DispatchEvents()
        End While
    End Sub

    Public Sub OnClosedEvent(source As Object, e As EventArgs)
        MainWindow.Close()
    End Sub

    Public Sub OnKeyPressedEvent(source As Object, e As KeyEventArgs)
        Select Case e.Code
            Case Keyboard.Key.M
                MsgBox("Hello, world, again!")
            Case Keyboard.Key.C
                CloseWindow()
        End Select
    End Sub

End Module

2015-09-03 00:40:52

Replicated it in a few minutes using Pyglet/Python. Same function, opens window, M to post "hello world" text to screen, C to close.

import pyglet
from pyglet.window import key

class Example(pyglet.window.Window):
    def __init__(self):
        super(Example, self).__init__(640, 480, resizable=False, fullscreen=False, caption="Example")
        self.clear()

        self.key_input = []

        pyglet.clock.schedule_interval(self.update, .01)

    def update(self,dt):
        if 'M press' in self.key_input:
            pyglet.text.Label('hello world!',x=20,y=20).draw()

        if 'C press' in self.key_input:
            self.close()

        self.key_input = []

    def on_key_press(self,symbol,modifiers):
        self.key_input.append(key.symbol_string(symbol) + " press")

if __name__ == '__main__':
    window = Example()
    pyglet.app.run()
-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2015-09-03 02:21:53

Good job, magurp244, those comparisons are so useful (at least for me).

Thanks

2015-09-03 17:59:39

Let's see, just for craps and giggles, how we can replicate this in pure basic because that's my native language. xd.


initSprite()
initKeyboard()
openWindow(0, 0, 0, 0, 0, "Little hello world program.")
openWindowedScreen(0, 0, 0, 1000, 1000)
procedure AppMain()
messageRequester("hello", "hello dudes. press ok, and that will take you to the main loop. rofl.")
repeat
event = windowEvent()
examineKeyboard()
if KeyboardReleased(#pb_key_m)
messageRequester("hello", "hello again!")
endIf
if KeyboardReleased(#pb_key_c)
end
endIf
delay(5) ;that line isn't even really necessary for an app like this
until event = #pb_event_closeWindow
endProcedure
AppMain()

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-04 02:06:07

Interesting, first contact with pure basic... THanks.

2015-09-04 04:06:41

There are probably near 50 python libraries for making GUIs. Some more that have not been said are:
Kivy (for IOS, Android, Windows, OSX and Linux)
PyQt (For IOS, Android, Windows, Linux, OSX)
WXPython (for Windows, Linux and OSX)
panda3d (for Linux, Windows and OSX)
tkinter (Windows, OSX, Windows)
PySide (I'm not sure if you get IOS and Android, but for sure Windows, Linux and OSX)
Then what's been said before:
pyglet (Windows, OSX and Linux)
pygame (Windows, OSX and Linux)
PySDL1 and 2 (Windows, Linux and OSX)
Cocos2d (Not sure about IOS and Android, but for sure Windows, Linux and OSX)


I think part of the reason why people have not developed any audio games in python is that there are so many choices for libraries that is kind of over-whelming.

Here are my choices:
PyQt5 is probably the most versatile, but it is GPL and Qt Itself is LGPL. So if you would like to sell your game it will cost like $500 for a life-time license on the PC and I think $6000 for a life-time license for Qt and PyQt. (You only need the Qt Licence if you are going to bundle it as a single executable, I don't know if you can make an app that is several files on IOS)
On top of that, the documentation is kind of complex, the API is only in C++.
But there are standard widgets like buttons, edit boxes, combo boxes, menus and whatnot. There is also a web browser.

panda3d is just for Windows, Linux and OSX, but it is for games and is free. It is great, but does not have standard widgets and does not have a port to IOS. It is made for games though and the documentation is really good.

Both these libraries have both a C++ and python version.

Here is an example in panda3d:
from direct.showbase.ShowBase import ShowBase
from accessible_output import speech
spk = speech.Speaker().output

app = ShowBase()
app.accept('space', spk, ["Hello world"])
app.run()


Here is the same in PyQt5 (*note the above was using python2, the next is using python3, so accessible_output2 is used)

import sys
from PyQt5.QtWidgets import QApplication, QWidget
import accessible_output2.outputs.auto
spk = accessible_output2.outputs.auto.Auto().output

class Window(QWidget):
    def keyPressEvent(self, key):
        if key.text() == " ":
            spk("Hello world")

app = QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec_())

2015-09-04 11:19:32

Just curious, all of those libraries provide accessible GUIs? I mean, controls working well using a screen reader. Years ago, I tried some of them (though I cannot remember whitch ones) and usually I was not able to interact properly with the reated windows controls, due the fact that they wasn't using windows apis.

2015-09-04 17:37:02

For most games you don't really want a program to use Window's API.
PyQt uses Qt which uses IAccessible2
WXPython uses WXWidgets which uses native APIs on each OS (NVDA uses WXPython for example)

The others are just OpenGL contexts.
I wish there was some way to register your OpenGL Widgets easily to be native Widgets, but currently that has never been developed.

But just to give you an idea, I am pretty sure the only native element Swamp uses is the edit box you type in to talk to people on the channels.
Shades of Doom doesn't use any
Entombed only uses them if you wish to type in your character's name (I think)
and the only game thing that uses native UI elements is VIPMud (And there they only use multiline edit boxes, menuBar, Menu, OK Dialogue and single line edit fields.
It is way way way easier for libraries to use OpenGL and be cross-platform. Not that many games are cross-platform, so being able to say that you are is worth not having a couple UI Elements.
Also, panda3d's collision detection, solid state machines, built-in fmod and OpenAL support, AI library and web browser plugin (You can play panda 3d games in the web browser) make it more than useful for games.
Thus saying, I am using QT for now because I do want native UI Widgets and I would like to move to IOS sometime soon.