• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
  • We have made minor adjustments to how the search bar works on ResetEra. You can read about the changes here.
Status
Not open for further replies.

Minamu

Member
Nov 18, 2017
1,902
Sweden
Hi Minamu, good to have you back! :) And good luck with these guys!
Thanks! :D Good to be back too.

And I'm back with another Unity question! :D I've been following a video tutorial, linked at the bottom, on how to make UI elements fade in and out. It works as intended but I've noticed a bug I can't seem to correct.

Basically, each time I press a UI button, a menu panel will fade in, and if there's already an active panel, that one must fade out as the new panel fades in. That part is fine.

The problem is that if you press an additional button while the previous panel is still fading in, via a coroutine, things break, and the coroutines get messed up. I suppose Unity doesn't like it when you force quit a coroutine before it's done? The video below fade panels (or rather the whole Canvas) via a CanvasGroup and its alpha value, and I've tried to continuously capture the alpha value in a float, so I can reset the value, but it doesn't want to stick :/ My non-working solution would be to save the alpha value, and when I force quit a coroutine, I will start a new one with the new alpha value, so it fades out again down to zero from that cancelled alpha value so to speak, but alas, it doesn't work :/ I think the coroutines get stuck inside the while loops, and doesn't reach 0 properly. The value isn't supposed to be able to go below 0 or above 1, but for some reason, sometimes it gets stuck at for example 1.2392124214^e-5 and keeps rambling on xD

This should be easy imo xD I want to tell the code to simply cancel any ongoing fade ins, and convert their alpha value when the cancel was ordered to the new starting point so 0 is reached faster than normal.

Fake edit: After giving it some thought, I think I need to save what I call the currentPanel in an extra temporary variable, and maybe also for the newPanel (that needs to fade in). I'm not sure what happens when you cancel a coroutine though, or if I can even catch that. Right now we're saving the started coroutine in a temporary coroutine so we can check if it's != null, and then do some stuff, but does that variable become null as soon as the coroutine has stopped? Essentially, I need to swap some panels around I think, because once inside the function that calls these coroutines, currentPanel and newPanel are known, and newPanel becomes currentPanel at the end. If I were to call this function again whil still running, I'd have two panels in the same variable, so no wonder it breaks xD

Explaining all this at almost 6am is difficult, heh. Sorry if I'm not making any sense!

TLDR: I can fade UI panels in and out no problem, as long as I don't touch them. But if I try to start a new fade before the previous ones are done, it breaks.

https://www.youtube.com/watch?v=MkoIZTFUego
 

JeffG

Member
Oct 27, 2017
859
Edmonton, Alberta
Thanks! :D Good to be back too.

And I'm back with another Unity question! :D I've been following a video tutorial, linked at the bottom, on how to make UI elements fade in and out. It works as intended but I've noticed a bug I can't seem to correct.

Basically, each time I press a UI button, a menu panel will fade in, and if there's already an active panel, that one must fade out as the new panel fades in. That part is fine.

The problem is that if you press an additional button while the previous panel is still fading in, via a coroutine, things break, and the coroutines get messed up. I suppose Unity doesn't like it when you force quit a coroutine before it's done? The video below fade panels (or rather the whole Canvas) via a CanvasGroup and its alpha value, and I've tried to continuously capture the alpha value in a float, so I can reset the value, but it doesn't want to stick :/ My non-working solution would be to save the alpha value, and when I force quit a coroutine, I will start a new one with the new alpha value, so it fades out again down to zero from that cancelled alpha value so to speak, but alas, it doesn't work :/ I think the coroutines get stuck inside the while loops, and doesn't reach 0 properly. The value isn't supposed to be able to go below 0 or above 1, but for some reason, sometimes it gets stuck at for example 1.2392124214^e-5 and keeps rambling on xD

This should be easy imo xD I want to tell the code to simply cancel any ongoing fade ins, and convert their alpha value when the cancel was ordered to the new starting point so 0 is reached faster than normal.

Fake edit: After giving it some thought, I think I need to save what I call the currentPanel in an extra temporary variable, and maybe also for the newPanel (that needs to fade in). I'm not sure what happens when you cancel a coroutine though, or if I can even catch that. Right now we're saving the started coroutine in a temporary coroutine so we can check if it's != null, and then do some stuff, but does that variable become null as soon as the coroutine has stopped? Essentially, I need to swap some panels around I think, because once inside the function that calls these coroutines, currentPanel and newPanel are known, and newPanel becomes currentPanel at the end. If I were to call this function again whil still running, I'd have two panels in the same variable, so no wonder it breaks xD

Explaining all this at almost 6am is difficult, heh. Sorry if I'm not making any sense!

TLDR: I can fade UI panels in and out no problem, as long as I don't touch them. But if I try to start a new fade before the previous ones are done, it breaks.

https://www.youtube.com/watch?v=MkoIZTFUego
If you are using coroutines, use this asset

https://www.assetstore.unity3d.com/en/#!/content/54975

You can kill coroutines by a named value
 
Oct 25, 2017
3,686
I've somehow yet to post in this thread yet! Recently posted some stuff over on the Waypoint thread, but been so busy I forgot to check up on how things were going here!
I wanted to show off some of the weather events we've been tying to our randomized variations. These are rare environmental scenarios that occur and cause all kinds of emergent mayhem in the game!
This looks cool, but I'd respectfully suggest a seizure warning in your game if there's no way to include an option to adjust the lightning effect. Full-screen abrupt solid color flashes may be a risk factor I think.
 

ChasePettit

Member
Oct 27, 2017
74
Thanks! :D Good to be back too.

And I'm back with another Unity question! :D I've been following a video tutorial, linked at the bottom, on how to make UI elements fade in and out. It works as intended but I've noticed a bug I can't seem to correct.

Basically, each time I press a UI button, a menu panel will fade in, and if there's already an active panel, that one must fade out as the new panel fades in. That part is fine.

The problem is that if you press an additional button while the previous panel is still fading in, via a coroutine, things break, and the coroutines get messed up. I suppose Unity doesn't like it when you force quit a coroutine before it's done? The video below fade panels (or rather the whole Canvas) via a CanvasGroup and its alpha value, and I've tried to continuously capture the alpha value in a float, so I can reset the value, but it doesn't want to stick :/ My non-working solution would be to save the alpha value, and when I force quit a coroutine, I will start a new one with the new alpha value, so it fades out again down to zero from that cancelled alpha value so to speak, but alas, it doesn't work :/ I think the coroutines get stuck inside the while loops, and doesn't reach 0 properly. The value isn't supposed to be able to go below 0 or above 1, but for some reason, sometimes it gets stuck at for example 1.2392124214^e-5 and keeps rambling on xD

This should be easy imo xD I want to tell the code to simply cancel any ongoing fade ins, and convert their alpha value when the cancel was ordered to the new starting point so 0 is reached faster than normal.

Fake edit: After giving it some thought, I think I need to save what I call the currentPanel in an extra temporary variable, and maybe also for the newPanel (that needs to fade in). I'm not sure what happens when you cancel a coroutine though, or if I can even catch that. Right now we're saving the started coroutine in a temporary coroutine so we can check if it's != null, and then do some stuff, but does that variable become null as soon as the coroutine has stopped? Essentially, I need to swap some panels around I think, because once inside the function that calls these coroutines, currentPanel and newPanel are known, and newPanel becomes currentPanel at the end. If I were to call this function again whil still running, I'd have two panels in the same variable, so no wonder it breaks xD

Explaining all this at almost 6am is difficult, heh. Sorry if I'm not making any sense!

TLDR: I can fade UI panels in and out no problem, as long as I don't touch them. But if I try to start a new fade before the previous ones are done, it breaks.

https://www.youtube.com/watch?v=MkoIZTFUego

Rather than using coroutines to do the fade, my suggestion is to use DOTween- a lot of the Unity tween libraries are kinda bad but DOTween is actually pretty well done. It allows you to specify that the tween should complete (i.e. jump to the final value and call any onComplete callback) if the tween is killed early or alternatively make it easier for you to resume/repeat a tween by just specifying the final target value or a delta rather than being concerned about tracking its current state. This gets around the issue that you're encountering, the lack of an easy way to gracefully stop a coroutine, and generally allows your UI to operate in a more purely event based manner.
 
Last edited:

Minamu

Member
Nov 18, 2017
1,902
Sweden
Rather than using coroutines to do the fade, my suggestion is to use DOTween- a lot of the Unity tween libraries are kinda bad but DOTween is actually pretty well done. It allows you to specify that the tween should complete (i.e. jump to the final value and call any onComplete callback) if the tween is killed early or alternatively make it easier for you to resume/repeat a tween by just specifying the final target value or a delta rather than being concerned about tracking its current state. This gets around the issue that you're encountering, the lack of an easy way to gracefully stop a coroutine, and generally allows your UI to operate in a more purely event based manner.
Cool, thanks! Seems like a really handy shortcut :D
 

PacoChan

Member
Oct 28, 2017
71
It's been a while since I've posted about my game Without Escape.

The most important thing is that I released a free demo on Steam and Itch.io for Windows, Mac and Linux. If you are interested in a retro horror point and click graphic adventure, please try it out and tell me what you think!
I also wrote another development post in my blog, about integrating 3D elements in a 2D game. Hopefully with not too much broken english!

http://bumpytrailgames.com/2017/11/17/integrating-3d-elements-2d-game/

item.gif
 

Toma

Scratching that Itch.io http://bit.ly/ItchERA
Member
Oct 25, 2017
5,832
Heya, I am fumbling around with inventory management for a week in Gamemaker now. Does anyone have a fancy asset or tutorial on how to do an effective instance based inventory, where the items are not just references? I want randomized stats in my items and most tutorials and inventories make that basically impossible as they just read out predefined data. I basically tinkered with attaching lists of properties to the individual inventory references, but its incredibly patchworky and just leads to so many other issues that I need to stomp out, that I'd rather start it all over.

If anyone has a good pointer for that, I would appreciate some input greatly.
 

nofxboy1234

Member
Nov 8, 2017
23
Hi everyone :). I was a long time lurker in the old threads, but I'd like to show progress on my game here when I have something to show later down the line. All your work here is very inspiring!

I have a question about Unity. Is there a way to "collapse all/expand all" components in the Inspector?
 

Dusk Golem

Local Horror Enthusiast
Member
Oct 25, 2017
5,807
It's been a while since I've posted about my game Without Escape.

The most important thing is that I released a free demo on Steam and Itch.io for Windows, Mac and Linux. If you are interested in a retro horror point and click graphic adventure, please try it out and tell me what you think!
I also wrote another development post in my blog, about integrating 3D elements in a 2D game. Hopefully with not too much broken english!

http://bumpytrailgames.com/2017/11/17/integrating-3d-elements-2d-game/

item.gif

Oh my, I saw this on Steam a couple months ago and been loosely following it. Looking forward to it!
 

gofreak

Member
Oct 26, 2017
7,738
I keep meaning to post in here, some really cool stuff going on!

I've been working away to launch Clive 'N' Wrench's Patreon page, and the accompanying trailer. It's all finally done, and I can get back to work proper! (Big thanks to Pehesse for the help!)



https://www.patreon.com/CliveNWrench


Wow, there's quite a lot going on there. Love the snow level aesthetics. How long have you been working on it? It's just been yourself developing it?
 

_Rob_

Member
Oct 26, 2017
606
Wow, there's quite a lot going on there. Love the snow level aesthetics. How long have you been working on it? It's just been yourself developing it?

Thanks! It's nearing 7 years now, although a pretty much started over about 2 years back. It is mostly just me, yeah, but I do occasionally colab with programmers, my composer and a character artist!
 

K Monkey

Member
Oct 25, 2017
278
I keep meaning to post in here, some really cool stuff going on!

I've been working away to launch Clive 'N' Wrench's Patreon page, and the accompanying trailer. It's all finally done, and I can get back to work proper! (Big thanks to Pehesse for the help!)



https://www.patreon.com/CliveNWrench


looks fantastic :D just a minor thing.. maybe have a few variations of the jump groan and play one at random instead of just one repeatedly. Other than that, its come a long way!
 

Seri

Member
Oct 30, 2017
704
So, I'm just getting started really. I'm intending to use Unity to make an action rpg the the vein of Y's, Illusion of Gaia, etc. I'm just trying to learn how to do pixel art better (taking some courses). I know this will be a many many year project but it's something I've wanted to do for so long. Just kind of wanted to post here to...I suppose introduce myself? ^^'
 

Minamu

Member
Nov 18, 2017
1,902
Sweden
Hi everyone :). I was a long time lurker in the old threads, but I'd like to show progress on my game here when I have something to show later down the line. All your work here is very inspiring!

I have a question about Unity. Is there a way to "collapse all/expand all" components in the Inspector?
Welcome :)

Sure, hold alt or ctrl or shift, then click on the object or the expand button. Not sure which button it is but you'll find out soon enough :)
 

nofxboy1234

Member
Nov 8, 2017
23
Welcome :)

Sure, hold alt or ctrl or shift, then click on the object or the expand button. Not sure which button it is but you'll find out soon enough :)

Thanks Minamu :)! I still can't seem to get it working in the Inspector panel. If I Alt-Click in the Hierarchy panel, then it collapses/expands all, but when I try all the combinations of ctrl, alt, shift in the Inspector, nothing happens unfortunately.
Maybe it's not possible in that panel? If not, I'm wondering how other unity users deal with gameobjects with many scripts attached? I'd just like to collapse them all so it's easier to get an overview of what is on the object.
 

Minamu

Member
Nov 18, 2017
1,902
Sweden
Thanks Minamu :)! I still can't seem to get it working in the Inspector panel. If I Alt-Click in the Hierarchy panel, then it collapses/expands all, but when I try all the combinations of ctrl, alt, shift in the Inspector, nothing happens unfortunately.
Maybe it's not possible in that panel? If not, I'm wondering how other unity users deal with gameobjects with many scripts attached? I'd just like to collapse them all so it's easier to get an overview of what is on the object.
Oh sorry, I mixed up the names there. I don't know about the inspector unfortunately. I just click on the name bar for each component, if you go from top to bottom you only need to move the mouse minimally. Have you checked Unity's site for shortcuts? Otherwise an editor script might be needed, a script that only work on the editor, not the game itself. As you might know, Unity supports scripting new editor features and windows etc.
 

nofxboy1234

Member
Nov 8, 2017
23
Oh sorry, I mixed up the names there. I don't know about the inspector unfortunately. I just click on the name bar for each component, if you go from top to bottom you only need to move the mouse minimally. Have you checked Unity's site for shortcuts? Otherwise an editor script might be needed, a script that only work on the editor, not the game itself. As you might know, Unity supports scripting new editor features and windows etc.

Haha, no worries! I searched all over for shortcuts and couldn't find anything. It's all good, I'll use your method :)
 

ray_caster

Member
Nov 7, 2017
664
I haven't had time to seriously do programming in almost two years now. Over a few days I decided to go full retro and make a 16-bit virtual machine with a few device drivers and an assembler. Pretty fun stuff, although a bit useless. I also wrote a program for it that bounces a font glyph around (around 100 instructions with the added hack of loading the font to memory using C++ as I haven't implemented a functioning file system or storage driver yet). Pixel rendering is made a bit difficult since the machine only does 16-bit addressing on 16-bit aligned memory and I only support 1-bit rendering at the moment.

S4wKtTN.png


If I get around to implementing the bare essentials within the next few days (storage, keyboard, audio, better stack implementation, and functions) I might make a game for Ludum Dare for the VM.
 

AbysmallyTall

Member
Oct 26, 2017
211
Annapolis, MD, USA
Regarding the art style, i did not make any graphics that is the reason it does not look cohesive (i bought some sprites and some others were free from other sites), now i am trying to make all the assets by myself in my next creation, but it is difficult, takes a lot of time.

This makes sense when you're just trying to get the prototype off the ground. Looking forward to seeing what your final vision is.

Are you making a game similar to Space Invaders?

Could be, but I'm aiming for something more in the lineage of R-Type/Darius/etc. Mostly, I'm letting the learning process dictate what I do. For instance, I have some bullet patterns sketched out on paper, but once I've programmed out more of a bullet manager (you saw an early version in the gif I last posted), I'll let what I have learned determine what goes in the game (with a vague goal of making it cohesive after the experimentation phase).
 

missile

Member
Oct 25, 2017
112
Yeah, hi there! :)

I haven't had time to seriously do programming in almost two years now. ...
Sounds odd. Why?

... Over a few days I decided to go full retro and make a 16-bit virtual machine with a few device drivers and an assembler. ...
Pretty cool. Always wanted to make one too, but time doesn't play out atm.

... Pretty fun stuff, although a bit useless. ...
Perhaps not that useless. I'm still looking for other 16-bit computers for
the board computer of my craft for a game of mine next to the DCPU-16 I'm
currently using. The idea is that the board computer runs part of the craft
i.e. controlling its units with the user having a say what's loaded resp.
what gets executed giving some interesting possibilities to the point where
(s)he can modify, write, or download software from other gamers.

So perhaps there is some non-empty intersection between your and my stuff. ;)
Keep going!

... I also wrote a program for it that bounces a font glyph around (around 100 instructions with the added hack of loading the font to memory using C++ as I haven't implemented a functioning file system or storage driver yet). Pixel rendering is made a bit difficult since the machine only does 16-bit addressing on 16-bit aligned memory and I only support 1-bit rendering at the moment. ...
It was even uglier for the DCPU-16s display driver. Rendering at the native
resolution wasn't possible but bitmapped fonts. But I've found a way to
render at native resolution by assembling some characters on the screen
while rendering into the font map. The resulting addressing scheme was rather
ugly for addressing (set) one pixel on the screen given the layout of the
characters on the screen and the (unusual) memory layout of a character
itself. However, that way I could render at 64x64 with 1 bit (2 colors).

That's my putpixel function (optimized):
Code:
  :.putpixel
    shr x, 1            ; compute offset: x / 2
    and y, 0xf8         ; shr y, 3 = div y, 8  -> y in {0, ... ,7}
    shl y, 2            ; shr y, 5 = mul y, 32 -> move y 32 words per line
    add x, y            ; compute offset into video memory
    set y, [video]      ; address video memory
    add x, y            ; add offset
    set y, 0x0100       ; pixel mask 0x0100
    and a, 1            ; set pixel pattern for x: mod a, 2 = a & 1
    shl a, 3            ; ifn a, 0 (if a is odd) -> set pixel shift mask
    shr y, a            ; shift pixel mask by amount of mask in a
    and b, 7            ; set pixel mask for y: mod b, 8 = b & 7 
    shl y, b            ; shift pixel mask to the correct y position   
    bor [x], y          ; or frame buffer word with pixel mask 
  :.done
About that. xD

... If I get around to implementing the bare essentials within the next few days (storage, keyboard, audio, better stack implementation, and functions) I might make a game for Ludum Dare for the VM.
If you get the assembler and emulator stable and useful enough, I may
port my 3d engine over I did for the DCPU-16 ages ago like

qwhJC3b.gif

line & polygon clipping

HBMR8Kt.gif

classic
 

missile

Member
Oct 25, 2017
112
I keep meaning to post in here, some really cool stuff going on!

I've been working away to launch Clive 'N' Wrench's Patreon page, and the accompanying trailer. It's all finally done, and I can get back to work proper! (Big thanks to Pehesse for the help!)

...

Perhaps it's just me, but I think you need a bit more perspective.
It looks a bit teleish to me.


Thought I'll share some NPC

HQbry3G.png
So nice!
 
Oct 29, 2017
5,306
Minnesota
Any tips for balancing difficulty? Having played my game a lot for other testing, I've gotten really good at it to the point where it's largely not hard to beat anything. Bro is even better. Most of our earlier testers found it way too hard though, so we're stuck in this strange zone where I want it 50% or more harder but don't know if that's the right call.

Sending out to more people in hopes of feedback, but man. The sample size is only going to be so big.
 
Nov 1, 2017
1,380
Any tips for balancing difficulty? Having played my game a lot for other testing, I've gotten really good at it to the point where it's largely not hard to beat anything. Bro is even better. Most of our earlier testers found it way too hard though, so we're stuck in this strange zone where I want it 50% or more harder but don't know if that's the right call.

Sending out to more people in hopes of feedback, but man. The sample size is only going to be so big.

What is your target audience? Also, did the play testers comment on what exactly it is they're finding difficult? The game might be fine and just needs a better difficulty curve, or maybe you need to walk through the flow of your game and make sure you're telegraphing everything appropriately. If it's at a point where memorization is the only way people feel they can get through the game then they're probably going to get frustrated quickly. What kind of game are you making?
 
Oct 29, 2017
5,306
Minnesota
What is your target audience? Also, did the play testers comment on what exactly it is they're finding difficult? The game might be fine and just needs a better difficulty curve, or maybe you need to walk through the flow of your game and make sure you're telegraphing everything appropriately. If it's at a point where memorization is the only way people feel they can get through the game then they're probably going to get frustrated quickly. What kind of game are you making?
It's an RPG/card game, but the battle is all done in real-time. There's no real memorization to be had, but the gameplay hinges on a strong tug-of-war as you attack and defend with cards of varying types and strengths. From what we've seen, people just go too slowly. Yeah it's a card game, but it's a it of an action one too. Speed and precision play into it.

Edit: If you skip to around the 2:50 mark, you can see an example battle. Video is old and there are mostly no sounds because old, but the flow of the game is there

https://www.youtube.com/watch?v=fKCs-hPdLKE&index=17&list=UUUAM3qyN5TlXEwVfLYP4vMQ
 
Last edited:
Nov 1, 2017
1,380
It's an RPG/card game, but the battle is all done in real-time. There's no real memorization to be had, but the gameplay hinges on a strong tug-of-war as you attack and defend with cards of varying types and strengths. From what we've seen, people just go too slowly. Yeah it's a card game, but it's a it of an action one too. Speed and precision play into it.


I guess the most obvious questions are can the player see the type/strength of a card at a glance? Are the cards distinguishable from one another? and do these cards have abilities that require the player to read them? These things will have an impact on how quickly a player can make a decision. A player that's new to the game is in no way going to be as quick or good as someone who's been working on and play testing the game from the beginning. Unless you're going for something intentionally punishing the player needs a safe amount of time to make a decision or the choice they can make need to start off limited and then slowly expand their hand size.

Baten Kaitos is probably a good game to look at. It starts the game off with the player at Class 0 which gives you a hand size of 3, deck size of 20, a combo size of 2, and an infinite turn time. Ranking up lets you have bigger decks, hands, and combo's BUT it also decreases your turn time from infinity to 30 seconds and then eventually 5 seconds.
 
Oct 29, 2017
5,306
Minnesota
I guess the most obvious questions are can the player see the type/strength of a card at a glance? Are the cards distinguishable from one another? and do these cards have abilities that require the player to read them? These things will have an impact on how quickly a player can make a decision. A player that's new to the game is in no way going to be as quick or good as someone who's been working on and play testing the game from the beginning. Unless you're going for something intentionally punishing the player needs a safe amount of time to make a decision or the choice they can make need to start off limited and then slowly expand their hand size.

Baten Kaitos is probably a good game to look at. It starts the game off with the player at Class 0 which gives you a hand size of 3, deck size of 20, a combo size of 2, and an infinite turn time. Ranking up lets you have bigger decks, hands, and combo's BUT it also decreases your turn time from infinity to 30 seconds and then eventually 5 seconds.
Cards are pretty well telegraphed. Basic attack and defense are red/blue and correspond to red and blue grids. The numbers are big and easy to read.

Field magic cards and other magic cards do require you to read before you use, but it IS a card game and you don't start getting a bunch of them until the second and third dungeons. We try to trickle them in in such a way to keep the variety going but to not overwhelm the player. Doesn't mean we've succeeded, but we've tried :P

It really comes down to the general attacking and defending, I think. For some reason something just isn't clicking right away.
 

Tim

Member
Oct 25, 2017
441
It's an RPG/card game, but the battle is all done in real-time. There's no real memorization to be had, but the gameplay hinges on a strong tug-of-war as you attack and defend with cards of varying types and strengths. From what we've seen, people just go too slowly. Yeah it's a card game, but it's a it of an action one too. Speed and precision play into it.

Edit: If you skip to around the 2:50 mark, you can see an example battle. Video is old and there are mostly no sounds because old, but the flow of the game is there

https://www.youtube.com/watch?v=fKCs-hPdLKE&index=17&list=UUUAM3qyN5TlXEwVfLYP4vMQ

That looks like a lot of fun!

For difficulty, can you make scenerios that ramp things up? Most games like this will start with the basics and then slowly introduce new mechanics. The problem is likely that new players are being asked to process too much information when they don't fully understand everything yet. Breaking it down into smaller chunks might help.
 
Nov 1, 2017
1,380
Cards are pretty well telegraphed. Basic attack and defense are red/blue and correspond to red and blue grids. The numbers are big and easy to read.

Field magic cards and other magic cards do require you to read before you use, but it IS a card game and you don't start getting a bunch of them until the second and third dungeons. We try to trickle them in in such a way to keep the variety going but to not overwhelm the player. Doesn't mean we've succeeded, but we've tried :P

It really comes down to the general attacking and defending, I think. For some reason something just isn't clicking right away.

Ah, I didn't see the edit in your prior post. So it looks like they have a lot of time to read during the deck preparation phase so that should be fine. For a first battle it definitely felt like a lot to take in, maybe there's a tutorial or something before hand that wasn't captured but I don't think I completely grasped what was going on with the grid. It didn't feel like it was going too fast though so maybe a good ramp up is really all it needs.
 
Oct 29, 2017
5,306
Minnesota
Ah, I didn't see the edit in your prior post. So it looks like they have a lot of time to read during the deck preparation phase so that should be fine. For a first battle it definitely felt like a lot to take in, maybe there's a tutorial or something before hand that wasn't captured but I don't think I completely grasped what was going on with the grid. It didn't feel like it was going too fast though so maybe a good ramp up is really all it needs.
Oh, that's not the first battle. That's a representation of the game in more of a full swing. First battle is just a few attack/defense cards and a much smaller grid (4 x 4). You don't actually get your first magic card until around the fifth encounter. It seems like the sixth and seventh encounters are the ones people are having problems with.
 

ray_caster

Member
Nov 7, 2017
664
Unfortunately, it's because of my non-programming related work. It's not that I don't have the raw amount of time to do hobby stuff, but I usually want at least a four hour continuous window where I can program undisturbed, and that is rare nowadays.

Perhaps not that useless. I'm still looking for other 16-bit computers for
the board computer of my craft for a game of mine next to the DCPU-16 I'm
currently using. The idea is that the board computer runs part of the craft
i.e. controlling its units with the user having a say what's loaded resp.
what gets executed giving some interesting possibilities to the point where
(s)he can modify, write, or download software from other gamers.

So perhaps there is some non-empty intersection between your and my stuff. ;)
Keep going!
Oh, you're looking to replace DCPU-16? I thought it was fairly robust?

Regardless, my machine is hardly programmed for speed. In fact, I decided to rip out most of the instruction set and only provide the minimum amount. I removed INC, DEC, and JMP instructions. I'm planning on removing stack manipulation instructions as I could just as easily manipulate the stack using existing instructions. There are essentially no instructions to operate on an operand by anything other than a variable (except for the SET instruction which assigns a literal to a variable). So if you type "ADD VAR, 1." the assembler will accept this as syntactic sugar and emit "SET X2, 1. ADD VAR, X2.". The same goes for dereferencing in a similar fashion. I'm unsure how badly this impacts performance however.

The long-term goal is to have the computer be as standalone as possible, meaning it does not rely on any tool not written in XASM (the name of the assembly language) for the machine itself. So I need a functioning OS (bare minimum; displays text, views files, and runs programs from a prompt) and assembler written in XASM. My short-term goal is to think a bit about functions for XASM. It's amazing how difficult programming becomes when you can't cut code into reusable units. Once that is done, I think I'm going to put it on Github for anyone that is interested. Hopefully within a few days.

It was even uglier for the DCPU-16s display driver. Rendering at the native
resolution wasn't possible but bitmapped fonts. But I've found a way to
render at native resolution by assembling some characters on the screen
while rendering into the font map. The resulting addressing scheme was rather
ugly for addressing (set) one pixel on the screen given the layout of the
characters on the screen and the (unusual) memory layout of a character
itself. However, that way I could render at 64x64 with 1 bit (2 colors).

That's my putpixel function (optimized):
Code:
  :.putpixel
    shr x, 1            ; compute offset: x / 2
    and y, 0xf8         ; shr y, 3 = div y, 8  -> y in {0, ... ,7}
    shl y, 2            ; shr y, 5 = mul y, 32 -> move y 32 words per line
    add x, y            ; compute offset into video memory
    set y, [video]      ; address video memory
    add x, y            ; add offset
    set y, 0x0100       ; pixel mask 0x0100
    and a, 1            ; set pixel pattern for x: mod a, 2 = a & 1
    shl a, 3            ; ifn a, 0 (if a is odd) -> set pixel shift mask
    shr y, a            ; shift pixel mask by amount of mask in a
    and b, 7            ; set pixel mask for y: mod b, 8 = b & 7
    shl y, b            ; shift pixel mask to the correct y position 
    bor [x], y          ; or frame buffer word with pixel mask
  :.done
About that. xD
This looks fairly similar to my code for flipping pixels as well. Although I can do so at a native 1:1 resolution (256x256x1 bits). The reason is really because I decided not to standardize video other than saying "hey, address 0 - 4096 is a good spot for pixels!". External devices and software may or may not honor this. You could easily write a device driver that gives you hardware acceleration and way more options in terms of speed, resolution, and color depth.

Funny story; Initially I wanted to do video on a 256x256x16 bit video buffer in RAM. I'm ashamed to think how long it took me to realize that that buffer would fill all available memory, leaving nothing for logic and state. It's pretty amazing how we take storage for granted when we program for computers post-2000's (perhaps even earlier).

If you get the assembler and emulator stable and useful enough, I may
port my 3d engine over I did for the DCPU-16 ages ago like

qwhJC3b.gif

line & polygon clipping

HBMR8Kt.gif

classic
Yeah, these are beautiful. Would love to see if my machine could do this.
 

jahasaja

Banned
Oct 26, 2017
793
Sweden
Enemy AI in 2D games

I am trying to figure out how to make interesting, unique and fun enemy AI in a 2D game. Since I am limited to 2D it is actually harder then I thought. So it would be interesting to discuss this issue with others that are thinking about the same thing.

Here are some of the things I plan to implement.

  • Different Stages. Not a very unique, but some enemies will change attacks when they have a less hp. Might also have some enemies flee when they have low hp.
  • Unpredictability. 1, Enemies will have many different random attacks. 2, enemies have more targets to attack than the player which they can pick randomly.
  • Having enemies fight other types of enemies.
That is what I got so far. I guess the enemies could also react more to the players play style and HP level, However, I have not figured out a fun way to do that.
 

_Rob_

Member
Oct 26, 2017
606
It was, yeah - and haha, I usually don't take the time to shave it until it's too late to tackle it by myself, at which point I can't afford it/risk hurting myself most of the time :-D

Seems like a really positive experience, I'm glad it all worked out!

I really need to get on that prototype!

Enemy AI in 2D games

I am trying to figure out how to make interesting, unique and fun enemy AI in a 2D game. Since I am limited to 2D it is actually harder then I thought. So it would be interesting to discuss this issue with others that are thinking about the same thing.

Here are some of the things I plan to implement.

  • Different Stages. Not a very unique, but some enemies will change attacks when they have a less hp. Might also have some enemies flee when they have low hp.
  • Unpredictability. 1, Enemies will have many different random attacks. 2, enemies have more targets to attack than the player which they can pick randomly.
  • Having enemies fight other types of enemies.
That is what I got so far. I guess the enemies could also react more to the players play style and HP level, However, I have not figured out a fun way to do that.

As long as that unpredictability is telegraphed it sounds pretty cool. It might also be an interesting idea to have enemies that can only be hurt by the environment, so you have to hit a switch or a damaged object for a chain reaction of sorts?
 

missile

Member
Oct 25, 2017
112
Bah, you're too modest, a second pair of eyes is always helpful!


It's too early in the morning, you've lost me! Teleish?
Like a telephoto lens producing less perspective. The perspective in here
https://youtu.be/7RJYrlIOw4Y?t=29 looks a bit flat to me. What are the camera
parameters?


Unfortunately, it's because of my non-programming related work. It's not that I don't have the raw amount of time to do hobby stuff, but I usually want at least a four hour continuous window where I can program undisturbed, and that is rare nowadays. ...
I hope it pays off anyways.

... Oh, you're looking to replace DCPU-16? I thought it was fairly robust? ...
I'm just looking around evaluating some alternatives.

... Regardless, my machine is hardly programmed for speed. In fact, I decided to rip out most of the instruction set and only provide the minimum amount. I removed INC, DEC, and JMP instructions. I'm planning on removing stack manipulation instructions as I could just as easily manipulate the stack using existing instructions. There are essentially no instructions to operate on an operand by anything other than a variable (except for the SET instruction which assigns a literal to a variable). So if you type "ADD VAR, 1." the assembler will accept this as syntactic sugar and emit "SET X2, 1. ADD VAR, X2.". The same goes for dereferencing in a similar fashion. I'm unsure how badly this impacts performance however.

The long-term goal is to have the computer be as standalone as possible, meaning it does not rely on any tool not written in XASM (the name of the assembly language) for the machine itself. So I need a functioning OS (bare minimum; displays text, views files, and runs programs from a prompt) and assembler written in XASM. My short-term goal is to think a bit about functions for XASM. It's amazing how difficult programming becomes when you can't cut code into reusable units. Once that is done, I think I'm going to put it on Github for anyone that is interested. Hopefully within a few days. ...
Sounds pretty exciting. But you need lots of time doing it all. Well, there
were a couple of guys doing an OS for the DCPU-16 as well. I also did some
rudimentary stuff like

AQqEG8t.gif


I could do it all day, but currently working on other parts for my game.

... This looks fairly similar to my code for flipping pixels as well. Although I can do so at a native 1:1 resolution (256x256x1 bits). The reason is really because I decided not to standardize video other than saying "hey, address 0 - 4096 is a good spot for pixels!". External devices and software may or may not honor this. You could easily write a device driver that gives you hardware acceleration and way more options in terms of speed, resolution, and color depth. ...
Yeah that's the idea for my game, i.e. the devices are the link into the
game/engine with you being able to run customized code. The in-game computer
cannot be as fast, but the devices can do all the heavy lifting with the
in-game computer just controlling them.

... Funny story; Initially I wanted to do video on a 256x256x16 bit video buffer in RAM. I'm ashamed to think how long it took me to realize that that buffer would fill all available memory, leaving nothing for logic and state. It's pretty amazing how we take storage for granted when we program for computers post-2000's (perhaps even earlier). ...
hi hi
Yeah, that's the problem with all the big screens on such small computers
being of low ram and small address width. But there is perhaps a way to
realize a highres display without needing that much memory. What about doing
a display device/controller that just scans just one line of display width
(memory) while wiping over the screen line by line? The rendering then needs
to be done at the speed of the horizontal scan rate. xD

... Yeah, these are beautiful. Would love to see if my machine could do this.
Thx. I'll keep watching your stuff.


Now that I've recovered a bit from yesterday's event, I've taken the time to write a sum-up post about it here: https://www.patreon.com/posts/15551368

In short: first public event for Pacha (and for me, too, basically), and it was a fantastic experience, even though I'm completely wiped out and will likely require a few day's worth of rest now :-D
Nice write-up!
I would be interested to join if I have something more to show. :)
 

Deleted member 5167

User requested account closure
Banned
Oct 25, 2017
3,114
TLDR: I can fade UI panels in and out no problem, as long as I don't touch them. But if I try to start a new fade before the previous ones are done, it breaks.

https://www.youtube.com/watch?v=MkoIZTFUego

tbh, to do this I'd actually just use Unitys built in mecanim system rather than doing it entirely via code and having appearance and functionality lumped together and making it 'fragile' due to how it looks.
eg (pseudocode):
Code:
public void hidebutton(Button button)
{
     anim.play(fadeButtonOut,0f);
     button.onClick.RemoveListener();
}
 
Status
Not open for further replies.