+-Discord Shoutbox

Alternatively, join us on Discord directly.
You can help CodeWalrus stay online by donating here.

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - semiprocoder

PC, Mac & Vintage Computers / Color Speedrun[unity]
February 21, 2017, 03:04:58 AM
Well, I decided to make another game.
It is a speedrun game, with the simple goal of reaching anything blue(with rgb of 0, 0, 255. Also opens up possibility of trolling :P)(thinking of having a level with like 1 blue pixel in the beginnning that is hard to get).
Anyways, so yeah, its that simple. Black is regular speed. White makes you go fast. Grey makes you go slow. Yellow is wall, and red kills you. The hitbox is just the center of the circle, so I am planning to have the last level have a one or two pixel gap that you have to pass through.
The levels are just png or tif images, with each color corresponding to something.
So far I have made levels 1-3, and you can see that here:

EDIT(levels 1-5. And yeah I know I am terrible):
@DJ Omnimaga Tell me what you come up with! I haven't spent much time with this myself, but I already think that I've generated some cool images, despite really just learning about conway's game of life. I am going to try a black and white walrii as the initial configuration and see what it generates.

EDIT: Nothing too cool with a walrii :(.
@Snektron Well its not so simple. I have it running in eclipse, with java classes, so I can't really port it over to javascript, especially as I don't know javascript.
That's essentially what I do, except I also record the number alive so I can set the colors for each square. Also I record state and playerState, but that is unimportant for my current program right now; I plan to use state, although playerState is only going to be used for a two player game.

Also I have decided to export my code as a java file, attached below. Just unzip the file, and it should have a settings folder and a jar. No readme yet, cause I am lazy, but one will probably be made soon. I do have some notes in the settings.txt file though, so that should help you.

And here is the source(yeah ik I could do something with github but I havent used it for so long and I don't feel like spending time learning how it works again):

EDIT: I think I may have uploaded an outdated version that didn't work, so I just reuploaded the LYFE.zip attachment.
@alexgt what did you do? My code is pretty slow at resolutions of 800x800 cells. I rendered the shown images at 399x399, and the framerate is probably like 10-20. Still ok, but not super smooth.
So I kind of lost interest in programming for a while, but I can say that, at least for now, I am back(maybe?).
Anyways, I decided to make Conway's Game of Life, but with some modifications. So I originally meant to create a two player game in which each player either would try to snuff out the other or have more of "their own" cells or something along those lines after a certain time limit. However, I have completely changed my direction(might still try making a two player game) when I started to mess around with the physics of game of life.
If you don't know how the game works, I will just quote Wikipedia, as I am bad at explaining things:
QuoteThe universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead, or "populated" or "unpopulated" (the difference may seem minor, except when viewing it as an early model of human/urban behaviour simulation or how one views a blank space on a grid). Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:
Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
Any live cell with two or three live neighbours lives on to the next generation.
Any live cell with more than three live neighbours dies, as if by overpopulation.
Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations.

So, as I said, I decided to mess around with the rules a little bit. I decided to change the amount of living cells required to create a living cell, and I decided to change the amount of cells that a living cell can live with. Then I decided to add some color. The color is added by checking how many alive cells are near the cell BEFORE reproduction. I know this is weird, as it means that it is kind of outdated, and I am not sure whether adding color after reproduction will look better, but I am lazy to do that :P.

Anyways, the two attachments show the initial configuration for a system where the a cell can spawn if there are exactly 2 living cells next to it, and a cell can die if there are less than 2 or more that 6 living cells beside it. The color scheme is inverted to what I've generally seen, with dead cells being black, but I think this looks better. The initial configuration does have red lines, which signify walls, but I disabled walls for this game, so imagine them as nonexistent.

EDIT: I think this looks cool, despite a lot of quality being lost after conversions(obs record to mp4, then to mpeg in ffmpeg, then to gif in virtualdub): http://gph.is/2kYk3k3. This was done with the same + configuration, but cells come alive if there are 2-6 adjacent cells, and, as before, they stay alive with 2-6 adjacent cells.

SECOND EDIT: Added some more pictures that I think look pretty cool.
Does os 4.4(not ndless) bring anything new to the nspires? Also great job with releasing ndless so quickly!
Other / Flickr
January 01, 2017, 04:52:59 AM
Anyone here have a flickr? I just made one and put all my old photos(taken with my somewhat cheap phone) on it in anticipation for my new camera, which is already ordered and should come in 3-5 business days(although who knows what counts as a business day?).
https://www.flickr.com/photos/[email protected]/with/31640907920/

EDIT: Happy new years everyone!
Tech, Science, IT discussion & News / Re: Pebble is Dead
December 11, 2016, 03:12:19 AM
Yeah this really sucks. I didn't buy my pebble on kickstarter though. I bought it on amazon for a decent price, but this new deal with fitbit is absolutely terrible. Add to that that fitbit's offer is a LOT less than previous offers from other companies and that just makes this suck. At least they could continue some support for pebble or continue to sell and make them. I feel like this will greatly reduce everyone's confidence in the smartwatch industry and (at least I know I will do this) people will not buy new smartwatches for a while. This is the opposite of what fitbit sais that it wants, as "Fitbit CEO says buying Pebble could help it crack the code on smartwatches" (just the title of the first thing that popped up when I searched up pebble). If fitbit really wanted to do that, then perhaps they could continue to release and develop for pebble. Despite the fact that they had less sales than other smartwatches, they still had a decent core support base. Pebbles have a very long battery life and are easy to develop simple apps for, which is all you need with a smartwatch. The only thing that led to people not liking pebble anymore was that pebble started to focus way too much on health. They were trying to become kind of like fitbit, and, in the end, that ended up killing them with fitbit's acquisition of pebble.
So I recently watched carkh's videos on his evolution simulator, and they really interested me. Thus I have started making an evolution simulator of my own based on neural networks.

I have it partially completed, and I decided to have it simulate the prisoner's dilemma. If you don't know, the prisoner's dilemma goes like this: There are two parterns in crime, but they don't really know each other, and they individually told: "If you both don't confess about each other, you will both go to jail for x years." "If you confess and your partner does not, then you will be set free and your partner will go to jail for y years, and vice versa." "If you both confess, then you will both go to jail for z years."

Generally, x,y,z>0 and y>z>x, but I programmed it so that you are free to play around with the parameters.

So how the evolution part of this simulator works is that there are some amount of creatures(I am currently keeping it at 200 to prevent lag), and, at each step of the simulation, every creature is paired up with one other creature.

These two creatures then battle off in the prisoners dillema. Each creature outputs any number between 0 and 1. If that number is <0.5, then that means the creature confessed, and if it is >=0.5, then that means the creature didn't. After they each go once, they are each fed the ouput from their opponent's previous run(and the rounded outputs). Each pair of creatures plays ten games. At each game, each creature gets a sentence corresponding with the above rules.

Each creature also has two numbers: their total sentence and the number of times they played. The "fitness" of each creature is total sentence/number of times played. The creatures are then sorted by fitness, and the half of the creatures with the highest fitness is killed. The other half is reproduced and modified slightly, with the total sentence equaling the fitness of the parent and the number of times played equaling 1 to not give new creatures too much of a luck advantage.

So, since the normal prisoner's dillema would be boring, as each creature is obviously going to evolve to always confess, I decided to set x(or the sentence for both creatures confessing)<=0.0 to spice things up a bit.

Here is a picture(I can give more explanations, but the main thing is that the bottom graph represents the best fitness of any creature at any moment. The creatures generally tend to all confess or all not confess). In this case, x=-0.01, y=10.0, and z=3.5:

Anyways, my code was written in eclipse with processing and has multiple files(Note that x, y, and z are stored in an array called fitnessSettings in the class Creature):
https://www.dropbox.com/s/b3fl8mvdetp724b/Neural Network.zip?dl=0
Well, I have gotten my first enemy working(sorta). There is an enemy on the screen, and if you get hit enough times, the game exits. If the enemy is hit enough times, then it stops shooting and isnt displayed. However, it is still there so that the bullets can finish traveling. If the bullets are all gone, then the enemy gets deleted from the array of enemies.

Also @DarkestEx I would definitely like to know what hosting web service you know about. I obviously need something better than what I have right now, as it is ridiculously slow. Does it support wordpress?
I am planning to have you kind of customize your shooter by changing the ship(which has different stats), changing the weapon, like yeah double fire or a different(maybe allowing for a secondary weapon or weapon customizer?), and then getting different multipliers that multiply max health, max armor, armor regen, damage(plasma beat type thing or should I just make it add like .1 to the multiplier time?), and it will allow you to increase your health. Obviously I am still a ways away from finishing this, so I will change how I want the store to work.

Also I agree that x10hosting isn't that great, but its the only free hosting service I found that allows me to set a custom domain and custom html site, where I installed wordpress.
Yes, it will feature a shop eventually. I already have support for custom ships, weapons, and projectile types, but I only have one of each right now for testing. I am currently unsure of how I should implement the shop though:
Should I:
1) Allow for buying custom ships, weapons, and projectiles?
2) Should I have separate ships in the shop and weapons, but weapons shoot what projectile they are programmed to do so, not the one you buy(I think I am going to go for this as then I can have weapons shoot different types of projectiles at the same time)?
3) Should ships come with a built in weapon that you cant change?

Btw ships have stats like armor and health. Armor is going to be regenerated(like in Halo), while health can only be restored if you purchase repairs in the shop.
I've recently started making a new pebble game that is inspired by the calculator game, phoenix. It is still going to be very different though. Anyways, I've written the very basic player movement and shooting code. Currently I am not releasing the source, but once it gets to an acceptable level, I will release it. Right now there is something going on with the pebble emulator, so I can't really get a screenshot right now, but I sill soon.

Edit: I've decided to make my github public: https://github.com/awesommee333/Arcade-Shooter

Note: this is a crosspost of my blog post on: http://andrewkrapivin.xyz/. I will mainly be posting updates there, but I will post the more major pebble updates here too. Also, should I post this on cemetech?

Edit: Well havent fixed the emulator, but decided to just take a picture of the physical watch:

He said he rebooted his computer, not his calculator, so maybe it could make a difference. But yeah, definitely do check if the calc is charging.
Powered by EzPortal