Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411486 Posts in 69371 Topics- by 58427 Members - Latest Member: shelton786

April 24, 2024, 08:40:14 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBanshee Engine : For all your ANSI needs!
Pages: 1 ... 12 13 [14] 15
Print
Author Topic: Banshee Engine : For all your ANSI needs!  (Read 34699 times)
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #260 on: February 12, 2013, 02:26:03 PM »

Started posting on the forums a bit.

If you're paying for hosting and not just the domain, I'd HIGHLY recommend installing your own forum software rather than using a free host. The ads are really, really annoying.
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #261 on: February 12, 2013, 04:18:08 PM »

Is there any way to use a custom palette with BamPaint (importing one created in schematic.exe, for example)?

Yeah, but it was a kinda hackish thing on my part when I implemented it. In the BamPaint folder add another subdirectory called "ansi" and inside that folder put a "scheme.bsc" that you want to use instead of the default.

If you're paying for hosting and not just the domain, I'd HIGHLY recommend installing your own forum software rather than using a free host. The ads are really, really annoying.

I'll get around to it.  Embarrassed Tiny budget means cutting as many corners as I can. I'm a student with no job at the moment so I don't have a ton of options.



Also, I made a few bugfixes that I have no idea how they weaseled themselves past the last release.

Quote
1.1.1a
Fixed engine crashing with a memory access violation when an entity was deinitialized while its script was still active and running.
Fixed entity initialization: now, if an entity is already initialized, there will be no change.
Fixed bug with the ansiblocks example that would cause a game crash upon entering a low high score.
Fixed timer pointers being doubly freed, which screwed with whatever game objects were created afterward that took up the same pointer space.

edit: Oh, I forgot to take out a memory-dumpy-thing upon a game crash I was using for debugging. It's not a big deal but don't get weirded out.
Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #262 on: February 12, 2013, 04:34:35 PM »

Fixed entity initialization: now, if an entity is already initialized, there will be no change.
What exactly does this mean? That entities no longer re-initialize when changing maps?
Logged

emacs
Level 10
*****

...


View Profile WWW
« Reply #263 on: February 12, 2013, 04:43:43 PM »

Is there any way to use a custom palette with BamPaint (importing one created in schematic.exe, for example)?
Yeah, but it was a kinda hackish thing on my part when I implemented it. In the BamPaint folder add another subdirectory called "ansi" and inside that folder put a "scheme.bsc" that you want to use instead of the default.


I think I did something wrong, but I'm not entirely sure what. Durr...?
My scheme.bsc, if it helps.
Logged

pluckyporcupine
Level 9
****


View Profile WWW
« Reply #264 on: February 12, 2013, 04:56:59 PM »

All of the sudden, with the latest update, some of my variables saved to gamedata are turning up nil when called.

1.1.0a and before all work fine.
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #265 on: February 12, 2013, 05:03:50 PM »

What exactly does this mean? That entities no longer re-initialize when changing maps?

If the entity was already initialized then no. Is that bad?

I think I did something wrong, but I'm not entirely sure what. Durr...?

It looks like you might not have included a palette. A palette should be a 16x16 PNG image with a bunch of colors in it, like the example one. If you did then I will get to work on making the paint program cooperate with different schemes right away.  Huh? edit: I tried it with another, different scheme and it seems to work as it should.

All of the sudden, with the latest update, some of my variables saved to gamedata are turning up nil when called.

1.1.0a and before all work fine.

That is weird. I don't recall changing anything there. At what point in your code are you saving them? Can I see the files?
Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #266 on: February 12, 2013, 05:06:58 PM »

If the entity was already initialized then no. Is that bad?
The way my game was set up, it was relying pretty heavily on that. I guess my game will be eternally stuck in 1.1.0a until I can figure out a clean way to deinitialize-reinitialize without the game crashing on me for not having a player.

BUT it's definitely a good change because most games would require initialized entities to not reinitialize every time they change maps. Maybe make it a choice on a per-entity basis?

That is weird. I don't recall changing anything there. At what point in your code are you saving them? Can I see the files?

Sure. They're saved in main.lua and then called for at the beginning of playermain.lua. The "mission" variable. The objective will show up in the Captain's Log at the beginning of the map if it works. It also prints to the log. It was showing up "missionnil" in the latest release whereas it was showing up as "mission1" or whatever in 1.1.0a and earlier.
Logged

emacs
Level 10
*****

...


View Profile WWW
« Reply #267 on: February 12, 2013, 05:26:08 PM »

Here's the tileset and palette I'm using.  The palette is a 16*16 image, and the tileset is the same resolution as the example.
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #268 on: February 12, 2013, 05:56:14 PM »

Here's the tileset and palette I'm using.  The palette is a 16*16 image, and the tileset is the same resolution as the example.

Oh my fucking god I was nearly having a panic attack trying to figure out what was causing that to happen because everything in the code said stuff was a-okay.

The background color of the image is #000005 when it needs to be #000000.

The interface still looks bizarre because of the different palette but that's pretty easy to fix and should be come the next release.
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #269 on: February 12, 2013, 06:11:44 PM »

BUT it's definitely a good change because most games would require initialized entities to not reinitialize every time they change maps. Maybe make it a choice on a per-entity basis?

It actually doesn't have specifically to do with reinitialization upon a new map, just initialization in general. Perhaps you could do something so that when you change the map you iterate through the entities in that map and entitycall(entity,"initialized")? It would be rather difficult to implement a conditional reinitialization like you suggest.

It was showing up "missionnil" in the latest release whereas it was showing up as "mission1" or whatever in 1.1.0a and earlier.

From the log with messages interjected whenever data was saved, to tell the name and value:

Quote
12/02/13 - 09:08:02 PM : Starting game.
12/02/13 - 09:08:02 PM : Initializing map "title".
12/02/13 - 09:08:02 PM : Initialized script "C:/Users/Kirschner/Desktop/lib/ansisubgame/scripts/playermain.lua" for entity "Player".
number: "cc" = "0.00000000000000000"
12/02/13 - 09:08:02 PM : SCRIPT: "C:/Users/Kirschner/Desktop/lib/ansisubgame/scripts/playermain.lua": missionnil
12/02/13 - 09:08:02 PM : Initializing game window.
12/02/13 - 09:08:02 PM : Initializing game graphics.
12/02/13 - 09:08:11 PM : Activated menu option "Test Map #1". (Index: 0, function name: "menutestmap1")
number: "mission" = "0.00000000000000000"
12/02/13 - 09:08:11 PM : Initializing map "testmap1".
12/02/13 - 09:08:11 PM : Player changed maps: from map "title" to "testmap1"

I'm not certain what's changed, but it looks like things have just become out-of-order somehow. I'd like to guess that it's the lack of reinitialization that's doing you in? "mission" is being set, but you're checking for it before instead of after.
Logged
emacs
Level 10
*****

...


View Profile WWW
« Reply #270 on: February 12, 2013, 06:22:14 PM »

The background color of the image is #000005 when it needs to be #000000.
Whoops, didn't realize that.  Thanks a bunch, it's working great now. Hand Thumbs Up LeftSmiley
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #271 on: February 12, 2013, 06:29:04 PM »



« Last Edit: February 12, 2013, 08:22:58 PM by _Madk » Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #272 on: February 13, 2013, 12:00:54 AM »

I'm not certain what's changed, but it looks like things have just become out-of-order somehow. I'd like to guess that it's the lack of reinitialization that's doing you in? "mission" is being set, but you're checking for it before instead of after.
Right. Forgot about that.
Logged

sublinimal
Level 8
***



View Profile
« Reply #273 on: February 13, 2013, 02:22:53 AM »


Looks like something that should be turn-based. Like a platformer + chess thing. what
Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #274 on: February 13, 2013, 02:33:08 AM »

what
What indeed. Platformer + Chess? That'd be an odd mix.

EDIT: Decided to test out displaying submitted messages in a sort of console style. Having problems.

Code: http://pastebin.com/jAi4Mrzu

What's happening:



Basically, where it's supposed to submit the message when you press Enter, instead, it's adding a new line to the string (it'll keep adding them even if it goes off screen), even though the call for keyhits doesn't include Enter. The same thing happens for Backspace except I can hit Backspace all I want, it's the very last time that I hit it that it leaves the 8th character in the scheme.
« Last Edit: February 13, 2013, 04:08:50 AM by johnki » Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #275 on: February 13, 2013, 04:42:49 AM »

I think the high score name input code in the ansiblocks example should help you. ansiblocks/scripts/controller.lua, inputname()

Also, use an array to list those messages.
Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #276 on: February 13, 2013, 05:21:47 AM »

I think the high score name input code in the ansiblocks example should help you.
ansiblocks/scripts/controller.lua, inputname()

Okay, used the method there for input.

Code:
function textupdate()
local char = getchar()

if char >= 32 and char <= 125 then
char = string.char(char)
saystr = saystr .. char
flushkeys()
end
end

HOWEVER, the Enter key STILL wouldn't work correctly until I got rid of the keybinding and added this...

Code:
function checksubmit()
if keyhit(13) then
if string.len(saystr) > 0 then
    -- Do something.
end
end
end

It works now but shouldn't the distinction between the keybinding and the keyhit() function in this case be trivial?
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #277 on: February 13, 2013, 07:00:15 AM »

The trouble could be a result of doing flushkeys() after every character inputted. You probably don't want to be doing that, regardless.
Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #278 on: February 13, 2013, 07:54:40 AM »

The trouble could be a result of doing flushkeys() after every character inputted. You probably don't want to be doing that, regardless.
Why not, exactly? I could always move it so that it flushes the keys when you submit a message.

That being said, I still don't see what that has to do with different results coming from the same key being used for a keybinding and being used for a keyhit() call in this specific situation unless flushing the keys flushes keybindings too.
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #279 on: February 13, 2013, 08:34:46 AM »

I'm pretty sure you're misunderstanding what flushkeys does. Essentially, it totally resets all polled input. You want to call it right before you start reading input - reading it as a general action, not before each command - so you can tell it to ignore the keypresses and things that have been queued up until then. Flushing after every key input, or even after every line, is gonna fuck shit up. Probably including key bindings.

Also, instead of checking for a keyhit or a key binding it would be much more efficient (even though ansiblocks doesn't do it) to check if c is a newline (12) or carriage return (15) character.
Logged
Pages: 1 ... 12 13 [14] 15
Print
Jump to:  

Theme orange-lt created by panic