|
fog
|
 |
« Reply #1335 on: April 26, 2012, 07:47:06 PM » |
|
wow that sorta sucks not to have read int working . i suppose its for bin files only then.
That's what I thought, but I've read all the docs now and nowhere does it say that's the case. I'm going to do a test and see if there's something funky wrong with my code. Unlikely as it's just wrapping the AGk commands, but you never know. An apology might be in order lol 
|
|
|
|
|
Logged
|
|
|
|
|
T_M_C
|
 |
« Reply #1336 on: April 26, 2012, 09:14:39 PM » |
|
As i understand it.
Everything saved in Notepad are strings. Even numbers. So you would have to read back as strings and convert. ( which is what i have had to do also in Blitz )
Reading back notepad files as anything other than strings i would expect to be garbage.
The AGK system sounds pretty much like Blitzmax.
With Blitzmax you have
readbyte , readint , readfloat , readline savebyte , saveint , savefloat , saveline
And you open and close a stream as the file to read/write to.
TMC
|
|
|
|
« Last Edit: April 26, 2012, 10:39:10 PM by The_Masked_Coder »
|
Logged
|
|
|
|
|
Prime_8
|
 |
« Reply #1337 on: April 27, 2012, 02:53:23 AM » |
|
yeah , i would not expect an overloaded version of the command .
seems pretty standard .. i dont recall what basic (dbp?) would read an int from bin or text just the same . i know it was not PB
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1338 on: April 27, 2012, 04:49:40 PM » |
|
As i understand it.
Everything saved in Notepad are strings. Even numbers. So you would have to read back as strings and convert. ( which is what i have had to do also in Blitz )
Yeah that seems to be the case I never realised that about Notepad and strings and I've been reading from those files for years. I've just seen an explanation to one of my other file reading problems that was further confusing matters. Reading in as a string and then trying to convert to a float doesn't work because of a bug in AGK's Val() command.  Fixed in next release apparently.
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1339 on: April 28, 2012, 04:26:08 PM » |
|
Got my Bit Font working with my Generator code now so I can write symbols or messages on screen using any of my particle emitters. Looks decent  Next, now that I have my file reading bugs fixed, I can finally write some loading routines for a bunch of things so I don't have to keep hard coding all my game data.
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1340 on: April 29, 2012, 09:39:21 AM » |
|
Well I was going to write a bunch of file loading routines, but I'll hold off doing that until the Val() bug in AGK is fixed. I don't want to waste any more time debugging my own File code until I know the AGK side of things is ok.
Next on my list, as mentioned earlier, was to rewrite my Tracker code. Now, rather than store and playback a sequence of sounds, it stores a sequence of Generators. My Generators are used to trigger sounds, particle FX, camera FX and screen FX so no I can record a whole lightshow and play it back.
The Generators can also be used to create any game entities such as enemies so in theory I could use my Tracker to store and playback generate enemy attack waves.
Now to make all that play nice with my Generator LOD code. Each Generator has a LOD value which is used to define whether a Generator is activated or not on the current platform. So on fast devices I can have huge particle effects, but on slower mobile devices it automatically creates smaller, less demanding effects.
|
|
|
|
|
Logged
|
|
|
|
|
T_M_C
|
 |
« Reply #1341 on: April 29, 2012, 12:07:47 PM » |
|
That sounds like a really neat way of doing things.  TMC
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1342 on: April 30, 2012, 08:12:22 PM » |
|
That sounds like a really neat way of doing things.  Thanks. The Tracker is effectively recording any Generators that are triggered throughout gameplay so I'm sure it has a few uses that I haven't thought of yet lol. After messing with a couple of GUI libs I've decided to write my own.  I wanted one that would work on any platform and the ones I'd played with were all Windows only. If my GUI code works on any platform then I can include editors, level creation tools etc without restricting them to just PC use and with a few of the game ideas I have I definitely want to include those tools. I already had some rough GUI routines from E+ so I should be able to port them quickly enough.
|
|
|
|
|
Logged
|
|
|
|
|
JDog053
|
 |
« Reply #1343 on: May 01, 2012, 12:21:54 PM » |
|
Everyone loves a good level editor or similar 
|
|
|
|
|
Logged
|
Projects - Tile Engine/Editor, Platformer Game.
|
|
|
|
fog
|
 |
« Reply #1344 on: May 01, 2012, 09:01:52 PM » |
|
V1.07 of AGK is out so I should be able to do some tests to see just how feasible a mono style background painting routine is going to be. The original version used a bit of smoke and mirrors (*) to give the impression that it was doing more than it really was and I guess I'll need to do more of the same
(*) the original mono background image was only 1/4 of the screen res and only updated 3 times a second but because it was in almost constant motion you couldn't really tell.
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1345 on: May 05, 2012, 06:12:45 PM » |
|
Not had much time, although I have got my GUI windows and tabs working. No gadgets yet. And right now it just uses basic rectangle & line commands, but I'll replace that later with proper images so it looks better. Right now I'm just going for functional. 
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1346 on: May 07, 2012, 08:11:24 PM » |
|
Bank holiday so time for a bit more coding. Tweaked my GUI window code so that I can move the windows about and then added pull down menus at the top of the screen. That didn't take long and they all seem to work great.
For some reason the framerate takes a major dive when even just the menu bar is displayed on screen. I've narrowed it down to my PasteSprite() functions which are fairly simple and look ok at first glance so I'm not sure what's going on there.
As it happens Paste Sprite commands have just been added in the latest version of AGK so I'll use those instead of trying to get to the bottom of why mine is so slow.
|
|
|
|
|
Logged
|
|
|
|
|
fog
|
 |
« Reply #1347 on: May 08, 2012, 12:35:06 PM » |
|
For some reason the framerate takes a major dive when even just the menu bar is displayed on screen. I've narrowed it down to my PasteSprite() functions which are fairly simple and look ok at first glance so I'm not sure what's going on there.
As it happens Paste Sprite commands have just been added in the latest version of AGK so I'll use those instead of trying to get to the bottom of why mine is so slow.
Couldn't resist having a look at my Paste Sprite command and seeing what was causing the awful slowdown and it turns out it's AGK and not me. Changing the depth of a sprite or telling it to use a new image must cause AGK to resort the draw order of all sprites or something as that's where the slowdown is. As it happens the Paste Sprites in my GUI code all use the same image so I've added a check for that and the slowdown is gone. I'm about to rip all that out and use AGK's own built in PasteSprite commands, but I like to know what's going on when there's a potential problem. 
|
|
|
|
|
Logged
|
|
|
|
|
T_M_C
|
 |
« Reply #1348 on: May 09, 2012, 10:52:44 AM » |
|
Had my fare share of teething troubles too, working with a new language.
I hope AGK has some half decent docs.
As i'm usually left trawling the forums looking for answers.
Good to hear you're maing progress though.
TMC
|
|
|
|
|
Logged
|
|
|
|
|
Prime_8
|
 |
« Reply #1349 on: May 10, 2012, 05:36:09 AM » |
|
"As i'm usually left trawling the forums looking for answers."
i have never hit one i did not end up doing that . lol
i cant complain , i suck at makin my own docs .
|
|
|
|
|
Logged
|
|
|
|
|