ProgramGamer
|
|
« Reply #400 on: October 22, 2015, 11:06:30 AM » |
|
Inexperience.
|
|
|
Logged
|
|
|
|
fullweeb
Level 0
|
|
« Reply #401 on: October 22, 2015, 03:21:04 PM » |
|
I made a separate thread for this but figured I might as well post in here, as well. I'm using Monogame and am trying to use a Tile Editor for creating levels but haven't been able to get it to work. I've tried Tiled and tIDE and have made no progress with either. I've tried various parsers for both such as TiledSharp, xTile, etc. If anyone has any suggestions on what I should try next, that would be fantastic.
|
|
|
Logged
|
|
|
|
InfiniteStateMachine
|
|
« Reply #402 on: October 30, 2015, 02:24:43 PM » |
|
I've been really interested in using FAKE for a build system but I see that it seems to really be focused on C# and F#. Anyone know if it's at all feasible for other languages? Specifically C++ along with N other languages for tooling and scripting.
Otherwise maybe a different build system that isn't make, cmake or ant.
Scons might be a possibility....
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #403 on: November 09, 2015, 08:48:39 PM » |
|
In Game Maker, you can make an installer for your game. However, on my computer it keeps defaulting the install directory to my Administrator account. I suspect that it's because I need to provide administrator privileges to the installer for it to work properly, but that's just a hunch. I just want it to install in Program Files or %AppData% or something. How do I edit the installer script to make that work?
|
|
|
Logged
|
|
|
|
ProgramGamer
|
|
« Reply #404 on: November 10, 2015, 10:00:33 AM » |
|
...I'm guessing no one has an answer for this?..
|
|
|
Logged
|
|
|
|
Photon
|
|
« Reply #405 on: November 10, 2015, 06:38:57 PM » |
|
OK, so I'm trying to implement a chain of actions that can be traversed forwards and backwards. The idea is to be able to freely move through the chain as a player navigates a detailed sequence, most notably being able to undo a single action and return to the prior one. The basic premise was to have a class interface built like this: public function update(t:Int):Void;
public function enter():Void; // Forward entry into the action public function standby():Void; // Forward exit from the action (followed by entry into next action) public function reenter():Void; // Backwards entry into the action (next action in chain was undone) public function exit():Void; // Backwards exit from the action (followed by entry into previous action) Each action accomplishes a specific purpose but can retain data so that previous states can be restored easily without restarting the whole chain. But then I got to thinking: am I really just looking for a finite state machine setup here? Am I convoluting things? If FSM would be better, how so? Just looking for a little feedback. @ProgramGamer: Don't use GameMaker, so I'm probably not much help...
|
|
|
Logged
|
|
|
|
Photon
|
|
« Reply #406 on: November 10, 2015, 06:40:36 PM » |
|
OK, so I'm trying to implement a chain of actions that can be traversed forwards and backwards. The idea is to be able to freely move through the chain as a player navigates a detailed sequence, most notably being able to undo a single action and return to the prior one. The basic premise was to have a class interface built like this: public function update(t:Int):Void;
public function enter():Void; // Forward entry into the action public function standby():Void; // Forward exit from the action (followed by entry into next action) public function reenter():Void; // Backwards entry into the action (next action in chain was undone) public function exit():Void; // Backwards exit from the action (followed by entry into previous action) Each action accomplishes a specific purpose but can retain data so that previous states can be restored easily without restarting the whole chain. A simple example might be navigating a nest of menus. But then I got to thinking: am I really just looking for a finite state machine setup here? Am I convoluting things? If FSM would be better, how so? Just looking for a little feedback. @ProgramGamer: Don't use GameMaker, so I'm probably not much help...
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #407 on: November 10, 2015, 09:19:53 PM » |
|
Maybe that's a bit too specific for someone here to know, ProgramGamer. Try the GMC. Is it still called the GMC?
|
|
|
Logged
|
|
|
|
zilluss
Level 1
|
|
« Reply #408 on: November 11, 2015, 12:33:33 AM » |
|
But then I got to thinking: am I really just looking for a finite state machine setup here? Am I convoluting things? If FSM would be better, how so? Just looking for a little feedback.
Your guess was right, you basically need a FSM and then some. What you're looking for is the Memento pattern as described by the GoF Book. See here
|
|
|
Logged
|
|
|
|
Photon
|
|
« Reply #409 on: November 12, 2015, 05:52:35 PM » |
|
But then I got to thinking: am I really just looking for a finite state machine setup here? Am I convoluting things? If FSM would be better, how so? Just looking for a little feedback.
Your guess was right, you basically need a FSM and then some. What you're looking for is the Memento pattern as described by the GoF Book. See hereThat's actually a pretty nifty idea, but couldn't that be a little overkill in some instances? I mean, I saw one example refer to a drawing program, which would make sense because there is such a wide plethora of things you can do to a drawing. But if I'm dealing with a smaller, finite set of concrete actions, does it make sense? In particular, I'm working on a top-down strategy prototype. If I move a character but decide not to confirm the sequence, the character would get moved back to his original spot. That's just one example. Would the memento pattern have me saving the entire map's state every time an action is committed against it? Sure, you could save only certain parts off that were changed, but that seems to sort of defeat the purpose. Or maybe memory is just cheap and its no big deal to save off the map state multiple times.
|
|
|
Logged
|
|
|
|
zilluss
Level 1
|
|
« Reply #410 on: November 12, 2015, 11:06:12 PM » |
|
You don't need to save the whole state of your map for every action. You just need to save the aspect that an action changes. Let's say you have an action MovePlayer. It saves that the player moved X:1/Y:0. So if you want to undo the operation, MovePlayer.undo will move the player by X:-1/Y:0.
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #411 on: November 24, 2015, 04:23:52 PM » |
|
I'm writting a simple region splitting similar to quadtree using recursion, but I think I have made a stupid mistake somewhere and kinda stumble for no reason at all ... So I wrote that first, it recursively hash the position into a smaller grid. Fine and dandy super easy. Function regionCut(width, height, posx, posy, division, depth=1)
If width < division Then Return If height < division Then Return
width = width/division height = height/division ax = ( posx/width ) * width ay = ( posy/height ) * height Rect ax, ay, width, height, False If Not depth = 0 Then regionCut (width, height, posx, posy, division, depth-1) End Function So I implemented that so I get the reverse, I need to draw all the grid places except where the position is, which I then recursively break split using the same process until max depth is reach, but I have used a faulty logic at some point and it failed Function regiondraw(width, height, posx, posy, division, x=0,y=0, depth=4, divide =1) If width < division Then Return If height < division Then Return width = width/division height = height/division
ax = (posx / width)*width ay = (posy / height)*height For i = 0 To division-1 For j = 0 To division-1
If ax/width = i And ay/height = j Then If Not depth = 0 Then regiondraw(width, height, posx,posy, division,i,j, depth-1, divide+1) Else Oval width*(i), height*(j) ,width,height, False EndIf Next Next End Function
I'm sure that's stupid but I blank totally for some reason, I think there is badly define offset but mostly the recursion split all the square instead of just the intended one ... Where are the errors?
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #412 on: November 29, 2015, 05:19:33 PM » |
|
I forgot to put the answer back, I find it right away after posting, posting question do help me step back Function regiondraw(width, height, posx, posy, division, x=00, y=00, depth=4, divide =1) If width < division Then Return If height < division Then Return width = width / division height = height / division ax = ( (posx-x) / width ) *width ay = ( (posy-y) / height) *height Rect ax+x, ay+y, width, height, False If Not depth = 0 Then regiondraw(width, height, posx,posy, division, ax+x,ay+y, depth-1, divide+1)
For i = 0 To division-1 For j = 0 To division-1
If ax/width = i And ay/height = j Then
Else Oval x+i*width, y+j*height ,width,height, False EndIf Next Next End Function
I should generalized it to n point
|
|
|
Logged
|
|
|
|
gimymblert
|
|
« Reply #413 on: December 01, 2015, 12:02:35 AM » |
|
I have a problem with command line When trying to access Program files with It tells me : 'C:\Program' is not recognized Baffling google tell me it should works but apparently it don't recognize space in the path ...
|
|
|
Logged
|
|
|
|
oahda
|
|
« Reply #414 on: December 01, 2015, 03:56:47 AM » |
|
It's because of the space. All commands/arguments in the command line are separated by spaces so if you add a space you are effectively ending the previous one and starting a new one. This is solved by wrapping your string in quotation marks, so "C:\Program Files\[…]".
|
|
|
Logged
|
|
|
|
Dacke
|
|
« Reply #415 on: December 01, 2015, 04:04:40 AM » |
|
in *nix you can also escape spaces by putting a backspace in front of them, not sure what you do on Windows with it's facepalm-inducing backspace separated paths
When writing paths in the command line, the tab key (auto complete commands/paths) is your best friend. It works differently in *nix/bash (autocomplete, list alternatives on two presses) and windows (cycle through possible options). Either way, just hit the tab key a bunch of times to figure it out.
|
|
|
Logged
|
programming • free software animal liberation • veganism anarcho-communism • intersectionality • feminism
|
|
|
oahda
|
|
« Reply #416 on: December 01, 2015, 04:13:14 AM » |
|
Yeah, don't forward slashes tend to work in Windows anyway so that you can use the same convention everywhere? Or is that just in clever programming languages and not within the Batch shell?
|
|
|
Logged
|
|
|
|
InfiniteStateMachine
|
|
« Reply #417 on: December 01, 2015, 08:12:18 AM » |
|
Yes you can use forward slashes in windows as well for most things but not the command line. Dacke, I assume you mean "backslash" and not "backspace" right? If so escaping is still done with a backslash in windows.
Of course in this case from the command line Princessa's method is the way to go. Just put the path in quotes and it will work. No need to escape anything, just enter the string verbatim exactly how you see it.
|
|
|
Logged
|
|
|
|
Dacke
|
|
« Reply #418 on: December 01, 2015, 09:05:48 AM » |
|
Escape any commandline problem with backspace by simply removing all your input!
|
|
|
Logged
|
programming • free software animal liberation • veganism anarcho-communism • intersectionality • feminism
|
|
|
|
|