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

#361
Some issues still occur, pmed with info... Btw when advert banner is shown? Because I didn't see it, only played briefly for testing those changes.
#362
Honestly I forgot about SaveSprite.. And I made this for testing purposes / as exercise, then I looked into help file, saw SaveSprite and just  :giveup: :D  But since it's already done, so why not to share, maybe someone will need something like this. :-)
#363
SAVESPRITE is great, but if you would need to do some transformations like mirroring, grayscale, disable one channel, add filtering or whatever, this code can be handy:

Code (glbasic) Select
//offscreen sprite to BMP saving function
//answers from this topic were useful: http://stackoverflow.com/questions/2654480/writing-bmp-image-in-pure-c-c-without-other-libraries
//by dreamerman[at]wp[dot]pl
FUNCTION save_offscreen_bmp%: sprite_id%, file_name$
    LOCAL swidth%, sheight%, pixel_data%[]
    LOCAL extrabytes%, paddedSize%, filesize%, i1%, i2%, pos%, cx%, cy%
       
       
    GETSPRITESIZE sprite_id%, swidth%, sheight%
    extrabytes% = 4 - MOD((swidth% * 3), 4)
    IF (extrabytes% = 4) THEN extrabytes% = 0
    paddedSize% = (swidth% * 3 + extrabytes%) * sheight%
    filesize% = paddedSize% + 54
    SPRITE2MEM(pixel_data%[], sprite_id%)

   
   
    INLINE
        unsigned char bmp_cache[filesize];
//bmp header info       
// = {66,77, 0,0,0,0, 0,0, 0,0, 54,0,0,0, 40,0,0,0, 0,0,0,0, 0,0,0,0, 1,0, 24,0, 0,0,0,0, 0,0,0,0, 0x13,0x0B,0,0, 0x13,0x0B,0,0, 0,0,0,0, 0,0,0,0};
        for(i1=0;i1<54;i1++) {
            bmp_cache[i1] = 0;
        }
        bmp_cache[0] = 66;
        bmp_cache[1] = 77;
        bmp_cache[2] = (unsigned char)(filesize);
        bmp_cache[3] = (unsigned char)(filesize >> 8);
        bmp_cache[4] = (unsigned char)(filesize >> 16);
        bmp_cache[5] = (unsigned char)(filesize >> 24);
        bmp_cache[10] = 54;
        bmp_cache[14] = 40;
        bmp_cache[18] = (unsigned char)(swidth);
        bmp_cache[19] = (unsigned char)(swidth >> 8);
        bmp_cache[20] = (unsigned char)(swidth >> 16);
        bmp_cache[21] = (unsigned char)(swidth >> 24);
        bmp_cache[22] = (unsigned char)(sheight);
        bmp_cache[23] = (unsigned char)(sheight >> 8);
        bmp_cache[24] = (unsigned char)(sheight >> 16);
        bmp_cache[25] = (unsigned char)(sheight >> 24);
        bmp_cache[26] = 1;
        bmp_cache[28] = 24;
        bmp_cache[34] = (unsigned char)(paddedSize);
        bmp_cache[35] = (unsigned char)(paddedSize >> 8);
        bmp_cache[36] = (unsigned char)(paddedSize >> 16);
        bmp_cache[37] = (unsigned char)(paddedSize >> 24);
        bmp_cache[38] = 19;
        bmp_cache[39] = 11;
        bmp_cache[42] = 19;
        bmp_cache[43] = 11;
       
        int col;
        char cr, cg, cb;
        pos = 54;
        for(cy=sheight-1;cy>=0;cy--) {
            for(cx=0;cx<swidth;cx++) {
                col = pixel_data(cy * swidth + cx);
                cb = (col & 0x00FF0000) >> 16;
                cg = (col & 0x0000FF00) >> 8;
                cr = (col & 0x000000FF);
                bmp_cache[pos] = cb;
                bmp_cache[pos+1] = cg;
                bmp_cache[pos+2] = cr;
                pos+=3;
            }
            if(extrabytes) {
                for(i1=0;i1<=extrabytes;i1++) {
                    bmp_cache[pos+i1] = 0;
                }
                pos+=extrabytes;
            }
        }
       
        FILE * myfile;
        myfile = fopen(file_name_Str, "wb");
        fwrite(bmp_cache, 1, filesize, myfile);
        fclose(myfile);
    ENDINLINE   
   
   
ENDFUNCTION


As this function uses INLINE, remember to attach also this:
Code (glbasic) Select
INLINE
        }
                extern "C" {
                        #include <cstdio>
                }
        namespace __GLBASIC__ {
ENDINLINE


#364
lol. I forgot that there is SAVESPRITE function... :> with 'autopause false', it will save your offscreen sprite even when app is minimized.
Code (glbasic) Select
USESCREEN
//draw you stuff
SAVESPRITE

Spacefractal  generally yes, gpu doesn't draw when not needed but using USESCREEN you force it to render on sprite, you can of course do real size screenshots for iPad (on deskop pc), all depends how your gui stuff works, it's same as above, render game in iPad resolution to offscreen sprite, save it, rescale it down to pc resolution and draw on backbuffer to be able to play and gather screens from other game parts.
#365
You can always code some workaround, let say sprite to bmp function. Render backbuffer on sprite, use Sprite2Mem, then just loop through pixels and store them in plain file, add BMP format headers and done.
Normal 24bit bmp without RLE compression is pretty simple to create.
#366
Some network commands were changed in latest patch to support IPv6, e.g. GetHostIP, take a look at webdoc / help file. Maybe that's the issue.
#367
Just sent some thoughts on pm. Beside that what that update will contain?
Initially I was thinking that controlling units will be done by taping tile/place when I want to move them, this is more like oldschool approach but for me feels like it's slowing down pace of game, especially with fps some UI problems. Maybe it will feel different where those issues will be fixed.
#368
Quote from: MrPlow on 2016-Aug-28So do you mean jetman flies up / down faster with touching screen? and falling without touch is smoother?
Hm, maybe up/down move with touching isn't faster but some kind of choppy, just like it was skipping some pixels during movement, because falling is very smooth. Due that, it was better to control it like in flappy games. Maybe on devices with smaller screen or higher resolution it's less visible / harder to notice.

Generally I would say that such low res retro pixel games plays much better on lower size screens as just even on 7'' those pixels feels strange if you know what I mean :D resolution is kind of limit here, and such side scrolling shooters aren't my favorite game genre.
But playing on mobile phone, with some power-ups and other stuff like this this may be interesting little game ;)
#369
Hardware: 7'' 800x480 tablet, single core, 512MB Ram, Vivante GC800 gpu.
It looks that game works smoothly (but no fps info so can't say exactly), no hiccups, touch controls working properly, music/sound also, loading time 4-5sec.

btw. I thought that player ship will fly automatically, but this is also good idea, some kind of like in 'flappy' games, but there is one thing: when steering by touch and moving ship upwards, it look that he is moving by larger amount of pixels, when not touching 'analog stick' area, the ship is falling down much more fluently, really per-pixel, if same would happen with normal steering it would look better.
Top score 360pts, after killing lvl boss can't go forward, only left to level start. Nice gfx, and music ;)
#370
Still need some post to get access to bonus part of forum, so then I will test in on old budget tablet ;]
#371
@MrTAToad
That quite nice idea for a small logical game, but I think that you need better/more detailed graphics, now game look's like made in some rapid app-development tool (specially GUI). And you know how they say, first impression matters.


@spacefractal
About sales, does number from steamspy.com are quite valid? It's still good for a start.
Did you tried some promotion on your own hand? e.g. like putting few game giveaways on steamgifts.com site?
#372
Yeah that strange, as I don't change char code of what user is typing.. This needs further investigation ;-) Win 8.1 gives really strange output with Deutsch keyboard layout, even @ becomes ", maybe some additional Scintilla setting is needed for this.
btw. this update fixes small issues with auto-completion..

Edit: problem with brackets appears in many text editors (all ScintillaNet, and even other .Net based text editors examples) that I have tested, also system notepad/VisualStudio behave same way with German/Deutschland key layout.
#373
You mean system keyboard settings? Interesting, not sure if it's my code fault, Polish keyboard works properly, even special chars. (btw. this version of ScintillaNET supports unicode chars)
Ah such small things, will be 'read-only' with next update ;)

Edit: skipping unchanged files during compilation was broken in last update, fixed.
#374
Announcements / Re: Update
2016-Aug-18
Great :)
It looks that some other commands were also changed
Code (glbasic) Select
remote_ip% = SOCK_GETIP(server$)
is now
ip_binary$ = SOCK_GETHOSTIP$(server$)

previously with IPv4 it was returning 32-bit integer, so now to support IPv6 it's basically returning same but as string? (and it goes to all other SOCK_ command that needed that argument e.g. SOCK_UDPSEND)
#375
hm.. it look's like issue with dynamically typing to short/empty type members, still not all functions were checked for that. Will look into this later, that should be easy to fix.
If you will encounter any other bug most important is this:
Code (glbasic) Select
Parametername: startIndex
   bei System.String.Substring(Int32 startIndex, Int32 length)
   bei WindowsApplication1.Form1.GetShortftsName(String fts_name) in D:\projekty\glb_ide_vb_2013\Form1.vb:Zeile 3148.

As it tells where exactly is the error and what of kind, other lines are unnecessary :-)

Second problem is strange, didn't see that earlier and in today's testing I was using them '[]' to check array/type auto-completion, try switching to other file and back again.

Edit: yes that was bug with parsing empty lines in newly added code tracking functions, it's ok now. Can't reproduce issue with brackets as here they are working correctly. Only binary update, source will follow with next update as I will slowly check for similar issues in other functions.