The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.
PA Programming Thread :: PAdev.net - Need hosting for a service of yours? Check it out.
I have two things against PHP, neither of which is probably fair.
First is the feel of it. It seems that it was a scrub language that had all its features added after the fact, instead of being a natural part of it. I spend a lot of time in a language in a similar situation, but at least it has the decency to be old, whereas PHP doesn't have that excuse.
This is true.
The second thing is my experience with PHP coders. I've met a bunch of competent developers who also do some work in PHP. Those who identify as PHP programmers tend to be much rougher around the edges professionally.
This is also true. Though this is probably true of most people who identify as "X programmers." Insert Java, VB, .NET, and so on. The exception would probably be, like, LISP.
I think Jimmy King described the situation with Python quite well. Its professional usage probably has a lot of senior developers wanting to use it for their next project or choosing it for rewrites of legacy systems. It hasn't filtered down to the marketing guys who know that words like "Enterprise" sound best when paired with Java or C#. When it does, people will be complaining how bloated and unwieldy Python has become...
I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
Xbox - PearlBlueS0ul, Steam
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
If it makes you feel any better an_alt, I made a wiki in a few hundred lines in PHP. The way I treat PHP is C++ for web, but with a web-oriented standard library built into it.
This is also true. Though this is probably true of most people who identify as "X programmers." Insert Java, VB, .NET, and so on. The exception would probably be, like, LISP.
Yes and no. Developers who can only use one language probably didn't have a well rounded education and tend to think of software development through the lens of that one language. Most developers spend most of their time in one or two languages, though the main language will change over the course of a career. It's still fun to stereotype and there's varying amounts of truth behind it. I'll unfairly assume the VB or PHP guy can't code his way around a sort algorithm. Java and C# developers don't map new territory, but instead efficiently extend projects while doing no harm to the infrastructure. They tend to be organized and work in large teams. We should totally make a nature film out of this.
The opposite of the one language developer isn't one who knows twenty. It's the one who knows development and could pick up any language quickly if required.
I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
Xbox - PearlBlueS0ul, Steam
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
I'm starting to question my choice to use django-celery. I've got a dummy system running just doing a couple of tasks every couple of minutes. The celeryd workers keep hanging every 15-20 minutes.
This did not happen the first day I played with this but I'm not sure if I kept it running that long straight. I was also using pyamqp and today I'm using pika for the amqp lib since pike has more features. Celerybeat does also whine at me about memory leaks when I have django debug mode on, so maybe that's doing it.
I can't think of the last time I've needed to sort anything that a database didn't do it better!
Better? I don't think I've ever written a real sort algorithm professionally. It just seems like one of those things a developer should know, like creating a linked list manually, even if it isn't directly useful. Just wrapping one's head around the matter can be the important part.
Slightly related, I've been tossing around the idea of putting together a big list of 2-10 minute tasks from Rosetta Code and similar that could serve as a worksheet when learning or brushing up on a language. I haven't found one online that's not too simple (arithmetic) but not so complicated that most of the time is spent figuring out the algorithm instead of the language features.
I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
Xbox - PearlBlueS0ul, Steam
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
I can't think of the last time I've needed to sort anything that a database didn't do it better!
Better? I don't think I've ever written a real sort algorithm professionally. It just seems like one of those things a developer should know, like creating a linked list manually, even if it isn't directly useful. Just wrapping one's head around the matter can be the important part.
Totally this.
I often have to teach people that "you need to learn this, not so that you can write it, but that you can use it."
celeryd problems seem to be due to using pika. It works great with pyamqp, which sucks, because pika has more features and is what everyone seems to recommend using.
If any of you are all smart about django-celery, rabbitmq, and pika let me know because I'd prefer to use pika for more flexibility in scheduling tasks.
ok.. algorithm question that I'm bashing my head against. I'm writing an inventory cycle counting program and working on generating count days right. Here is what I'm trying to come up with
List of parts in which each part is categorized and can be counted 1-4 times in the total cycle based on it's ranking. (The ranking part is done)
Now I need to create a random order of the part numbers but the catch is, having a minimum number of days between each part number being counted.
so basically
Count date 1 -> random length of days (min 30) -> count date 2 -> and so on.
This list also gets regenerated weekly at least throughout the count period so any new parts or deleted parts are accounted for (past counts done during the count cycle are removed from the ongoing one when recalculated).
My current though is to randomize the whole list, and iterate over it X times doing a swap on part numbers until it's a valid list. The question here would be coming up with X (or breaking because we hit an infinite loop).
Thoughts? Anyone do something like this in a CS class and knows of an existing algorithm for it?
Note: this is being done in pickBASIC so no objects or fancy libraries for me
I can't think of anything that really needed to be sorted that wasn't already stored in a structure that maintains sorted order
Heh, when musing on the language I'm developing today, I realised that if you can use compile-time checks for fast runtime polymorphism on an insert basis, you can also use runtime checks to determine when you're going to need ordered structures, and can use type inference algorithms to automatically use b-trees or whatever when it would be of benefit.
0
SmasherStarting to get dizzyRegistered Userregular
ok.. algorithm question that I'm bashing my head against. I'm writing an inventory cycle counting program and working on generating count days right. Here is what I'm trying to come up with
List of parts in which each part is categorized and can be counted 1-4 times in the total cycle based on it's ranking. (The ranking part is done)
Now I need to create a random order of the part numbers but the catch is, having a minimum number of days between each part number being counted.
so basically
Count date 1 -> random length of days (min 30) -> count date 2 -> and so on.
This list also gets regenerated weekly at least throughout the count period so any new parts or deleted parts are accounted for (past counts done during the count cycle are removed from the ongoing one when recalculated).
My current though is to randomize the whole list, and iterate over it X times doing a swap on part numbers until it's a valid list. The question here would be coming up with X (or breaking because we hit an infinite loop).
Thoughts? Anyone do something like this in a CS class and knows of an existing algorithm for it?
Note: this is being done in pickBASIC so no objects or fancy libraries for me
Questions:
Is there a limit to how many parts are counted on a given day? Is it supposed to be roughly the same number of parts each day? If not, you can just generate a solution for each part separately and then merge them, which simplifies things a lot.
When you regenerate the list do you have some method to ensure that one or more parts isn't perpetually pushed beyond the next time that the list is regenerated?
I assume you wish to prevent two items from being counted too close together between two cycles? So, if the cycle ends on December 31, you wouldn't want the part counted on December 28 and January 3?
Anyhow, here's the basic idea. For each part you have a certain amount of leeway in scheduling; specifically, the number of days in the cycle minus the number of days of dead time (the minimum periods between countings) total. For parts counted once you have no dead time (with the one exception in a moment), while parts counted 4 times have 3*minimum_days_between_countings. In addition you have to add dead time if the last counting in the previous cycle was within minimum_days_between_countings of the new cycle. Once you've calculated the amount of leeway, you just have to split it randomly before the first counting, after the last counting, and between each consecutive pair of countings (if there's more than one counting).
If you don't have to even out the countings per day you're pretty much done; just stick all the lists together and you're set. You wouldn't have to recalculate the times for any given part, which takes care of the potential problem I mentioned above; you'd have to add new parts and remove old ones, but that wouldn't affect the times of any other parts.
If you do have to even out the countings per day things get trickier, since adding and removing parts can affect the scheduling of other parts.
ok.. algorithm question that I'm bashing my head against. I'm writing an inventory cycle counting program and working on generating count days right.
I think you are dealing with weighted probabilities. Each day you are going to pick several items to count. If an item has been counted in the past 30 days, it's probabilty of getting picked is 0. If a weight 4 item hasn't been counted in 365/4 days it's probability of getting picked is 1.0. Keep an array of weights of length equal to the number of items and initialize each element to 1.
Each day you will pick ( 4*num rank 4 + 3*num rank 3 + 2*num rank 2 + num rank 1)/365 items.
Any item that has reached a weight of >=365 will be picked today. If you still need to pick more items today, generate a random number between 0 and the sum of array elements whose value is > 0. Use that random number to pick an item. When a rank 1 item is picked, set its weight to -29. When a rank 4 item is picked, set it's weight to -119. At the end of each day, add each item's rank to its weight.
Does anyone here know a good resource for learning how to make a game engine? I want to make a really really simple one, just a 2d tiled world, although once it's running I'd probably make it 3d. More specifically, for now I'm aiming at a Roguelike style engine (I'm not making a roguelike, but want to start with ASCII levels, something I can do entirely with print() commands). I think I know enough programming to make it, but it would take a lot of time and failed ideas, and I'd like a little guidance to cut the trial and error part down a little.
I did some chatting with the accountant who is heading up the project and came up with something I think.
Basically I'm going to artificially force out the counts for a part based on the number of times it needs to be counted in a period. For example, if a part has to be counted 4 times in a year, I calculate 4 sections it will fall into. If a previous sections pick gets within 30 days of the next ones start, i just bump over the minimum day for the next part to keep the 30 day limit in place.
When I start getting to the end of the year and can possibly run out of places to drop parts into (there is a cap/day based on the total parts to count / available count days), the accountant is fine with dropping those counts as long as they are reported on. I'll also be sorting the list of parts so stuff that hasn't been counted has priority over parts that have previous counts already.
I might still play around with your idea quietdj to see what i come up with.
Well, it's mostly a learning thing, I want a better idea of how everything works inside. I have a couple of SDKs, like Unreal and CryEngine3, that I can play around with too, but this project is about reinventing the wheel anyway.
Well, think about what you need for the basics.
Objects
-Messaging: A way for the Objects to communicate(Collisions, etc...)
Rendering System
-Drawing Objects
-Sprite/Animations/Models that Objects use
Sound System
-Playsound/loopsound
-Effects?
File System
-Saving/Loading
Input System
-Press X to Jason
The really important part is how your objects are organized, in my engine I've set it up so that objects are executed off of an array ever timestep. Those objects in the top level array are usually gamestates, so they have lists of objects they execute and so on and so forth.
If you want your game to go online easily, then you want to look into a server/client based system. Otherwise you'll end up with your singleplayer/multiplayer being disjointed like Minecraft is right now.
I've actually got a good framework for the game concept I've been playing with. The more and more I work on it the more a flushed game comes out, sadly I lack in the art area so it's just kinda blocks moving around changing color or what have you, but the interaction between everything is fine.
I was thinking of throwing someone a few bucks for a little bit of enough to build a tech demo with and maybe try for a kickstarter. Seems like a good route, yay/nay?
It's pretty snazzy. The good stuff is mostly listed on the website, so I'll just cover the bad things.
* The default text-editor isn't great and I couldn't get IDE integration to work properly.
* The free edition does not play well with version control; you'll have to buy the professional edition (which changes the format objects and levels are stored in, iirc) if that's a big deal.
* I also didn't really enjoy trying to get things to line up in the level editor. You'd think there'd be some sort of snapping feature, but I could find it. Made doing 2D stuff sort of a pain.
* There's Flash and NativeClient export options in the works, but for now your games won't run on Linux.
Stanford's experimental machine learning class just went live for sign-ups. Good opportunity to get your ass kicked in ML from the comfort of your own home.
I've got a three-column layout where the left and right columns are a static width and the center column's width changes with the window size, down to a sane minimum of 600px. There's a table in the center column which is supposed to always take up 100% of that column's width, no less, no more. Can I enforce that in CSS?
I've got it working for most values in the table cells, but the complication is that the table may contain long sequences of text with no spaces. How do I tell the table that it has to wrap (or at least truncate or hide) that text instead of just expanding the cell (right past the borders of the middle column) to fit it?
My intuition suggests that tables were never meant to have a hard maximum width, and that there's no clean way to tell them to stop expanding cells to fit their values. Is that right?
I've got a three-column layout where the left and right columns are a static width and the center column's width changes with the window size, down to a sane minimum of 600px. There's a table in the center column which is supposed to always take up 100% of that column's width, no less, no more. Can I enforce that in CSS?
I've got it working for most values in the table cells, but the complication is that the table may contain long sequences of text with no spaces. How do I tell the table that it has to wrap (or at least truncate or hide) that text instead of just expanding the cell (right past the borders of the middle column) to fit it?
My intuition suggests that tables were never meant to have a hard maximum width, and that there's no clean way to tell them to stop expanding cells to fit their values. Is that right?
This is a particular problem and has some solutions. I recommend checking out this article.
Ah, I think table-layout:fixed is exactly what I was looking for. I already knew about word-wrap:break-word, but just couldn't get it to apply since the table kept expanding itself to fit the data. I'll give this a try. Thanks!
Well, think about what you need for the basics.
Objects
-Messaging: A way for the Objects to communicate(Collisions, etc...)
Rendering System
-Drawing Objects
-Sprite/Animations/Models that Objects use
Sound System
-Playsound/loopsound
-Effects?
File System
-Saving/Loading
Input System
-Press X to Jason
The really important part is how your objects are organized, in my engine I've set it up so that objects are executed off of an array ever timestep. Those objects in the top level array are usually gamestates, so they have lists of objects they execute and so on and so forth.
If you want your game to go online easily, then you want to look into a server/client based system. Otherwise you'll end up with your singleplayer/multiplayer being disjointed like Minecraft is right now.
Cool, thanks. I found someone's source code for an engine, but it looked terrible, about one line in three was an if(), and there was just a driver and three classes. Blaaargh.
I want to write it in Java so I can put it on my phone (not to sell it or anything, I'm not that ambitious yet, just to have something I wrote on my phone), which limits my options a bit, but I think I'm getting there. Displaying everything via console seems to be a nice way to get the basics running too, so I don't have to worry about openGL or whatever just yet.
Stanford's experimental machine learning class just went live for sign-ups. Good opportunity to get your ass kicked in ML from the comfort of your own home.
Thanks for the heads up. I've been reading the draft for Machine Learning In Action from Manning and it's fun. Different stuff than what I normally deal with. I still get lost on some stuff in the book, but I think I'm going to give this a shot.
jackfaces
"If you're going to play tiddly winks, play it with man hole covers."
- John McCallum
I need pointers for my Senior Design project! The nice thing is, I'm making the third edition of someone else's very very VERY badass project, but the client want's two things:
1. Make it suitable for mass production (not what I'm asking about here. I'll find a manufacturer.)
2. The mentor/sponsor/client want's wireless firmware updates (D:). How can I learn about how common software gets updated? How does, say, Starcraft or Firefox, get updated successfully without getting fucked up and what sort of failsafes do they use? If the client wants updating firmware firmware, than the task gets more dangerous, because that can turn a nice piece of equipment into a brick. If we're just updating code in the application layer, than it seems much more feasable. I'll ask if this is the case.
I need pointers for my Senior Design project! The nice thing is, I'm making the third edition of someone else's very very VERY badass project, but the client want's two things:
1. Make it suitable for mass production (not what I'm asking about here. I'll find a manufacturer.)
2. The mentor/sponsor/client want's wireless firmware updates (D:). How can I learn about how common software gets updated? How does, say, Starcraft or Firefox, get updated successfully without getting fucked up and what sort of failsafes do they use? If the client wants updating firmware firmware, than the task gets more dangerous, because that can turn a nice piece of equipment into a brick. If we're just updating code in the application layer, than it seems much more feasable. I'll ask if this is the case.
Yeah, it does depend quite a bit of your platform/architecture, and whether or not it is firmware vs app layer. From the sounds of it (talk of firmware vs app layer), it sounds like you have an OS on your system.
--
If you do have an OS, and you are just updating the app layer, a simple design which will cover most of your bases is to have a dedicated "upgrader" app running in the background. This upgrader acts independently of the main app, and will save the entire incoming update *and* verify a checksum. This is especially important since the updates are wireless - communications may become interrupted due to external circumstances.
Once the update has been saved, signal for the main app to shut down, and overwrite with the new files.
This has the advantage that if the system is powered off during the upgrade process, it is entirely recoverable because the upgrader app is still uncorrupted. The main app might be corrupted/half written, but the upgrader app will still be able to replace the corrupted files with the updates.
The actual tricky bit with this one is, "How do I update the updater?"
--
If you do have an OS, and are updating the OS layer, things become a little bit trickier. Depending on the OS you have, you might need to modify the bootloader to replace the OS files on startup, or alternatively, the OS itself might support upgrading on the fly. You'd need to consult your OS documentation.
Typically, the main app downloads a separate updater app, then runs that and shuts itself down; the updater then does what it needs to do and restarts the main app
If you're updating firmware firmware then you need to ensure you're running from completely from RAM and then download the entire update to RAM, verify everything, update your NV storage and hope like hell you don't lose power. Probably the best way to do this style update is to download a full executable image to RAM that will do the update and then jump to the start of that and reboot on completion
Typically, the main app downloads a separate updater app, then runs that and shuts itself down; the updater then does what it needs to do and restarts the main app
If you're updating firmware firmware then you need to ensure you're running from completely from RAM and then download the entire update to RAM, verify everything, update your NV storage and hope like hell you don't lose power. Probably the best way to do this style update is to download a full executable image to RAM that will do the update and then jump to the start of that and reboot on completion
Worst case: Bootloader via serial port!
Whoo!
Edit: Actually, if the "wireless" system is one of those dedicated RF transceivers in the ISM band as opposed to 802.11, it could very well end up being via a serial port. Hmmmmm....
I've actually got a good framework for the game concept I've been playing with. The more and more I work on it the more a flushed game comes out, sadly I lack in the art area so it's just kinda blocks moving around changing color or what have you, but the interaction between everything is fine.
I was thinking of throwing someone a few bucks for a little bit of enough to build a tech demo with and maybe try for a kickstarter. Seems like a good route, yay/nay?
For a pretty basic 2d game engine I'd expect someone to log probably a few hundred hours.
Having a problem with my Apache CGI program. I can run it in the shell just fine, but Apache gets this error
ld.so.1: roomboss.cgi: fatal: libpq.so.3: open failed: No such file or directory
So Apache can't find the library for postgresql(or is it a permission issue, does that flag differently). If the library is in my usr/local directory, how can I share it correctly?
Having a problem with my Apache CGI program. I can run it in the shell just fine, but Apache gets this error
ld.so.1: roomboss.cgi: fatal: libpq.so.3: open failed: No such file or directory
So Apache can't find the library for postgresql(or is it a permission issue, does that flag differently). If the library is in my usr/local directory, how can I share it correctly?
Make sure the library is in the path that your httpd user can use? (root, some specific user, etc.) Might need an entry in /etc/ld.so.conf.d/ or such.
Posts
This is true.
This is also true. Though this is probably true of most people who identify as "X programmers." Insert Java, VB, .NET, and so on. The exception would probably be, like, LISP.
Circle of life, man.
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
Yes and no. Developers who can only use one language probably didn't have a well rounded education and tend to think of software development through the lens of that one language. Most developers spend most of their time in one or two languages, though the main language will change over the course of a career. It's still fun to stereotype and there's varying amounts of truth behind it. I'll unfairly assume the VB or PHP guy can't code his way around a sort algorithm. Java and C# developers don't map new territory, but instead efficiently extend projects while doing no harm to the infrastructure. They tend to be organized and work in large teams. We should totally make a nature film out of this.
The opposite of the one language developer isn't one who knows twenty. It's the one who knows development and could pick up any language quickly if required.
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
This did not happen the first day I played with this but I'm not sure if I kept it running that long straight. I was also using pyamqp and today I'm using pika for the amqp lib since pike has more features. Celerybeat does also whine at me about memory leaks when I have django debug mode on, so maybe that's doing it.
Better? I don't think I've ever written a real sort algorithm professionally. It just seems like one of those things a developer should know, like creating a linked list manually, even if it isn't directly useful. Just wrapping one's head around the matter can be the important part.
Slightly related, I've been tossing around the idea of putting together a big list of 2-10 minute tasks from Rosetta Code and similar that could serve as a worksheet when learning or brushing up on a language. I haven't found one online that's not too simple (arithmetic) but not so complicated that most of the time is spent figuring out the algorithm instead of the language features.
If you ever need to talk to someone, feel free to message me. Yes, that includes you.
Totally this.
I often have to teach people that "you need to learn this, not so that you can write it, but that you can use it."
If any of you are all smart about django-celery, rabbitmq, and pika let me know because I'd prefer to use pika for more flexibility in scheduling tasks.
List of parts in which each part is categorized and can be counted 1-4 times in the total cycle based on it's ranking. (The ranking part is done)
Now I need to create a random order of the part numbers but the catch is, having a minimum number of days between each part number being counted.
so basically
Count date 1 -> random length of days (min 30) -> count date 2 -> and so on.
This list also gets regenerated weekly at least throughout the count period so any new parts or deleted parts are accounted for (past counts done during the count cycle are removed from the ongoing one when recalculated).
My current though is to randomize the whole list, and iterate over it X times doing a swap on part numbers until it's a valid list. The question here would be coming up with X (or breaking because we hit an infinite loop).
Thoughts? Anyone do something like this in a CS class and knows of an existing algorithm for it?
Note: this is being done in pickBASIC so no objects or fancy libraries for me
Questions:
Is there a limit to how many parts are counted on a given day? Is it supposed to be roughly the same number of parts each day? If not, you can just generate a solution for each part separately and then merge them, which simplifies things a lot.
When you regenerate the list do you have some method to ensure that one or more parts isn't perpetually pushed beyond the next time that the list is regenerated?
I assume you wish to prevent two items from being counted too close together between two cycles? So, if the cycle ends on December 31, you wouldn't want the part counted on December 28 and January 3?
Anyhow, here's the basic idea. For each part you have a certain amount of leeway in scheduling; specifically, the number of days in the cycle minus the number of days of dead time (the minimum periods between countings) total. For parts counted once you have no dead time (with the one exception in a moment), while parts counted 4 times have 3*minimum_days_between_countings. In addition you have to add dead time if the last counting in the previous cycle was within minimum_days_between_countings of the new cycle. Once you've calculated the amount of leeway, you just have to split it randomly before the first counting, after the last counting, and between each consecutive pair of countings (if there's more than one counting).
If you don't have to even out the countings per day you're pretty much done; just stick all the lists together and you're set. You wouldn't have to recalculate the times for any given part, which takes care of the potential problem I mentioned above; you'd have to add new parts and remove old ones, but that wouldn't affect the times of any other parts.
If you do have to even out the countings per day things get trickier, since adding and removing parts can affect the scheduling of other parts.
I think you are dealing with weighted probabilities. Each day you are going to pick several items to count. If an item has been counted in the past 30 days, it's probabilty of getting picked is 0. If a weight 4 item hasn't been counted in 365/4 days it's probability of getting picked is 1.0. Keep an array of weights of length equal to the number of items and initialize each element to 1.
Each day you will pick ( 4*num rank 4 + 3*num rank 3 + 2*num rank 2 + num rank 1)/365 items.
Any item that has reached a weight of >=365 will be picked today. If you still need to pick more items today, generate a random number between 0 and the sum of array elements whose value is > 0. Use that random number to pick an item. When a rank 1 item is picked, set its weight to -29. When a rank 4 item is picked, set it's weight to -119. At the end of each day, add each item's rank to its weight.
http://www.thegamecreators.com/?m=view_product&id=2128
I did some chatting with the accountant who is heading up the project and came up with something I think.
Basically I'm going to artificially force out the counts for a part based on the number of times it needs to be counted in a period. For example, if a part has to be counted 4 times in a year, I calculate 4 sections it will fall into. If a previous sections pick gets within 30 days of the next ones start, i just bump over the minimum day for the next part to keep the 30 day limit in place.
When I start getting to the end of the year and can possibly run out of places to drop parts into (there is a cap/day based on the total parts to count / available count days), the accountant is fine with dropping those counts as long as they are reported on. I'll also be sorting the list of parts so stuff that hasn't been counted has priority over parts that have previous counts already.
I might still play around with your idea quietdj to see what i come up with.
Well, it's mostly a learning thing, I want a better idea of how everything works inside. I have a couple of SDKs, like Unreal and CryEngine3, that I can play around with too, but this project is about reinventing the wheel anyway.
Objects
-Messaging: A way for the Objects to communicate(Collisions, etc...)
Rendering System
-Drawing Objects
-Sprite/Animations/Models that Objects use
Sound System
-Playsound/loopsound
-Effects?
File System
-Saving/Loading
Input System
-Press X to Jason
The really important part is how your objects are organized, in my engine I've set it up so that objects are executed off of an array ever timestep. Those objects in the top level array are usually gamestates, so they have lists of objects they execute and so on and so forth.
If you want your game to go online easily, then you want to look into a server/client based system. Otherwise you'll end up with your singleplayer/multiplayer being disjointed like Minecraft is right now.
Here's a super old article from 2003, but it might help get your started.
http://www.gamedev.net/page/resources/_/technical/game-programming/enginuity-part-ii-r1954
I was thinking of throwing someone a few bucks for a little bit of enough to build a tech demo with and maybe try for a kickstarter. Seems like a good route, yay/nay?
It's pretty snazzy. The good stuff is mostly listed on the website, so I'll just cover the bad things.
* The default text-editor isn't great and I couldn't get IDE integration to work properly.
* The free edition does not play well with version control; you'll have to buy the professional edition (which changes the format objects and levels are stored in, iirc) if that's a big deal.
* I also didn't really enjoy trying to get things to line up in the level editor. You'd think there'd be some sort of snapping feature, but I could find it. Made doing 2D stuff sort of a pain.
* There's Flash and NativeClient export options in the works, but for now your games won't run on Linux.
http://www.ml-class.org/
I've got a three-column layout where the left and right columns are a static width and the center column's width changes with the window size, down to a sane minimum of 600px. There's a table in the center column which is supposed to always take up 100% of that column's width, no less, no more. Can I enforce that in CSS?
I've got it working for most values in the table cells, but the complication is that the table may contain long sequences of text with no spaces. How do I tell the table that it has to wrap (or at least truncate or hide) that text instead of just expanding the cell (right past the borders of the middle column) to fit it?
My intuition suggests that tables were never meant to have a hard maximum width, and that there's no clean way to tell them to stop expanding cells to fit their values. Is that right?
This is a particular problem and has some solutions. I recommend checking out this article.
Cool, thanks. I found someone's source code for an engine, but it looked terrible, about one line in three was an if(), and there was just a driver and three classes. Blaaargh.
I want to write it in Java so I can put it on my phone (not to sell it or anything, I'm not that ambitious yet, just to have something I wrote on my phone), which limits my options a bit, but I think I'm getting there. Displaying everything via console seems to be a nice way to get the basics running too, so I don't have to worry about openGL or whatever just yet.
Thanks for the heads up. I've been reading the draft for Machine Learning In Action from Manning and it's fun. Different stuff than what I normally deal with. I still get lost on some stuff in the book, but I think I'm going to give this a shot.
"If you're going to play tiddly winks, play it with man hole covers."
- John McCallum
1. Make it suitable for mass production (not what I'm asking about here. I'll find a manufacturer.)
2. The mentor/sponsor/client want's wireless firmware updates (D:). How can I learn about how common software gets updated? How does, say, Starcraft or Firefox, get updated successfully without getting fucked up and what sort of failsafes do they use? If the client wants updating firmware firmware, than the task gets more dangerous, because that can turn a nice piece of equipment into a brick. If we're just updating code in the application layer, than it seems much more feasable. I'll ask if this is the case.
Yeah, it does depend quite a bit of your platform/architecture, and whether or not it is firmware vs app layer. From the sounds of it (talk of firmware vs app layer), it sounds like you have an OS on your system.
--
If you do have an OS, and you are just updating the app layer, a simple design which will cover most of your bases is to have a dedicated "upgrader" app running in the background. This upgrader acts independently of the main app, and will save the entire incoming update *and* verify a checksum. This is especially important since the updates are wireless - communications may become interrupted due to external circumstances.
Once the update has been saved, signal for the main app to shut down, and overwrite with the new files.
This has the advantage that if the system is powered off during the upgrade process, it is entirely recoverable because the upgrader app is still uncorrupted. The main app might be corrupted/half written, but the upgrader app will still be able to replace the corrupted files with the updates.
The actual tricky bit with this one is, "How do I update the updater?"
--
If you do have an OS, and are updating the OS layer, things become a little bit trickier. Depending on the OS you have, you might need to modify the bootloader to replace the OS files on startup, or alternatively, the OS itself might support upgrading on the fly. You'd need to consult your OS documentation.
If you're updating firmware firmware then you need to ensure you're running from completely from RAM and then download the entire update to RAM, verify everything, update your NV storage and hope like hell you don't lose power. Probably the best way to do this style update is to download a full executable image to RAM that will do the update and then jump to the start of that and reboot on completion
Worst case: Bootloader via serial port!
Whoo!
Edit: Actually, if the "wireless" system is one of those dedicated RF transceivers in the ISM band as opposed to 802.11, it could very well end up being via a serial port. Hmmmmm....
For a pretty basic 2d game engine I'd expect someone to log probably a few hundred hours.
ld.so.1: roomboss.cgi: fatal: libpq.so.3: open failed: No such file or directory
So Apache can't find the library for postgresql(or is it a permission issue, does that flag differently). If the library is in my usr/local directory, how can I share it correctly?
Make sure the library is in the path that your httpd user can use? (root, some specific user, etc.) Might need an entry in /etc/ld.so.conf.d/ or such.