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.


Messages - Dabz

Pages: 1 [2] 3 4 ... 7
16
GLBasic - en / Re: Coliision Point
« on: 2011-Oct-04 »
Generally, I use array checking for collisions, so, if the ball is at ballX and ballY, I do something like this (Blitz p-code as it uses bit shifting commands Shl and Shr, in GLBasic, you can do the same in INLINE blocks using << or >>):-

Local bx:Int = ballX Shr 5              'If the tiles are 32x32, also, we'll assume the handle to the ball is at the centre
Local by:Int = ballY Shr 5              'Also, this assumes the tilemap is located top left of the screen, with no offsets.

Check centre of the ball, which, you wont really do, but, as an example I'll do something like (Note: No boundary checking either):-

If tileMap[bx,by] = WALL_TILE
' Do something
Endif

Now, what I do, is change that to cover points on the outside edge of the ball, say, 8 points, then, do something like:-

If tileMap[((ballX-15) Shr 5),ballY Shr 5] = WALL_TILE    <------ Check left edge of ball
If tileMap[((ballX+15) Shr 5),ballY Shr 5] = WALL_TILE    <------ Check right edge of ball
If tileMap[ballX Shr 5,((ballY-15) Shr 5)] = WALL_TILE    <------ Check top edge of ball
If tileMap[ballX-15 Shr 5),((ballY+15) Shr 5)] = WALL_TILE    <------ Check bottom edge of ball
etc
etc
etc

You can then use SlyDogs flag way to handle which points are to be used to check collisions, because obviously, if your going left, there's no need to check anything on the right, and vice versa.

People tend to take the water that I use bitshifting, and they try to ram that modern computers can cope to multiplication and division, as in X * 32 or X / 32, but, I've used bitshifting since 8bit, its never failed me, its a cheap optimization that doesn't do any harm, and as such, the above is the exact same way I built my Croco remake here:-

http://www.denathorn-games.net/?page_id=73

Hope that helps! :)

Dabz

17
Quote
What is it for the Caanoo

Code: GLBasic [Select]
?IFDEF AHOY_THERE_ME_LAND_LOVERS
?WARNING Compiling for WHATEVER
?ENDIF
 

Sorry! :D

*Dabz gets his coat*

Dabz

18
Off Topic / Re: eBay fraud
« on: 2011-Aug-26 »
This "sorta" happened to me only a few weeks ago... Not exactly, but related I think.

Basically, I love a game of golf, now, I'm not the best, float around the 100 mark give or take a few, anyway, because I'm not that good, occasionally, the ball just goes where it wants, be it in a pond, in a bit of rough, or out of the course completely... So, I do buy quite a few golf balls... But, I don't like the cheap and nasty ones, so, one day I was looking at the yellow paper (local ad paper), and spotted an advert for 30 titleist pro balls for £15, I thought "Oh, that sounds just the job"

So I rung the number and a bloke answered, I said I was interested in the golf balls he was advertising, and he replied "Yeah, about that, I havent actually got them, but, I'm walking around Grange Villa now [a local course], is there any chance I can ring you back when I find them?"

I just hung up!

Dabz

19
Announcements / Re: First paycheque from Palm
« on: 2011-Aug-20 »
Congrats there Kitty! :)

Right, I'll have a pint of Carling if your getting the round in! ;)

Dabz

20
Just saw this in the App Store thread.... This looks great, and a brilliant idea! :)

Top job!

Dabz

21
Beta Tests / Re: Android - Beta SDK
« on: 2011-May-04 »
Wow, nice update... Good work Kitty! :D

Dabz

22
GLBasic - en / Re: iphone compile error
« on: 2011-May-04 »
Defo something gone well boobs up!?!

When you build for iOS, there's defo no error message regarding the libProgram.a, because when I hit the issue through VM, it 'built' the iOS project fine, but, in the output pane, I happened to scroll up and there it was, something like "Could not output libProgram.a"

You've probably checked, and I know you've mentioned it, I'm just mentioning it that's all because thats how I missed it as I thought all was well too.

If there's nothing in the output pane... At all, then... I dunno!?!

EDIT: You are trying to run this on an actual device, as GLBasic apps dont graft in the simulator.

Dabz

23
GLBasic - en / Re: iphone compile error
« on: 2011-May-03 »
If your using the IDE through a Win VM, you need to make sure you map your shared folders to a drive letter, then open your GLBasic project through that... Otherwise, the libProgram.a file will not be created in the outputted xCode project folder.

If your using a full and unVM'd install of Windows, then, erm, dunno?

Dabz

24
Beta Tests / Re: Android - Beta SDK
« on: 2011-May-03 »
Quote
Now how does that explain the why there's no colour on the emulator

As far as I know, anything the emulator spits out shouldnt be taken as gospel, also, GLBasic isnt the only software I've used for Android that goes a little wobbly in the emulator, Libgdx suffers from quiffiness too, but, as far as I can see, both work fine (Within reason for GLBasic as its in beta) on an actual device.

Dabz

25
Ah, these look familiar, the last time I saw these was in The Bloobles? :)

Great work, and very generous of you for releasing them! :)

Dabz

26
Quote
At least with the emulator I will be able to try it on without having to pay for the device and an app-dev account first...

Unlike iOS, you only need to buy a dev license ($25) when you want to upload your app to the market place, Google doesnt stop you from running your app on a device like Apple does, as well as you dont even need to be on the market place, you can distribute your app how you like.

Though, there are a couple of warnings with Android dev...

Its prone to piracy, one coder I know who wrote a live wallpaper and was selling it for $1 (59p) ended up having his work dumped on the pirate pages... Which was a shame!

Another is Android users are prone to the auld "Buy it... Play it... Refund it" syndrome, not exactly sure if Google knocked that head, but where Apples policy is one refund I think, the last time I checked, Google allowed users to have unlimited refunds.

Dabz

27
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-27 »
Quote
MP3 music didn't play but WAV sound fx are fine (as noted above I believe).

I've had a report back from my test build of Nags that I've distributed that sound (PlaySound) doesnt work on LG Optimus One phones.... Their probably the best reasonably priced half decent ones you can get I think, which, I think will make them popular.

Also, is there a chance the two media volume control keys at the edge of devices can be mapped, or if they are, what do they fall under?

Dabz

28
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-25 »
Quote
can take a while

I've found first load takes some doing, but afterwards,the app loads pretty quickly..

29
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-25 »
Quote
Got it compiling now!  Turns out a new project had to be created - the one I was using (a V8 one) didn't have all the needed details...



:)

Seriously, I'm pleased you got it working MR T! <----- I aint going on no areoplane! :P Hehehe

Dabz

30
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-25 »
My AndroidManifest.xml file:-

Code: GLBasic [Select]

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.denathorngames.nagsheeddarts"
      android:versionCode="1"
      android:versionName="1.0">
          <supports-screens android:resizeable="false"
                  android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="true"
                  android:anyDensity="false" />
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
        <uses-permission android:name="android.permission.INTERNET" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="true">
        <activity android:name="org.libsdl.app.SDLActivity" android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
 

Though, please note, I've added the section:-

Code: GLBasic [Select]
<supports-screens android:resizeable="false"
                  android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="true"
                  android:anyDensity="false" />
 

Manually!

Dabz

Pages: 1 [2] 3 4 ... 7