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

Topics - MrPlow

#261
Another loopy question...

Is there any occasion when looping through TYPES and you have a function eval like so...

hitv = hitthenemy(xx,yy,xxx,yyy,clan1,clan2)   

...if the current item is deleted how does that affect the returned value to the current item loop?


enemy 1 is moving and encounters enemy 2
    enemy 1 is using collision detection and fires a check to ensure that enemy 2 is an enemy and if so they fight.
         {fight resolved and enemy 1 (attacker) is killed  RETURN 2 ELSE RETURN 0}
We are now back in enemy 1 loop .. so is enemy 1 loop gone or instantly moved on?

I think writing this out gives me a possible solution...mark the unit as dead and clean up after the loop??

I'm sure others have had this issue before...




#262
hi

Does anyone know what might cause Windows game to hang when losing focus...

My game runs okay but if I alt tab away i cant get back in?

Could it be a looping or call subs issue?

My game uses a lot of TYPES and function calls.

rgds
G
#263
Hi Guys,

I have my first app nearly ready to go but need to know the following:

For Android (or iPhone):

1. Do i need to have checks for various screen resolutions or with 320x480 work as a standard and stretch?
   1b. If the case do I just using platforminfo and work away from there?

2.  Do I have to allow for landscape / portrait switching or is this an Apple-only requirement?

3. GLB v 11 - my Android compile is looking good - but the phone i am using is giving an "error parsing application" error when trying to run - gl_basic_debug.apk...ANY ideas?


Thks.
Gary
#264
Hi,

How should I go about doing countdown timer?
I can get a count up timer working using GETTIMERALL() but am scratching my head for a workable countdown with
hh:mm:ss format

Thks
Gary
#265
GLBasic - en / Polyvector
2012-Sep-02
Hi,

Can someone help explain a Polyvector and how to draw a basic shape like a rock..(5 - 6 sided object)
Plus how the collision detection would work for such a shape...

It would help me a lot! :nw:
#266
Hi, quick one today...

Does the use of Implicit declarations affect performance or compiling for any of the mobile platforms??

I tend to leave it until the end (after debugging) so would like to know if Android or iPhone expects it in any way?
#267
Hi

Back again...is there a way to use sprite collision without including the transparent backgrounds?

It truly is a box then which is not ideal.

MrPlow
#268
Hi

I have a rotating sprite and want to move it forward in the direction relative to the rotation of the sprite

So if it is pointing downleft have the acceleration begin from there...

Also want to accelerate the sprite slowly.

Is there an easy way to do this without mind-numbing math?
#269
Hi,

Can someone explain what i am doing wrong here...

I have 2 nested FOR loops
top is the shots fired existing on screen the second are the enemies to boxcoll against...

I can get the DIMDEL to work on the enemies but not the bullets and now getting array out of DIM array error

Code (glbasic) Select
FUNCTION checkhits:

FOR sh = 0 TO LEN(shots[])-1



FOR en = 0 TO LEN(invader[])-1

IF BOXCOLL(shots[sh].x,shots[sh].y,32,32,invader[en].x,invader[en].y,32,32)

DIMDEL invader[],en
DIMDEL shots[],sh

DEBUG sh
ENDIF

NEXT

NEXT



ENDFUNCTION
#270
Hi,
this may exist already somewhere in this vast forum but can someone provide a list of what is not allowed (commandwise) for Android and iPhone?

that way debugging would be easier and errors avoided...

e.g. Alpha-ing in android - yes or no?
if no then what is alternative...

Also for android all says it installed etc...but where would i see the app on the phone? Do i need to reboot the smartphone? or copy over manually...

Sorry, i have been away working/life commits and have come back with determination to crack my first smartphone app out sharpish!

#271
Hi,

I am surprised that I cant seem to find a full featured DDgui help guide.
I found a small one but that did not show good examples of usage etc...

It's so useful but not a lot of info on it...

#272
Hi

I am building a game and plan to port to iPhone...however the std res of iPhone is only 320 x 480 so this puts a lot of limits on what I am doing...

should i be bothered and just use the iPhone 4 resolution as my minimum or is the market for 320 x 480 too big to ignore at this stage??

G
#273
I am seeing that polyvector / newpolystrip can be useful and is used a lot but I dont yet fully understand what they are good for.
Are they for drawing only or other uses also...

#274
Hi,

I will be looking to do this shortly and wondered if there was a simple enough approach to making a scrolling screen containing a lot of sprite objects.

I could have the screen reset and show a new screen when the main sprite hits the borders but I want a smooth scrolling screen if possible...

Would I have to iterate thru the sprite x,y coords and update to simulate a scrolling effect?
I think this method would be heavy on CPU and cause a bad flicker.

Any other ideas?

G
#275
Hi,

I have a screen divided in to 16x16 sections

Using for loops that are stepped by 16 from 1 to 800 and 1 to 512 (high)

An array of an objects is placed within the confines of the grid by a measure of 16x16 squares or a multiple of the same...

But the item I move around the screen (also 16x16) is not flush with some sections of the sprite array and every second section of the grid is out or incorrectly...any ideas??

Code (glbasic) Select
FUNCTION hitobject: xx,yy

FOREACH w IN waters[]

IF BOXCOLL(xx,yy,16,16,w.wx,w.wy,w.width,w.height) THEN RETURN 1
NEXT


ENDFUNCTION



#276
GLBasic - en / Collisions
2011-Nov-03
Hi,

I have a problem with my collision detections...

I have code (not at hand right now...) written that looks for box collision item against an array of items ... by iterating through screen section in blocks of 16 pxls

When it finds the item the collision should revert back to pre position and then validate that the 32 pixels of either side of the 32 px box is collision free before continuing....

Hope i made myself clear...

I expect that using array objects is the only collision method and that useasbmp and current pixel colouring cannot be checked to provide an alternative?

Checking the colour of pixels as test would be a nice way based on the useasbmp so that 100s of arrays do not need to be examined...

G.