Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Bursar

#1
No difference I'm afraid - just tried it with IE and FF, and hit shift-refresh to ensure I didn't have a cached copy of the page.
#2
I'm also getting German when trying to buy GLB via PayPal. I'm the UK and have tried both IE and FireFox.

Doesn't matter - installed Chrome and used that to translate the page into English :)
#3
Yes, the array is big enough, it's been sized for 256 entries, and entries after that one are fine.

I've just deleted the line and retyped it, and now it's working. I wonder if maybe some odd invisible characters had got stuck onto the line, as it was part of a copy and paste operation. Before that, none of the suggestions were working either, and when I replaced "//" with "a", that also caused my game to exit out immediately. Very odd.

Anyway, problem solved for the time being :)
#4
In my code I have:
Code (glbasic) Select
gkeyDesc$[86] = "\\"
It causes my app to close down as soon as it gets to that line. If I comment out that line, it works fine.
The same happens if I use "\"" to try and get a quote symbol into a string.

Using a single \ I get a syntax error when trying to compile. Am I making another school boy error?
#5
Can you post the code that loads the sounds you're trying play?
#6
Quote from: garyk1968 on 2010-Oct-01
I had some spare time at the start of the year so jumped into iphone development and have done 4 apps now mainly in spare time whilst doing a day job *and* with a family.
Without wishing to be too nosey, how have those apps done finacially? Have they basically given you a bit of beer money, or have they brought in a reasonable amount of cash?
#7
Sub folders do work, but I suspect that the wav file is in the wrong format. GLB seems to be rather picky about the settings. Try opening them with Audacity and changing them to 16bit files and resaving.
#8
Quote from: shawnus on 2010-Sep-30
Do you think its possible for just one person to develop, release, market & maintain successful PC game?

I can see how one developer could develop a hit app game & make it big, but games for the PC are just so big in scope & attention to detail that I'd suggest its physically very dificult/impossible for one person to develop a hit PC game within an acceptable timeframe.

I just remember playing Quake back in '97 and thinking at the time- there is no way I could do this, the scope is just too big. At the same time if you are spending £20 on a game this is the type of game I would expect for my money.

Cheers, Shawnus

But now though, you could get a copy of FPSCreator for free and knock up a game that (graphically) blows Quake out of the water. Development tools have come a long way in a relatively short space of time. You just need the time/skill to do all of the coding/modeling/art/music/effects yourself, or some cash to farm out some of those jobs.
#9
If you've got no bills, go for it :) Otherwise you might be best served by keeping the day job and coding as much/often as you can in the evenings. Maybe sign up for programming courses if you think they'll help you along.

Get a few games up in the various app stores, or online games portals and see where you go from there.

Are there plenty of jobs available for both what you currently do (tech), and what you might want to do (dev)? If not, then if the game dev thing doesn't work out and you need to earn some money, finding another could be tough.
#10
Excellent, glad you're making progress :)

Hat: I thought about mentioning a physics engine as well, but didn't want to complicate things.
#11
Here's the code for my player update function from Glowing Rocks from Outer Space - an Asteroids clone:
Code (glbasic) Select

// left and right arrow to rotate
IF KEY(203) THEN DEC player.angle, player.rotationSpeed
IF KEY(205) THEN INC player.angle, player.rotationSpeed

// keep angle within bounds
IF player.angle > 360 THEN DEC player.angle, 360
IF player.angle < 0 THEN INC player.angle, 360

// up arrow to thrust
IF KEY(200)
// calculate angle to thrust at
player.vectorX = COS(player.angle)*acceleration
player.vectorY = SIN(player.angle)*acceleration

// add new direction vector to current velocities
player.velocityX = player.velocityX + player.vectorX
player.velocityY = player.velocityY + player.vectorY
ELSE
// apply friction to slow down
player.velocityX = player.velocityX/friction
player.velocityY = player.velocityY/friction
ENDIF

// cap maximum spped
IF player.velocityX > topSpeed THEN player.velocityX = topSpeed
IF player.velocityY > topSpeed THEN player.velocityY = topSpeed
IF player.velocityX < -topSpeed THEN player.velocityX = -topSpeed
IF player.velocityY < -topSpeed THEN player.velocityY = -topSpeed

// update player position
player.x=player.x+player.velocityX
player.y=player.y+player.velocityY


As you can see, the left and right arrow keys change the angle of the ship, but in your case you will need to do this by calculating reflections and bounce angles as the ball hits objects on the pinball table.

The up arrow gives a fixed amount of thrust (acceleration = 0.1) and that's fed into the player vectors (which works out how much of the thrust is in the X direction, and how much is in Y).

If the player isn't thrusting, then the velocity is reduced by the friction amount (friction = 1.0045).

Finally I cap the player speed so the ship doesn't go to fast, and then I update its X and Y postions ready for drawing.

The complete source code is available here if you want to see how it all works together.

Hope it helps a bit :)
#12
Ah yes, the pathing thing fixes it. Thanks :)

Quote from: MrTAToad on 2010-Sep-28
Oh, and the only command that can initialise variables is RGB
That's a change which needs to be made to the help file then, as it states:
Code (glbasic) Select

GLOBAL gImgFoo = GENSPRITE(); LOADSPRITE "foo.png", gImgFoo
GLOBAL gImgBar = GENSPRITE(); LOADSPRITE "bar.png", gImgBar
DRAWSPRITE gImgFoo,0,0
DRAWSPRITE gImgBar,0,100
SHOWSCREEN
MOUSEWAIT
#13
Nope, doesn't work. Both still print 0.

In fact, if I do this:
Code (glbasic) Select

GLOBAL screenGrab = 1
screenGrab = GENSPRITE()
LOADSPRITE "/Menu/outer.png", screenGrab

GLOBAL menuPointerSprite = 2
menuPointerSprite = GENSPRITE()
LOADSPRITE "/Menu/pointer.png", menuPointerSprite

PRINT screenGrab, 10,10
PRINT menuPointerSprite, 10,20


It still prints 0 for both sprite numbers, so GENSPRITE isn't actually working.
#14
I'm trying to use GENSPRITE() to make assigning numbers to sprites easier, but it just crashes my game.

If I do this:
Code (glbasic) Select

GLOBAL menuPointerSprite = GENSPRITE()
LOADSPRITE "/Menu/pointer.png", menuPointerSprite

As indicated in the help file, the game compiles correctly, but when it runs I just get the spiny circle icon, and my app never appears. I have to go into Task Manager and kill it off.

I've also tried this:
Code (glbasic) Select

GLOBAL menuPointerSprite = 0
menuPointerSprite = GENSPRITE()
LOADSPRITE "/Menu/pointer.png", menuPointerSprite

My game compiles and runs, but it always assigns 0 to menuPointerSprite.

For instance:
Code (glbasic) Select

GLOBAL screenGrab = 0
screenGrab = GENSPRITE()

GLOBAL menuPointerSprite = 0
menuPointerSprite = GENSPRITE()
LOADSPRITE "/Menu/pointer.png", menuPointerSprite

PRINT screenGrab, 10,10
PRINT menuPointerSprite, 10,20

Shows me that both screenGrab and menuPointerSprite are equal to 0. I don't think I'm doing anything wrong (famous last words!)...

This is running under Windows 7 Ultimate, 64bit.
#15
Is it a simple on/off toggle for everything, or can you set it to false, draw some stuff, set it true draw some more stuff, and have some sprites smooth, and some not?