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 - Falstaff

#136
Crivens, do you have a link to the routine you are referring to? I just did a search for posts by your username and couldn't find it..

ampos, yeah that code works fine on my computer as well, but still doesn't show anything on my android :/ just the "SMALL TEXT" PRINT output to the backbuffer, nothing to the virtual screen shows up. Not sure why, pretty frustrating though..!

This tablet seems to be kinda buggy though, maybe it's something to do with the new TEGRA 2 processor it has, or the drivers for it or something.. For example the little time trial nag thing that shows up only shows a white rectangle with a little time bar under it, no actual log inside the rectangle.. some apps I've downloaded just crash, etc.. I may end up returning it and trying with another one.. Ideally my game code would work on all android devices though of course..!
#137
Oh ok so the extension thing is irrelevant, well then I'm really not sure why this won't work on my device.

I attached my current example code I'm playing around with. It basically calls CREATESCREEN 1 and USESCREEN 1 to work with a virtual screen buffer, and draws a rectangle the size of the original resolution (320x480) to this buffer, and then uses POLYVECTOR to draw this virtual buffer to the back buffer.

I even tried doing a DRAWSPRITE after, which of course simply draws the un-scaled rectangle. Then did a PRINT and a RECT for good measure.

On my laptop it works fine, you see the scaled source rectangle filling the whole window, along with the DRAWSPRITE'd smaller rectangle on top, and finally the word "TESTING" printed in the corner, along with a little rectangle I draw with RECT.

On my android device, all I see are the PRINT and the RECT. Trying to draw the sprite I created with CREATESCREEN seems to not really be doing anything.

Is there anything I'm doing wrong in the code? It's basically what ampos provided, updated with some globals instead of hard-coded numbers.

[attachment deleted by admin]
#138
Hm.. well I've gotten your code working again under windows, but it won't work on my device..!  :noggin:

After reviewing the glbasic docs for CREATESCREEN I see this note:
QuoteGLBasic uses the OpenGL extension GL_EXT_framebuffer_object for real OpenGL implementations. This extension can cause trouble on some (generally rather old) systems. In this instance, GLBasic will still provide the CREATESCREEN functionality however it may become slow and the screen size might be limited to the physical window size.

Use PLATFORMINFO$("GLEXT:glBindFramebufferEXT") to check whether your card supports the fast version - it will return 1 if it is supported.

When I check that platforminfo command, I see that my windows laptop returns TRUE, but my tablet returns FALSE :(
"it might be slow and limited to the physical window size"
[edit]
Just tried it out again with a CREATESCREEN command set to the physical window size, still won't show anything on my tablet.. seems like CREATESCREEN doesn't work at all..! bah
[/edit]
well then.... not too sure what I should do.. this is a brand new tablet sporting the latest version of the OS and everything, why would this extension be unsupported?

Are there any alternatives to scaling that don't use CREATESCREEN? I guess my only option is to actually scale all of the individual drawing commands I do, and keep drawing to the backbuffer.. hrm.. sounds like a pain but I guess not sure what else I can do.. I wonder if this is the norm for anyone else?
#139
Hello, I was noticing when I run my Android game that there is a little white rectangle that fades into view in the top left corner of my app every few seconds. Is this just some sort of "trial demo" nag thing? Does it go away when you have a licensed copy of glbasic? I'm looking to pick up a license soon but am curious about this!
#140
I have been trying to work on implementing the scaling code ampos has so graciously provided, and seem to have it working under windows. For some reason it won't work when I try to test the app out on my tablet :/ It's almost as if it's an issue with the USESCREEN command maybe? It looks like the sprite I'm drawing to with USESCREEN 1 doesn't have anything when I draw it to the back buffer using USESCREEN -1. I basically just get a black screen. I can for example print text to screen -1 (the backbuffer) and it shows up fine.

I have included a simple demo project that tries to scale a screen of 320x480 to your android's resolution. It simply tries to draw a rectangle for the screen size to show the screen border, which then gets scaled up to whatever size the app's resolution is run in.

Again, this seems to work fine under windows (which in the sample project scales up to a window sized 480 x 720), but not on my asus eeepad transformer. Anyone able to test this on another device? Any ideas what could be going on here?

[attachment deleted by admin]
#141
If you can get your emulator running (it may take a *long* time to boot, mine does), it should show up as a connected android device. Once you have a device connected, just doing a build for android should make it automatically install onto your connected device(/emulator). You can of course alternatively connect a phone/tablet and it would install onto it too.

You can check your recognized connected devices with the command "adb devices". You need your environment paths setup right of course, I think that's a command from the androidsdk tools directory. The emulator should show up after it's finished booting up.

Also if/when you get a real device, be sure to install whatever drivers are relevant before you connect the device. I didn't do that before hooking up my asus transformer and it wouldn't recognize to adb (or glbasic) until I found an app to remove usb drivers.. annoying.
#142
Hello!

So I am still happily working away on my first glbasic game with an artist friend of mine. Although we're targeting iOS and Android, I've only just picked up an android device (tablet!) to test with. We've been testing on windows so far.

We are currently using 32x32 sprites for our main puzzle pieces, and have been testing under windows with the project settings set to the resolution 320x480. My tablet has a resolution of 1280x800. When I try to run my app on my tablet, this results in it taking up a tiny 320x480 part of the screen. I've attached a pic to show what I mean ;p

Anyway, I was sort of under the impression that somehow things would scale up on the device. I get the feeling I may have to do that myself? I am new to android development but I know there's an AndroidManifest.xml that seems to hold certain relevant settings for the project in terms of scaling. As far as I can tell though GLBasic generates all those platform-specific files for me while doing the build->multiplatform process. I'm not really sure how to change that file and have GLBasic pick up the new changes.

Does anyone have suggestions?

Thanks in advance..!

[attachment deleted by admin]
#143
this is *such* good news, wow!

So does this mean that a person can do *everything* from within windows for this? Or just compile/test? Like can we go from start->published on the app store all without a mac?

Maybe I won't have to buy a mac mini after all :) Hmmm... maybe I'll buy an android tablet instead, so I can test for that platform! This is so exciting!
#144
ohh! Great thanks, I'm glad it was something so simple.  :booze:

I actually have a similar fading out effect used elsewhere in code, but this is great to be able to do stuff on the source image side of things too :)
#145
Hello!

My artist and I have been looking at defining our workflow for having animations in our game which include transparency. The effect we're trying to make is an animated cloud that fades away in the later frames of the animation.

I have attached a sample demo project which includes a test.png file provided by my artist. When I open it up in GIMP it looks like it's fading away in there (ie I can see the checker background layer showing through), so that looks fine.. but when I load the image up as an animation in GLBasic, it doesn't seem to show the same transparency. Instead it looks like only the background of the sprite is transparent, but the actual image data in each frame is fully visible.

The code itself is very basic, pretty much just LOADANIM and DRAWANIM

I realize it's possible to use ALPHAMODE in GLB to draw a whole frame with transparency, but I'm wondering if there's some way to be able to use the alpha channel of the .png to have different levels of transparency within a single animation frame? Is this possible? Is there something wrong with the source image?

Thanks in advance!

[attachment deleted by admin]
#146
hmm.. this would be pretty amazing. I'm actually looking at picking up a mac mini sometime in the next couple weeks as I near completion on my first game. It would be incredible if I didn't have to, and could just do everything from my windows laptop!

I wonder how long it would take for this dream to become a reality?
#147
Oh ok, my best guess is it has something to do with function/sub code-folding. Thanks for the quick response K.H.!

matchy thanks for the tip! I actually just started to look at re-factoring my animation code to a separate source file, so I'll be able to do as you say immediately :)
#148
Hello everyone, I'm new to GLBasic and am working on my first game with it. I've been poking around with the IDE and am generally getting a feel for it.

One thing I wonder though is.. how come if I click on a sub/function on the jumpbar area in the right, it only sometimes takes me where I want to go? For example, right now I'm clicking on 1 function and it takes me there fine.. but when I click the one underneath, it only drops me a few lines lower. I end up still in the first function! It ends up feeling weird trying to jump around in my code.

Anyone else see this?