Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

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.

Show posts Menu

Messages - ben_g

#16

Lbl SubStr
.SubStr(str,begin,len)
Copy(r1+r2,L4,r3)
0->{r1+r2+r3}
Return L4

If you embed this code in your program, then you can call SubStr( (type this out yourself, there is no token for it) and it will return a fraction of the string supplied in the first argument, starting from the supplied begin index (0 is the start) and len chars long.
This code uses the Copy( command to copy the desired part of the string to the TempSwapArea (L4) (so if you use this for data storage you'll have to change it to another free RAM area) and adds a 0 byte at the end (to allow axe to see where the string ends). When using this code, make sure that the length is never bigger than 255 and that you never ask for a string with a length of 0 (both could cause a crash).

Example:

Text SubStr("JOHNRODNEYKYLESIDNEYMICHAEL",4,6)

This should draw the text "RODNEY" to the screen.

However if you just want to use it for a list of strings, then you might want to define your strings like this instead:

Data(Str000^r,Str001^r,Str002^r,Str003^r,Str004^r,Str005^r,Str006^r)->°SLIST
"JOHN"->Str000
"RODNEY"->Str001
"KYLE"->Str002
"SIDNEY"->Str003
"MICHAEL"->Str004
"BEN"->Str005
"JAKE"->Str006

When you define your strings like this, then you can get each string of the list by doing {I*2+°SLIST}^r where I is the index of the string you want (with 0 being the first string). This method works similar to how an array of strings works internally in higher level programming languages.

Example:

Text {2*2+°SLIST}^r

This should draw the text "KYLE".

EDIT: fixed incorrect code
#17
I don't think bookmarks are supposed to contain multiple lines. Have you tried writing it all on one line like this?

javascript:var divs=document.getElementsByClassName("corrupted-repair-button");for (var x=0;x<divs.length;x++) {divs[x].removeAttribute('hidden');}
#18
Gaming / Re: Buying a new PC
November 05, 2016, 05:32:15 PM
I guess it depends on the settings. My laptop can run dolphin in HD resolutions at full speed, but then I usually have stuff like AA and supersampling disabled. If you want to install fancy shaderpacks and such, then you can go for a more powerful card. If you're satisfied with just emulating games in their original look, then most dedicated cards should be sufficient.
#19
Gaming / Re: Buying a new PC
November 05, 2016, 04:32:34 PM
Quote from: gameblabla on November 05, 2016, 04:18:25 PM
You should pick a laptop with at least a Geforce GTX 980M, as it is according to Nvidia the same as the desktop one.
Anything lower than that is bad.
Quote from: STV on November 05, 2016, 01:47:55 PM

  • I do not want to play PC video game things (Halo, Overwatch, i.e. things which play on XB1/PS4)
A GTX 980M is complete overkill when you don't want to play PC games. A dedicated GPU can be helpful with Dolphin and retro gaming, but a very basic one like the 730M or such is probably good enough.
#20
Gaming / Re: Buying a new PC
November 05, 2016, 03:53:18 PM
My laptop has a 2.6GHz dual-core i5 CPU and a 710M GPU, and it can already run Dolphin at full speed (at 1366x768 resolution, no supersampling). Since my laptop was €600, I doubt you'll be able to find a €1500 laptop that doesn't run Dolphin well.

For VMs, it depends a lot on what you do with it, but they tend to work better when more RAM is available. I'd reccomend going for 16GB rather than 8GB when possible because of this.

If you plan to bring your laptop to school regularly, then I'd suggest getting a 15inch laptop. Having a big screen is nice, but 17inch laptops don't fit in most backpacks.

Finally, I'd reccomend having an SSD. Windows 10 uses the hard drive very intensely, so an SSD increases the speed it runs at by a lot. About 100GB should be more than enough for storing the OS and frequently used programs, but if you want to have everything on an SSD then you may want to get 200 or even 500GB, depending on what you store. (Most laptops have only one drive slot, so you'll probably have to choose between either an SSD or a HDD).

I don't have any particular models of laptops in mind, but I hope you now know a bit more of what to look for.

BTW: don't get a laptop of the Toshiba brand. They have a good price/performance ratio, but they have a rather poor build quality and thus easily start having problems.
#21
Web / Re: This topic should crash your browser
November 02, 2016, 05:23:45 PM
Quote from: DJ Omnimaga on November 02, 2016, 04:31:31 PM
Hm I see. I am curious about if it works in IE6 :P
IE6 doesn't even need such a gif to crash while loading a page :P
#22
Other / Re: Halloween
November 01, 2016, 09:25:13 PM
Look at the colours of the names.
#24
Games / Re: Reuben Quest 3
October 21, 2016, 03:25:58 PM
Quote from: p2 on October 21, 2016, 09:11:04 AM
got an ubuntu again. Maybe I can try it out again,, too ^^
(If I get stuff running on Ubuntu)
Is there a good wabbitemu for it? or will be TiLp easier...? >.<
TiLp is a linking program, you can use it to run the game on an actual calculator, but I think you might mean TilEm instead. You can indeed install that if you want an emulator that works natively on Linux. Wabbitemu works very well on Wine though.

Quote from: Sorunome on October 20, 2016, 05:12:59 PM
...
Anybody else wants to? The more the better ^.^
Looking for more beta testers? Sign me up :)
#25
I already redid respawning:
https://www.youtube.com/watch?v=6HRYLuBgECw

Apart from that, I've been adding additional internal functionality to the player class to make it ready for the new combat system, but it's not at all functional yet. Big parts of the old code can be reused though, so it shouldn't take that long to have a working version.
#26
The ? is basically an inline if. If the expression before the ? returns true (iirc this equals to any nonzero number in axe), the code after the ? is executed.

Example:
If A=3
A++
End

Can also be written as

A=3?A++

You can also have a, to have an else condition.

The main advantage is that you can use it inline. For example to have a different sprite when a player is running or not: Pt-On(X,Y,Speed=0?°StandSPR,°RunSPR) This command functions similarly to this code:
If(Speed=0)
Pt-On(X,Y,°StandSPR)
Else
Pt-On(X,Y,°RunSPR)
End
However the first one only has one call to Pt-On. As for efficiency, I assume that performance-wise it's pretty much the same, but I think the first one compiles into slightly smaller code. I'm not sure of that though.
#27
Quote from: DJ Omnimaga on September 10, 2016, 04:28:15 PM
By the way, back in the days, the free version only missed 3D capabilities and had a crappy splash screen ad. I didn't mind the lack of 3D but the ad annoyed me a bit. But I forgot what is now included. Either way I am happy I could get every license for cheap. I need to learn how to use GM to do tilemaps, though.
I never really minded the ad in early versions, since the splash was basically just what it showed while loading your game. The lack of 3D was indeed not that bad at all, since the 3D support of GameMaker in those days was absolutely terrible (It used a terribly outdated renderer with poor performance, pretty much no animation support unless you used a different model for each frame, very limited lighting (iirc up to 8 point lights, 1 directional light and no shadows), and no shader support (but you did have a simple fog effect).

Tilemaps are really easy to do, I've used them before, but years ago and in an earlier version. Check out the official tutorials, there used to be a good one about tilemapping there.
#28
PC, Mac & Vintage Computers / Re: Z80-based pico8 clone?
September 08, 2016, 09:09:32 PM
Quote from: c4ooo on September 08, 2016, 08:18:34 PM
I guess someone could just take the the wabbit code, remove all the "emulator" UI, and just leave the LCD so it looks like the user is playing the game natively ;)
I think that's why he was planning to use z80e: it already only shows the LCD. It might be a good idea to scale that a bit though, since the window is a bit small to  play games on it for hours.
#29
PC, Mac & Vintage Computers / Re: Z80-based pico8 clone?
September 08, 2016, 12:09:11 PM
I think it would be interesting, especially if it would be compatible with actual calculators.
#30
[Inactive] VelocityGames (PC/Web) / Re: Project Valhalla
September 03, 2016, 11:18:30 PM
Quote from: Dudeman313 on April 02, 2016, 09:03:44 PM
So, what are you working on now, locations and puzzles, or enemies and graphics?
I apparently didn't see this post. I've been mainly working on graphics lately, and I'm planning to start working on locations soon, along with the puzzles that will be put in them.

Thanks to the new Unreal Engine update that released a few days ago, I've also finally gotten shadows to work. This means that feature-wise, my altered lighting system has finally been completed, and I'm quite happy with how it looks now.


I've also replicated the scene in an older version, so you can see the difference:

This old version still had shadows, but for some reason they are almost invisible here. The old version also had a blue lamp in the same position as the new version, but this is almost invisible too.
The wall material has not been updated, the difference in appearance is purely caused by the new lighting.

Now let's hope that I can also improve the gameplay that much :)
Powered by EzPortal